Hello,
How to avoid re-entry after booking profits.
My trading system re-enters the long after booking profits.
What should I add to stop re-entering the trade if it has booked profits ?
Hello,
How does the profit are triggered? By takeprofit function?
Code:
donotbuy = positionperf(1)>0 and longonmarket[1] // 1 candle ago
donotsell = positionperf(1)>0 and shortonmarket[1] //1 candle ago
And if you want to get fancy:
//FALLACY - Runs are not statistically independent to trend//
Losses = positionperf(1)<0 and positionperf(2)<0 and positionperf(3)<0
Streak = positionperf(1)>0 and positionperf(2)>0 and positionperf(3)>0
LLL = (tradeprice(1)>tradeprice(2) and tradeprice(3)>tradeprice(4) and tradeprice(4)>tradeprice(5) and tradeprice(5)>tradeprice(6) and Streak and positionperf(4)>0 and positionperf(5)>0)
SSS = (tradeprice(1)<tradeprice(2) and tradeprice(3)<tradeprice(4) and tradeprice(4)<tradeprice(5) and tradeprice(5)<tradeprice(6) and Streak and positionperf(4)>0 and positionperf(5)>0)
//