dear all,
I'm experiencing troubles with raw buy signals: when I ask for some buy bar info, e. g.:
buyclose = ValueWhen(Buy, C);
it happens that result refers to the last buy signals without taking in account if it is a raw signal or an actual trade.
here below an example:
SetBacktestMode( backtestRegular);
Buy = cross(C, MA(H, 10));
Sell = cross(MA(L,10), C);
buyvalue= ValueWhen(Buy, C);
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
In the figure below, the light green arrow is the actual Buy, the darkgreen arrow a raw Buy Signal. You can see that the 'Close when Buy' line (yellow line) changes after the raw Buy Signal.
thank you
cippo
I'm experiencing troubles with raw buy signals: when I ask for some buy bar info, e. g.:
buyclose = ValueWhen(Buy, C);
it happens that result refers to the last buy signals without taking in account if it is a raw signal or an actual trade.
here below an example:
SetBacktestMode( backtestRegular);
Buy = cross(C, MA(H, 10));
Sell = cross(MA(L,10), C);
buyvalue= ValueWhen(Buy, C);
Buy = ExRem(Buy, Sell);
Sell = ExRem(Sell, Buy);
In the figure below, the light green arrow is the actual Buy, the darkgreen arrow a raw Buy Signal. You can see that the 'Close when Buy' line (yellow line) changes after the raw Buy Signal.
thank you
cippo
Attachments
-
15.1 KB Views: 76
Last edited: