Stop trading for the day if losses are too big without QUIT

Forums ProRealTime English forum ProOrder support Stop trading for the day if losses are too big without QUIT

Viewing 6 posts - 1 through 6 (of 6 total)
  • #196488

     

    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.

     

    However, this does not work.

     

    Does anyone know how to solve the issue?

     

    Thanks!

    <!–more–>

     

    <!–more–>

    #196510

    Try this one (it will pause 1 hour after a big loss):

    1 user thanked author for this post.
    #196516

    Link to above added as Log 325 here …

    Snippet Link Library

    2 users thanked author for this post.
    #196618

    This is exactly what I was looking for – thanks! 🙂

    #196619

    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
    • StrategyProfit = 0
    • SumSP = 0 – -500 = 500 instead of -500?
    #196628

    The two last GRAPH lines will show the answer.

     

    2 users thanked author for this post.
Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login