Not logged in
Viewing 3 posts - 1 through 3 (of 3 total)

Forums>StrategyQuant>General Discussion>how to code close a position after diminution of profit to a certain level

  • #197885 |
    Participant
    15 Posts

    Hello,

    How can I code to take profit at a minimal level after a diminution of it?

    Is this correct:

    Close100

    IF (IsBarOpen is True) && (((Open P/L (( 100 )) > PL1)
    And (Open P/L (( 100 )) <= PL)))
    THEN
    Close order with Magic Number: 100;

     

    Thanks in advance.

     

    Arthur

    #197891
    tomas262
    Administrator
    1823 Posts

    Hello,

    you can use the “move SL to break-even” function that can be setup directly with an order to protect your position against becoming a loser trade. Let me know if you need an example for this or if you meant something else

    #197896
    Participant
    15 Posts

    Ok, thanks.

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

You must be logged in to reply to this topic.