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
Goldotor Thank you for sharing this indicator. That's a great work.
Stefano1234 there is an error: Define the variable: prd, showBreak, showPattern, showPvts
romanelli4 molto interessante e grazie ma come faccio a trasformarlo in trading system? grazie per l...
larouedegann Très Très bon indicateur. Je l'utilise en 1minute
NEOMKEY Excelente trabajo. Lo uso también en scalping de 1 minuto.
philippe59139 bonjour zeiiermantrading , merci pour ton excellent travail, je me suis permis de rajouter ...
jacquesgermain Hello IASD it's normal , when this occurs, uncheck RSI and MFI line and click then the MAC...
emiliobercial Thank you very much for sharing!
Carlose estoy de acuerdo con IASD Esta muy bien el MAD y el indicador en el precio no se ven bien...
Nicolas
9 months ago
Florian Hello Nicolas, This indicator repainting ?
Nicolas It's impossible for it to repaint the values of the past.
elcortijoverde Muy buen trabajo.Intuitivo y claro.Gracias por tu dedicación y aportación.
FXtonio Nicolas.... MERCI 1 millions de fois, cet indicateur gagne dans 75% des cas en scalping m1 ...
davy42 bonjour, à quel moment apparait le fleche, à l'ouverture ou la fermeture de la bougie? merci
Freezer Bonjour, est-il possible d'ajouter une alarme sonore sur PRT à l'apparition des flèches ? Br...
Nicolas
10 months ago
B-Xtrender
B-Xtrender
8
Indicators
616248 Bonjour Nicolas, Peux tu nous expliquer le principe de fonctionnement ? Ou nous mettre un...
Nicolas Le lien vers l'article IFTA de l'auteur est dans le post déjà :)
P. Marlowe Very poweful indeed. It deserves close attention. I really appreciate very much IFTA backgro...
JS
10 months ago
Trendilo
Trendilo
0
Indicators
JS
10 months ago
bousalahane merci pour le partage de cet l'indicateur, j'ai rajouté un autre indicateur pour faire une s...
joaoarcher Hi, thank you for the this. Is it possible to create a screener from this indicator, so that...
luxrun
10 months ago
Gabriel_HO Hello, thank you for your indicator, it indicates well the gaps area, I am happy with it as...
geroniman super Ivan, excellent.Muchas Gracias.
Nicolas
10 months ago
Anthony2A Bjr, j ai des erreurs sur la ligne 69, 74, 78 et 80. sur drawcandle drawtext et endif. si ...
Lucas0000 Hello, Congratulations on this programming, it seems incredible to me, I am new to this but ...
plbourse Hello, I am trying to use this singal (in fact I have converted it to an indicateur giving B...
Gianluca Amazing, thank You for your contribution!
Alex Spioglou Thank you for featuring my work, and I hope you found it useful. Mind the paper was publ...
NEOMKEY Hi, I can watching it´s very interesting your work on Tradingview Platform. You could contri...

Top