Red Green Breakout Probability

v10.3
Red Green Breakout Probability

This indicator sets levels above and below the last closed candle and then calculates how many candles in the history managed to reach those levels. This is then displayed on the latest still forming candle as five lines below the previous low and five lines above the previous high with the percentage of candles that have reached this level in the past.

The results are calculated separately depending upon whether the previous candle was a red candle or a green candle.

The spacing of the lines can be altered using the step variable. So you might want to see how many red candles reached 5 pips, 10 pips etc above and below the previous high and low. Alternatively the spacing (and historical calculations) can be based on a percentage of the closing price. If ‘Percentage’ is set to anything other than zero then percentage spaced lines are used otherwise if it is set to zero the spacing is based on the ‘Step’ value.

It is also possible to set the start date for calculating the history. If the date is set to zero then it analyses all of the candles on the chart.

So for example if yesterday was a green candle we might see that history tells us that the high has been hit or passed 75% of the time after a green candle but the low only 33% of the time. We can then also see that the high plus 0.5% has been hit 50% of the time and the low minus 0.5% only 21% of the time and so on.

Hopefully this indicator can help with understanding the probability of a breakout or assist in setting stop loss levels based on where a price is most likely or least likely to go.

I advise downloading the ITF file and importing it to get full functionality.

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. juanj • 08/12/2019 #

    A nice enhancement for this would be if you could calculate the probability of the monthly close graphed on a weekly TF (or Weekly close graphed on a Daily TF) but update the probability after each bar close based on the level of the close respective to the previous Months close (Weekly TF) or Weeks Close (Daily TF). This means that statistically speaking the accuracy of the probability should increase as the Week (Daily TF) or Month (Weekly TF) progresses.

  2. Maxime Baudin • 08/12/2019 #

    Good job! 🙂

  3. Vonasi • 08/12/2019 #

    juanj – yes there are plenty of possibilities and if I can find some time then I will work on them but I’m very busy with other stuff right now!

  4. Vonasi • 08/12/2019 #

    Thanks for the compliments Maxime Baudin.

    • JJ Tec • 08/12/2019 #

      Muy interesante ¡¡¡… gracias X el aporte.

  5. HStrader • 08/12/2019 #

    Thank you for your nice indicator

  6. Bard • 08/12/2019 #

    Hi Vonasi, thanks for this great idea. Obviously the indicator works for everyone commenting here but when I added it to my library and added it to a €/$ chart it just leaves a blank space? Have PRT changed the import? Normally it searches my Downloads folder but this time I had to drag and drop the itf file? Tried different perameters and left the start date as 0. Also tried 20200101 as well. I have 1000 units on the chart.
    Any ideas? Cheers!

  7. Vonasi • 08/12/2019 #

    You are applying it to the price chart? As far as I am aware nothing has changed with the import procedure. Dragging and dropping does not sound right to me. I will test.

  8. Vonasi • 08/12/2019 #

    I just imported and applied the indicator with no issues at all. Must be operator error at your end or something to do with that weird computer you use! 🙂

  9. Bard • 08/12/2019 #

    Yeah it’s weird, never seen the drag and drop before? https://www.dropbox.com/s/y1n9hlhsfyn7gk0/PRTdraganddrop.png?dl=0

    Applied it to the Price chart and all good now thanks.

    God damn Macbooks! Already, after only two years, had to replace all the USB-C sockets this week…

  10. Vonasi • 08/12/2019 #

    I can see it on the chart in your image! Zoom in on the last candle.

  11. Bard • 08/12/2019 #

    This is really a fascinating indicator Vonasi! Particularly when it gives probabilities that are sometimes contrary to how the previous history of candles appears. I was wondering is there an easy way of adding a formula to the code that would show standard deviations as well as steps (ticks, pips) and percentages? Great work.

    How would you automate it with the simplified creation tool if you wanted to go long only if the Red/Green Prob is over 80% and ditto for shorts?

  12. Lotech123 • 08/12/2019 #

    I am a bit late finding this interesting tool, but have found it useful already.
    Please can anyone tell me how to increase the font size for the displayed data, probably to at least twice its present size as it is quite small on my screens. Thank you

  13. Vonasi • 08/12/2019 #

    In the all the DRAWTEXT lines of code change the 10 to a larger number.

  14. Lotech123 • 08/12/2019 #

    Vonasi. Thank you for a very prompt response.

  15. Lotech123 • 08/12/2019 #

    Following on from your earlier advice, I changed the ‘drawtext’ command to various sizes before settling with 20, instead of 10 (default) and it it now easily read.
    I am running the utility on 3 FTSE charts: Volume (1000), 2H and Daily, so next week should be very interesting after the turmoil of the coronavirus panic.

  16. Maxime Csls • 08/12/2019 #

    Hello Vonasi, thank you for your work. Is it possible to draw this lines on past candles other than the [1] ? I would like to analyse each time this appears :
    c1 = open > high[1] and close[1] > open [1]
    Thank you for your help
    Cheers

    • Vonasi • 08/12/2019 #

      If you are on v11 then you can change the DRAWSEGMENT instructions to DRAWRAY. You will need to modify the second BARINDEX value to BARINDEX+n where n is how far into the future you want to draw the lines.

  17. sycomore • 08/12/2019 #

    Ça ne fonctionne sur aucune valeur, je dois être trop con…

    • Nicolas • 08/12/2019 #

      il faut appliquer l’indicateur sur le prix.

  18. AntoGH • 08/12/2019 #

    Je crains de ne pas comprendre… Cela indique la probabilité de la prochaine bougie ou donne la probabilité de la bougie actuelle ? (je n’ai pas les cours en direct sur prorealtime est ce que cela marche différemment ?)
    Did it show the probability of the next candle or the probability of the current (last fully formed)candle ?

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar

