Stay flat after a big loss

Forums ProRealTime English forum ProOrder support Stay flat after a big loss

Viewing 12 posts - 1 through 12 (of 12 total)
  • #65635

    Hi ! what would be the code to be flat after a big loss (like 5%) ?

    #65637

    I started a new topic since your question had nothing to do with FLATAFTER.

    To tell your system to stay flat after a big loss (5% in your case) you have to:

    1. set a variable so that trading is enabled (say TradeOn = 1) and add this condition to Your_Conditions to start a new trade
    2. set a variable with your initial Equity
    3. compare the current strategyprofit agains the previous one AFTER exiting a trade (when OnMarket[1] is true while OnMarket is false)
    4. if the difference is >= -5% you’ll have to set the above said variable TradeOn = 0 so that no more trades are started till you want (you may want to set further conditions to reenable trading)
    5. update your equity

     

    2 users thanked author for this post.
    #65664

    Hi Robertogozzi !

    Thank you for your answer,

    I think I found simpler in PRT manual :

     

    and thats it ! The goal was to cut the system alltogether in case of an emergency. I put a fixed value, but I am sure it is possible to put a pourcentage instead, tell me what you think.

    Chears !

    #65671

    The code you found is useful when you want to stay flat after a big loss on the whole equity, so that if you earn 7%, then lose 10% you will keep trading.

    My code, instead, even if you have earned, say, 30%, once you have a big loss it stops trading, so that you won’t lose all of your profits!

    It’s up to you to set your own strategy that best fits you!

    #65674

    Oh ok, this is a smart one, thank you !

     

    #65676

    We were just discussing something similar to what you have requested on this thread yesterday:

    https://www.prorealcode.com/topic/backtest-sorting-by-lowest-drawdown/#post-65589

     

    #65678

    My code, instead, even if you have earned, say, 30%, once you have a big loss it stops trading, so that you won’t lose all of your profits!

    I’ve added your code to my Snippet Finder database

    Snippets – Find Here

    PS Anybody can add your own or anybody else’s snippets … please try, it takes less than 1 minute.  

     

    #65679

    Yeeeah ! I love being here, great community !

    Talking about snippets, you could add the one for position sizing, I think it was perfected on the Reiner´s Pathfinder thread, and it is great, just an idea…

    #65682

    Hi irioton

    Please could you add the snippet you mention or any other, then the task is shared?

    I’m trying to pull together the google sheet so that snippets can be found, sorted and accessed by anybody all in one place.

    Thank You
    GraHal

    #65683

    @GraHal, thank you. I’ll add something to that sheet as soon as I can!

     

    1 user thanked author for this post.
    #65685

    Okay, will do, right away !

    #65687

    Money management snippet : OK.

    1 user thanked author for this post.
Viewing 12 posts - 1 through 12 (of 12 total)

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