Risk/Reward Tool showing R multiples

Risk/Reward Tool showing R multiples

A request was made on the platform support forum to display entry price and stop loss for an anticipated trade with a risk/reward tool showing « R » multiples, R being the risk taken, without using the fibo tool reconfigured:

https://www.prorealcode.com/topic/risk-reward-tool-showing-r-multiples/

Until PRT includes this suggestion in a future version, here is a probuilder code proposal to achieve this.

Enter « myentry » and « mystop » values in the indicator parameters window, as well as the « Nbarres » number of bars to the right to draw the levels and text.

(As usual, download the file rather than copy-paste if you want parameters already created for the properties window)

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Abouadam2 • 07/20/2021 #

    it helps thanks

  2. Khaled • 07/20/2021 #

    Very useful. Thank you!

  3. jonpt88 • 07/20/2021 #

    Could someone kindly modify the code until 10R? Would that be possible…

    • JC_Bywan • 07/20/2021 #

      Hi, here it is modified for 10R:

      defparam DRAWONLASTBARONLY=true

      LeR=myentry-mystop
      OneR=myentry+LeR
      TwoR=myentry+LeR*2
      ThreeR=myentry+LeR*3
      FourR=myentry+LeR*4
      FiveR=myentry+LeR*5
      SixR=myentry+LeR*6
      SevenR=myentry+LeR*7
      EightR=myentry+LeR*8
      NineR=myentry+LeR*9
      TenR=myentry+LeR*10

      if islastbarupdate then
      DRAWSEGMENT(barindex, myentry, barindex+Nbarres, myentry) style(dottedline,1)
      DRAWSEGMENT(barindex, mystop, barindex+Nbarres, mystop) coloured(255,0,0) style(dottedline,1)
      DRAWSEGMENT(barindex, oneR, barindex+Nbarres, oneR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, twoR, barindex+Nbarres, twoR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, threeR, barindex+Nbarres, threeR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, FourR, barindex+Nbarres, FourR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, FiveR, barindex+Nbarres, FiveR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, SixR, barindex+Nbarres, SixR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, SevenR, barindex+Nbarres, SevenR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, EightR, barindex+Nbarres, EightR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, NineR, barindex+Nbarres, NineR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, TenR, barindex+Nbarres, TenR) coloured(0,155,0) style(dottedline,1)

      DRAWTEXT(“in”, barindex+Nbarres+1, myentry)
      DRAWTEXT(“stop”, barindex+Nbarres+1, mystop) coloured(255,0,0)
      DRAWTEXT(“1R”, barindex+Nbarres+1, oneR) coloured(0,155,0)
      DRAWTEXT(“2R”, barindex+Nbarres+1, twoR) coloured(0,155,0)
      DRAWTEXT(“3R”, barindex+Nbarres+1, threeR) coloured(0,155,0)
      DRAWTEXT(“4R”, barindex+Nbarres+1, FourR) coloured(0,155,0)
      DRAWTEXT(“5R”, barindex+Nbarres+1, FiveR) coloured(0,155,0)
      DRAWTEXT(“6R”, barindex+Nbarres+1, SixR) coloured(0,155,0)
      DRAWTEXT(“7R”, barindex+Nbarres+1, SevenR) coloured(0,155,0)
      DRAWTEXT(“8R”, barindex+Nbarres+1, EightR) coloured(0,155,0)
      DRAWTEXT(“9R”, barindex+Nbarres+1, NineR) coloured(0,155,0)
      DRAWTEXT(“10R”, barindex+Nbarres+1, TenR) coloured(0,155,0)

      endif

      return

  4. JC_Bywan • 07/20/2021 #

    Hi, here it is modified for 10R:

    defparam DRAWONLASTBARONLY=true

    LeR=myentry-mystop
    OneR=myentry+LeR
    TwoR=myentry+LeR*2
    ThreeR=myentry+LeR*3
    FourR=myentry+LeR*4
    FiveR=myentry+LeR*5
    SixR=myentry+LeR*6
    SevenR=myentry+LeR*7
    EightR=myentry+LeR*8
    NineR=myentry+LeR*9
    TenR=myentry+LeR*10

    if islastbarupdate then
    DRAWSEGMENT(barindex, myentry, barindex+Nbarres, myentry) style(dottedline,1)
    DRAWSEGMENT(barindex, mystop, barindex+Nbarres, mystop) coloured(255,0,0) style(dottedline,1)
    DRAWSEGMENT(barindex, oneR, barindex+Nbarres, oneR) coloured(0,155,0) style(dottedline,1)
    DRAWSEGMENT(barindex, twoR, barindex+Nbarres, twoR) coloured(0,155,0) style(dottedline,1)
    DRAWSEGMENT(barindex, threeR, barindex+Nbarres, threeR) coloured(0,155,0) style(dottedline,1)
    DRAWSEGMENT(barindex, FourR, barindex+Nbarres, FourR) coloured(0,155,0) style(dottedline,1)
    DRAWSEGMENT(barindex, FiveR, barindex+Nbarres, FiveR) coloured(0,155,0) style(dottedline,1)
    DRAWSEGMENT(barindex, SixR, barindex+Nbarres, SixR) coloured(0,155,0) style(dottedline,1)
    DRAWSEGMENT(barindex, SevenR, barindex+Nbarres, SevenR) coloured(0,155,0) style(dottedline,1)
    DRAWSEGMENT(barindex, EightR, barindex+Nbarres, EightR) coloured(0,155,0) style(dottedline,1)
    DRAWSEGMENT(barindex, NineR, barindex+Nbarres, NineR) coloured(0,155,0) style(dottedline,1)
    DRAWSEGMENT(barindex, TenR, barindex+Nbarres, TenR) coloured(0,155,0) style(dottedline,1)

    DRAWTEXT(“in”, barindex+Nbarres+1, myentry)
    DRAWTEXT(“stop”, barindex+Nbarres+1, mystop) coloured(255,0,0)
    DRAWTEXT(“1R”, barindex+Nbarres+1, oneR) coloured(0,155,0)
    DRAWTEXT(“2R”, barindex+Nbarres+1, twoR) coloured(0,155,0)
    DRAWTEXT(“3R”, barindex+Nbarres+1, threeR) coloured(0,155,0)
    DRAWTEXT(“4R”, barindex+Nbarres+1, FourR) coloured(0,155,0)
    DRAWTEXT(“5R”, barindex+Nbarres+1, FiveR) coloured(0,155,0)
    DRAWTEXT(“6R”, barindex+Nbarres+1, SixR) coloured(0,155,0)
    DRAWTEXT(“7R”, barindex+Nbarres+1, SevenR) coloured(0,155,0)
    DRAWTEXT(“8R”, barindex+Nbarres+1, EightR) coloured(0,155,0)
    DRAWTEXT(“9R”, barindex+Nbarres+1, NineR) coloured(0,155,0)
    DRAWTEXT(“10R”, barindex+Nbarres+1, TenR) coloured(0,155,0)

    endif

    return

  5. jonpt88 • 07/20/2021 #

    Thank you so much :). In the beginning I thought I cannot see the 10x return haha it is much lower in the daily chart. The CODE is now perfect – thank you again.

  6. jonpt88 • 07/20/2021 #

    Hello everyone – can anyone be so kind to add to the 10R modification the 0.50R (before the 1R logically). Thank you so much.

    • JC_Bywan • 07/20/2021 #

      Hi, with added 0.5R, happy new year:

      defparam DRAWONLASTBARONLY=true

      LeR=myentry-mystop

      HalfR=myentry+LeR/2

      OneR=myentry+LeR
      TwoR=myentry+LeR*2
      ThreeR=myentry+LeR*3
      FourR=myentry+LeR*4
      FiveR=myentry+LeR*5
      SixR=myentry+LeR*6
      SevenR=myentry+LeR*7
      EightR=myentry+LeR*8
      NineR=myentry+LeR*9
      TenR=myentry+LeR*10

      if islastbarupdate then
      DRAWSEGMENT(barindex, myentry, barindex+Nbarres, myentry) style(dottedline,1)
      DRAWSEGMENT(barindex, mystop, barindex+Nbarres, mystop) coloured(255,0,0) style(dottedline,1)
      DRAWSEGMENT(barindex, HalfR, barindex+Nbarres, HalfR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, oneR, barindex+Nbarres, oneR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, twoR, barindex+Nbarres, twoR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, threeR, barindex+Nbarres, threeR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, FourR, barindex+Nbarres, FourR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, FiveR, barindex+Nbarres, FiveR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, SixR, barindex+Nbarres, SixR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, SevenR, barindex+Nbarres, SevenR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, EightR, barindex+Nbarres, EightR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, NineR, barindex+Nbarres, NineR) coloured(0,155,0) style(dottedline,1)
      DRAWSEGMENT(barindex, TenR, barindex+Nbarres, TenR) coloured(0,155,0) style(dottedline,1)

      DRAWTEXT(“in”, barindex+Nbarres+1, myentry)
      DRAWTEXT(“stop”, barindex+Nbarres+1, mystop) coloured(255,0,0)
      DRAWTEXT(“0.5R”, barindex+Nbarres+1, HalfR) coloured(0,155,0)
      DRAWTEXT(“1R”, barindex+Nbarres+1, oneR) coloured(0,155,0)
      DRAWTEXT(“2R”, barindex+Nbarres+1, twoR) coloured(0,155,0)
      DRAWTEXT(“3R”, barindex+Nbarres+1, threeR) coloured(0,155,0)
      DRAWTEXT(“4R”, barindex+Nbarres+1, FourR) coloured(0,155,0)
      DRAWTEXT(“5R”, barindex+Nbarres+1, FiveR) coloured(0,155,0)
      DRAWTEXT(“6R”, barindex+Nbarres+1, SixR) coloured(0,155,0)
      DRAWTEXT(“7R”, barindex+Nbarres+1, SevenR) coloured(0,155,0)
      DRAWTEXT(“8R”, barindex+Nbarres+1, EightR) coloured(0,155,0)
      DRAWTEXT(“9R”, barindex+Nbarres+1, NineR) coloured(0,155,0)
      DRAWTEXT(“10R”, barindex+Nbarres+1, TenR) coloured(0,155,0)

      endif

      return

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
Iván Una differenza importante è che questo indicatore calcola i blocchi in base ai punti di rota...
Ciccarelli Franco E quindi dovrebbe essere più preciso nell'indicare le zone?
soulintact Estimado Iván, gracias por publicar estos indicadores, ¡gran trabajo! Dos indicadores que re...
Stenozar Scusa Ivan, ho trovato un'altra versione di supertrend, Kalmana Hull Supertrand, che mi pare...
kats Bonsoir, Pensez vous pouvoir répondre à ma question posée ci dessus? Ce serait vraiment tr...
Iván Bonjour L'ensemble de l'indicateur est alimenté à partir de la ligne 9 avec la définition d...
kats BONSOIR c bon merci j ai trouve ce weekend merci de votre reponse cdlt
kats bONSOIR Est ce normal que les droites se démultiplient en plusieurs droites quelle differe...
kats j ai fait une copie d'ecran mais je ne sais pas comment l'envoyer sur le site
Iván Thanks ;)
kats BONJOUR je lai mis sur du renko , il est complexe car toujours a l'envers??? Peut être ne ...
RTR Great tool again and great job, thank you! So from what I see everytime Z-Score is over 0...
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
14starwberryhill Such a wonderful work, thanks Ivan..............
larouedegann Bonjour ivan, J'utilise l'indicateur en UT 15 mn et je souhaite le dupliquer en UT 3mn ou 1...
larouedegann As tu une idée ? merci
larouedegann TIMEFRAME(15minutes) apparemment ne fonctionne pas
Iván
4 weeks ago
Iván Si lo descargas e importas en tu PRT verás que se han creado las variables para luego config...
WhyAskOZ Hi, Ivan As always you are doing great coding. The code works on my PRT, however the issu...
Iván You can delete in the last line (return) the configuration for color. Delete coloured(xx,xx,...
Iván
1 month ago
Danger Zones Indicator
Danger Zones Indicator
4
Indicators
Iván Thank you very much!
Claudio Good morning Ivan. I try to use this indicator but I receive the automatic message on line 7...
Iván Hi Claudio The indicator works fine. Maybe you are with PRT11 instead PRT12?
P. Marlowe Quite an impressive work, Iván. Extremely useful and accurate. Congratulations. Keep it up¡
lkiklkik i love it !!! thanks.
Stenozar Hi Ivan, can you translate from tradingviwe the EMA TREND METER INDICATOR? It couid be inte...
Iván Hi Yes I can. Please, create a new topic for that I will translate it.
Stenozar Hi Ivan, I've created a new topic about the indicator: https://www.prorealcode.com/topic/ema...
Iván sería así //------------------Inputs------------------------------ linreglength = 11//i...
Doddge Muchísimas gracias Iván, está genial.
superfalcio holaaa, have you run some statistics?
Doddge Hola Iván, ¿sería posible crear un screener que indique cuándo las velas coloreadas del indi...
RTR Ivan thank you for the pro-screener. I a trying to understand how to write the signals from ...
Iván Hi, Lines 62 and 63. These lines define buy and sell conditions.
el titi Bonjour, merci beaucoup pour ce partage. Je vais regarder avec attention ce script et analys...
Armand2020 Bonjour , super taf!! serait il possible de faire un poc dynamique en timeframe 5 min en mod...
philippe59139 voici ce qu'il faudrait faire ou ajouter: //poc dynamique defparam calculateonlastbars=1...
Iván
2 months ago
Iván I personally like it in daily timeframe
oliTR Many thanks Ivan, I copy/paste your code to try it but could only get a constant stable unif...
Iván Hi, I've copied the code above and it works... what asset are you trying? $indices array ...
francis59 Hello Ivan, thanks for this very nice and powerfull indicator. Could you have time to create...
Iván Hi We could find stocks with sweep on: //PRC_Sweep Institucional //version = 0 //28.0...
inverse Like the way you think Ivan ... :)

Top