Problem with setting a break even level

Forums ProRealTime English forum ProOrder support Problem with setting a break even level

Viewing 7 posts - 1 through 7 (of 7 total)
  • #192872

     

     

    I have an algo that closes half my position and sets a breakeven level .

    My problem is that the instruction to exit at the break even level is ignored and exit happens at the stop level

    #192876
    #192878

    It’s due to narrow SL and TP, try changing both to, say, 40 or 50 andit’ll work.

     

    1 user thanked author for this post.
    #192879

    That did not work sadly.Still ignoring the breakeven .

     

    #192883

    Yes, there were a couple of additional issues:

    • use STOP instead of LIMIT to exit, as you are placing a pending order to exit at WORSE price
    • use a variable (I named it FLAG)  to signal that an exit at breakeven has been triggered, as it must be placed each new bar until hit (or TP is hit, of course); the exit order must be outside the conditional IF…ENDIF block.

    I tested this code on Dax, 4h TF:

     

     

    1 user thanked author for this post.
    #192885

    Thanks. That worked but I need to keep stop and target at 8/12 or elase I get a worse result

    #192913

    Keep in mind that you can now use the SET STOP BREAKEVEN instruction which is the best way to ask the broker your stoploss at breakeven

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

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