Not logged in
Viewing 2 posts - 1 through 2 (of 2 total)
  • #112841 |
    112 Posts

    Dear Admin,


    I have an testing EA that is working fine but occasionally it will end up in a rabbit hole(vicious loop) that cause huge losses on backtest. 


    Is there any way to stop participating a trade after 2 consecutive losses within the a candle,  a period a time? Also, how would you exit the EA from this loop?  


    Thank you. :)





    Attachments in this forum are visible only for registered users.
    Mark Fric
    1182 Posts

    you can use Strategy Control -> Total Losses to count total losses in the last X trades, but there’s no function to give you total losses in some time period.


    It would have to be done by a custom programming by creating a custom function for that.


    But you can maybe create some conditions by combining Total Losses with another function Bars Since Order Closed which returns number of bars since the last trade closed.

    StrategyQuant architect

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.