This website uses cookies to enhance site navigation, analyze site usage, and assist in our marketing efforts. By clicking “Accept All” you are providing your consent to our use of all cookies. Alternatively, please provide your choice by pressing “Customize Cookies”. For more information, please read our Privacy policy
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