No trade in a range

Forums ProRealTime English forum ProOrder support No trade in a range

Viewing 4 posts - 1 through 4 (of 4 total)
  • #86341

    Good morning gentlemen,

     

    I have an issue in my code.

    Here what I want the code do: when a stop loss is touched, a variable is set to 1 and a “range” is set too (+X and -X points at the Tradeprice(1) )

    Here, visually:

    In ordrer to do that, I code this:

     

    When I backtest it, some trade don’t respect the rule “Forbidden Traading Range”.

     

    I  think I miss something, but I don’t know what 😉

     

    Thank you for your help.

     

    I wish you a good day.

    #86350

    Start line 3 with ONCE, otherwise it will ALWAYS be false!

    #86358

    Start line 3 with ONCE, otherwise it will ALWAYS be false!

    …or just delete line 3 as the value of NoTrade will always start at zero!

    #86375

    Thanks you both!

     

    Have a good day 😉

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

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