How can i modify trailing stop ATR based when i will be in profit

Forums ProRealTime English forum ProRealTime platform support How can i modify trailing stop ATR based when i will be in profit

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

    Hello to all,
    I have a trailing stop ATR based and would like to modify it
    (Lowering the ATR) multiplier to get out earlier if you turn when i’m in profit
    to avoid going in loss.

    Could you tell me how to do it, please, to find out if I’m in profit and how much euro?
    This is the trailing stop code:

     

    thanks

    #6127

    You can calculate the actual position profit by making the difference between the open price of a position with TRADEPRICE and the actual close.

    Then, multiply this difference with the point value of the instrument : POINTVALUE

    And you’ll get the profit of the current position, but without fees of course

    #6363

    Hi Nicolas,

    thank you very much.

    best regards,

    Aldo

    #13823

    Do you have an example? because I create a code that is the same….but it doesn’t work….

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