I can't seem to get BarsSinceExit to return any value besides 0
The backtester report show 6 trades in my test chart .
It seems that the last bar of the day would report a value besides 0. In fact, BarsSinceExit never shows a value besides 0 on all bars of the test day.
Does it only work when there is a live feed or autotrade'ing?
Thank You in Advance
Code: Select all
If Open < Close and range > 5
then Buy next bar Market;
setprofittarget_pt (5);
Print (timetoString (datetime), " BarsSinceExit", value1, " ", Value2, " ", Value3, " ", Value4);
If marketposition = 0
then begin
value1 = barssinceexit(0);
value2 = barssinceexit_checked(0);
end;