MysticDark
MysticDark 25 Nov 2020, 05:35
Don't worry guys: i've solved.
The trouble was that if you use OnBar(), open and close price of the last bar will be the same, because is the just opened bar.
You must use the values of the previous bar (example Bars.OpenPrices.Last(1) for the open price).
MysticDark
25 Nov 2020, 05:35
Don't worry guys: i've solved.
The trouble was that if you use OnBar(), open and close price of the last bar will be the same, because is the just opened bar.
You must use the values of the previous bar (example Bars.OpenPrices.Last(1) for the open price).
@MysticDark