Hello,
How do you code the condition to accumulate orders only as long as the strategy is positive?
Thank you
Francesco
Using StrategyProfit > 0 and PositionPerformance > 0?
Thank you Grahal but I meant a slightly different thing:
I want the system to cumulate orders up to a certain point when on the market, not to increase the size of a new trade as long as the strategy is positive.
So I need to use DEFPARAM Cumulate orders = true.
Do you see what I mean or Im getting it completely wrong?
Thaks
I won’t try and code it (you’re better than me! :)) but what about a boolean condition so you only accumulate orders when StrategyProfit > 0 and PositionPerformance > 0?
Ah gotcha now … you want to cumulate orders only if the profit is increasing on each bar?
So could you use Positionperf[1] > Positionperf[2] > Positionperf[3] etc??
Thanks Grahal, I will try and let you know 🙂
Hi @Francesco78
did you have any luck with this?
I too am also trying to get cumulating orders to operate only if strategyprofit>0, and haven’t quite found a reasonable way to do this yet.
Thanks,
Finning