+13 more likes

Related users ' posts
SAM
7 years ago
Elsborgtrading By adding the inside bar breakout failure candle, which is the next bar after the inside bar...
DegoodBoby very nice indicator but pls how can we use the indicator without the text (inside bar/brea...
ShaunG Hi Elsborgtrading thanks for this indicator. I was initially looking for a "IDnr4" which I c...
pascal3431 Salut Doc , Je ne vois pas ce qui fait office de stop dans ce code .. un retour dans le nua...
Doctrading Bonjour, Il s'agit juste d'une stratégie où on est toujours en position : soit à l'achat / ...
pascal3431 Bonjour, après quelques essais sur EUR/USD au M15 en rajoutant(car sinon on est en perte) u...
Doctrading Nice Job ! Here is my version of the code :  KBO = 0 Tenkansen = (highest[9](high)+lowe...
gefinance Thanks for this code. The only thing left missing is the time lapse, otherwise, lots of old...
danhei Hi I am tryong to figure out how trist strategy works. I am new to pro real time. Can some...
Plop61 Hello,Thank you for sharing this beautiful strategy.Is it possible to indicate the code for ...
NoName Thank you very much for this fascinating trading system. It is still proving to be extremely...
larouedegann best with this hour IF TIME =081000 THEN plushaut=highest[2](high) plusbas = lowest[2](lo...
CanAny1Trade Hi! I'm trying to put together a similar indicator but struggling. I want to mark the NY Pit...
ALE Hi Pat This code was nothing more than an experiment
pat95162 Hi Ale Do you have same results as me ? The strategy works very well in 2017 and now in 2-...
Nicolas Built on the history means that it suits the history. Always develop ideas in In-Sample peri...
Nicolas Line 10: Volume of current candlestick must be at least 1.5 higher than the previous one and...
bibifricotin Bonjour Nicolas je viens d'essayer ce screener mais j'obtiens des résultats curieux .Aujourd...
Nicolas Décalage si compte gratuit fin de journée ?
Cosmic1
8 years ago
Cosmic1 Lets discuss here: https://www.prorealcode.com/topic/cac-breakout-ported-to-other-markets/
rejo007 hello, anybody use thi strategy for a long time? thanks
abacus23 Hi, I have been trading this strategy and it seems to work quite well recently. Is there a...
Elsborgtrading No that is wrong :) 1st runs always- then only run 2nd if 1st is on market with positions(ar...
Elsborgtrading It can only be fully automated if IG change minimum SLto 7 at night on DAX multi timefra...
Elsborgtrading A small example. the strategy would have opened 3 position on Dec 4th 2016 and keept it for ...
Cosmic1
8 years ago
Cosmic1 @JadeDB What times are you putting in?
sincitytrader I tried this one out recently,  and wasn't profitable for me.
Cosmic1 Yes, not great lately. I stopped this live at the end of last year. Will wait to see when th...
Philip Raphael Hey! Thank so much for sharing this wonderful indicator! I have always tried to code a simil...
CKW Hi Philip, What do you mean "Years" are not defined ? candle? If to code yearly candle size...
dakaodo Years not defined was probably b/c Phillip copied and pasted the code into PRT instead of im...
Doctrading Hello, As I said, I didn't use spread for the screenshot as I don't trade Gold and I don't ...
smurfy Hi, I had been losing on gold and after I manually go through the 5min chart using IG and w...
eiffel Hi Smurfy, hope you are still there... I would like to help you to write and test the code.
Reiner
8 years ago
Nicolas You should join and read the forum thread about this strategy. There are plenty of different...
Reiner Hi djtaktik and welcome, I have answered your question in the related Pathfinder forum beca...
danver34 is this version the definitive one or from the original one have there been modifications to...
GraHal Ooops got that excited I sent that last one twice! ha (and can't delete it, sorry) I got it...
Eric n = 3  dont forget to allow 3 contract in proorder
UkCoopDownUnder Tried EURUSD GMT and GMT -1, as far back as I can go, Nov 2018 on 15mn Tf, 22% loss
hvluthy@sunrise.ch I'm very interested to try out your strategy, but as a bloody newbie I need some help regard...
Scalp Hola Adolfo, tengo una variante de tu estrategia, pero no se programar, me puedes ayudar al ...
ALZ Hi, I tested this strategy and that doesn't work.. strategy is losing.. Does anyone curr...
Doctrading Hello, Someone asked me something (his results seemed to be different) on my email, but it ...
Glen Marquis Not your best..So what is your best strategy? :)
Adolfo Onrubia Ups! Sorry. Variable "S" is to set an specific Spread if needed. Could be "0", or the distan...
GraHal Hi Adolfo, big thank you for your code, but I am a bit confused. Spread is the difference b...
Meta Signals Pro Hi, For me there is a mistake here L32 maxriesgo = round(equity*riesgo) => round(equ...
Dave Hi, I'm new to coding and have been trying to modify the code a little to backtest an idea I...
Nicolas Better use the forums for coding assistance please. You'll get more results there for sure.
Dave Apologies - only just learning the site layout. Maybe you could delete the post?
Nicolas You can try this code for buy and hold curve line: capital = 10000 mylot = 2 i1 = capi...
soukenson Bonjour Nicolas, Je ne comprends pas où ajouter le code que tu as a donné dans le code initi...
Nicolas Tu veux parler du code pour comparer avec le "buy and hold" ? Si oui, tu as tout ce qu'il fa...

Top