Hi all, I am looking for a way to temporarily stop the strategy from trading once losses have reached a certain amount for a certain amount of time without using QUIT and having to restart the strategy again. The strategy runs on a 5min timeframe.
The workaround I was trying was to use was to go onto a higher timeframe of 1h and add strategyprofit for the last 3 hours and make “AND NOT pause” a condition to open trades. If strategy profit for the last 3 bars is below a certain number, e.g. -500, it should not open new positions. In my mind, it should then start trading again after a while since strategyprofit[3], [2] and [1] should all be 0.
Just a quick question for my understanding: Why are we subtracting MyProfit[1] instead of adding it? If MyProfit is negative, e.g. -100, would using subtraction not lead to SumSP be “higher” than it actually is?
Example:
StrategyProfit of previous 1h close was -500 -> MyProfit = StrategyProfit[1] = -500
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.