Strategy with Risk Reward Ratio 1/3

Forums ProRealTime English forum ProOrder support Strategy with Risk Reward Ratio 1/3

Viewing 5 posts - 1 through 5 (of 5 total)
  • #151907

    Hello,

    I wish to test a risk/reward ratio of 1/3 on my trading strategies based on the SL level.
    For example, for a buy, if my SL is “close < BollingerDown" and the distance between the current price and the current BollingerDown is 25pips, the TP will need to be at 75pips. Is it possible to calculate this level of TP only when entering the position to keep a fixed TP (which I wish) or will the algo recalculate the distance at each new candle which will change the TP at each calculation (which I do not wish). Here is the code for this example, how to improve it?

    #152524

    At line 4 you are NOT calculating a Stop Loss, yiou are just assigning a logical value (1 or 0) to C1 whenever CLOSE is below the lower band.

    At line 16 you

    Change it to:

    so C1 will retain the price of the lower BB.

    Then you’ll have to move lines 3 through 9 within the IF…ENDIF where you have written the BUY instruction, to prevent C11 and C12 from changing each new candle.

    Then you need to replace line 13 with:

     

    #153290

    Hello @robertogozzi,
    Sorry but I didn’t understand how to do it.
    For me, the calculation logic is to get the distance between the entrance fee and the SL, then multiply this distance by 3 to get the TP.
    Apparently I’m wrong unless it’s my way of coding that’s wrong.
    Can you help me with an example or the correct code please ? 🙂

    #153297

    My fault, sorry.

    You have to replace line 4 by:

    and line 13 by:

     

    #153302

    Use the @ sign only when you have to address someone among many users.

    In this case it’s just the two of us.

    Thank  you 🙂

     

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

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