V
V
Valentine2016-01-17 09:29:08
C++ / C#
Valentine, 2016-01-17 09:29:08

Wealth lab. C# how to write a spherical function?

I am learning, I am writing a simple trading robot in wealth-lab on sharp.
It is required to write a spherical function that takes indicator data (bollinger lines in this case), takes the value of bars, calculates something, guesses on coffee grounds and gives the result. I can't describe it properly. Code and error below, spherical function - some_funct()
9d5ce92caeb84260a37bda98b1b3ed43.PNG

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Stanislav Makarov, 2016-01-17
@Nipheris

Would you like to create BBUp and BBMed arrays? If you create, then show the creation code, and where it is called.

Y
Yuri Zolotarev, 2018-02-09
@Goldmann

In Wealth Lab, you can work directly with the DataSeries object. All bar values ​​are just such objects. Therefore, in order to allow you to calculate some values ​​based on the indicator data and bars, you can write something like:
DataSeries bband = BBandUpper.Series(Close, 25, 1);
DataSeries someValue = bband - Close;
Here we will get a new DataSeries object where the values ​​will equal the boileringer minus the closing prices.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question