The above line gives the wrong value if CalculateonBarClose = false;
It is correct if CalculateonBarClose = true.
This is true in either an indicator or strategy for an identical chart
The wrong value is off by many bars.
Usually it refers to a swing more than 1 instance back
often as much as 3 instances back.
The correct answer is generally quite nearby on the chart, say 2 or 3.
In order to fix the problem i wrote my own, which works,
but I am wondering what
I am not understanding about the NT version usage that is causing
an incorrect return value when CalculateOnBarClose = false.
swingstrength is 1, realtimelookback is 20
Note the the error occurs whether the startBar is 0 or 1.
(Have not tried other values)
Thank you
Roland
Comment