Same Candle Run Analysis Tool

v10.3
Same Candle Run Analysis Tool

This Same Candle Run Analysis Tool can be used to analyse runs of the same colour candle in any market and on any time frame. Runs of up to 12 candles of the same colour are analysed.

It calculates a simulated result as if you placed a long trade at the close of a run of the same coloured candles and then closed it one candle later. This can give us an idea what has the highest probability of happening next based on historical data. Although it can be used on any time frame shorter time frames will be slow to calculate and the results fairly meaningless due to the amount of market noise. I would advise using it on anything from yearly to 4 hour time frames.

If you run it on multiple time frames then you can have a fairly good analysis of what is most likely to happen next. For example maybe there has been five years up in a row and the results tells us that the market is more likely to have a down year after five up years. The quarterly results might be five up in a row and the results tell us that the next candle is more likely to be a down quarter. The monthly results show that we have had one down month so it is more likely that the next is an up month but the weekly is showing three weeks down in a row and there is a 60% chance next week will be a down week. So we might look at the overall picture and decide to avoid long trades right now on that market.

The setting ‘CountAll’ can be turned on and off. If ON then the results are calculated using every occurrence of a run. For example a run of three up candles is in fact three runs of one up candle, two runs of two up candles and one run of three up candles and all will be calculated in the results. If set to OFF then just the first occurrence is used – so a run of three up candles for example must be a down candle followed by three up candles.

A spread amount can also be input and is deducted from the results of each trade. Set to zero if you do not want to analyse with spread.

The results returned are:
Wins – the number of trades that would have resulted in profit.
Bets – the total number of bets placed.
% – the percentage of wins to trades.
Total – the balance of all position outcomes.
AveReturn – the average return of all trades.

If you want to know what would have happened if you had gone short then obviously short trades would have resulted in the direct opposite results. So a 60% win rate for long trades would be a 40% win rate if you had gone short and a return of +1255 for long trades would be a loss of 1255 for short trades.

I advise making the indicator window full size and zooming in to the last candles to make the results more readable. Sorry if the columns do not line up very well but this is due to the limitations of text in PRT indicators.

I also have a version Same Candle Run Analysis Graph that returns the Total in graph format and I recommend using it alongside this tool as it allows you to easily see which results have been consistent over time.

I advise you to download the .ITF file and import it rather than cut and paste the code to ensure that you 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. Bard • 04/08/2018 #

    I was talking to a Machine Learning coder today who’s algos have apparently managed to get 70% accuracy on predicting Bitcoin prices. It got me thinking about your Candle Run analysis. Then I thought of the Heikin Ashi charts (and Renko) that I’ve been looking at lately – both with Joseph Nemeth who uses HA entries and this Heikin Ashi Trend strength screener: https://www.prorealcode.com/prorealtime-market-screeners/heikin-ashi-trend/
    (I can’t link using Safari as the page jumps around when hitting the link button)

    I was wondering how easy would it be to convert this very interesting code you have to HA?
    I mean can you added something like:
    Close = Close = (Open+High+Low+Close)/4
    Open = (Open + Close) / 2 ?
    (Ps/ I also can’t add code using Safari and PRC Add PRT code)

    Cheers!
    Bard

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
AGTrader Interesante, muy visual Doc. Felicidades!!!
Andraxx simplemente impresionante Dom...te sigo en youtube. Me ha gustado tu canal. Gracias por comp...
Ravindra Khanna copied it to pro real time not working. what to do?
Nicolas Screeners dont plot anything on charts.
jobswaps Hola puedes agragar marcos temporales como minimo y maximo en temporalidad del triangulo par...
p3sc4d0r c3 = Average[40](close*volume) > 3000000 Hi to everyone. I need some help with this co...
GraHal Wow! Thank you Vonasi, great idea!
Vonasi No Problem GraHal. Please share anything interesting that you find using it.
Vonasi I've made a small improvement by adding a Buy and Hold line for comparison. This line can be...
Vonasi Thanks for your thanks Real Pro and yes everyone should import the itf file to make sure tha...
Pepsmile Good job, which could be applied for a spectrum of another indicators.
Pepsmile As to better understand which parameters are better for an indicators in a specific period (...
FULVIO09 Attualmente non c'è sufficiente volatilità : la condizione "C0 = AverageTrueRange[1500](Clos...
vlongobardo67 Ma io intendevo in backtest ! Scusa non l’ho menzionato.
ciniselloftse salve fulvio .il trading sistem e sempre profittevole?
Bard Hi Violet, Thanks so much for making this screener. Bulkowski's work is thorough. I though...
Gregg Hi all, is there anyone who is using this pattern? It's been 3 days I'm trying it and I'm ...
Violet Hi Gregg, TP and SL? There are no variables by those names. The signal appears/disapp...
Marcus Quartus Aurius Thanks great job !
Dadoo Incredible workLeo. Thankyou to share you time and knowledge
tommygtb what does the criteria mean in the box on the screen is it the time frame the screener sear...
Saberi2023 Hello dear Can you please write it also in java script?
parthapersonal Great job Leo. Dear Zen83, how do you, "return them into the very last line"?
steve_ Hi! This thread is quite old, but let’s try… I’m new with Prorealcode and I’ve just di...
steve_ Hi! I've created a topic in french (translatable with Google function) here : https://www.p...
777dks hi this doesnot seem to work on forex, any ideas? thanks.
4example excellent, thank you
avatar
Anonymous Sorry I mean vertical red / green line
avatar
Anonymous Found: just remove "T coloured(r,g,b) as "Top", Bo coloured(r,g,b) as "Bottom"... after return
darbes Hi I tried to use indicator in a strategy code. But backtesting is asking to define Signalb...
avatar
Anonymous Thanks for sharing! On the other hand can we remove the vertical gray lines?
ShaunG Appreciated! Thanks 100%
tonbijl good afternoon when i enter the code i get an error message Syntax error
rispardin no entiendo como funciana este indicador, por favor alguien podria explicar como utilizarlo???
AVT No se trata de un solo indicador, pero cada linea muestra otra información, de abajo hacia ...
IV Mcm Your indicator is interesting, I evaluated its relevance with the squeeze to detect the phas...
dzim0032 J'avais oublié de mettre un commentaire pour la vente du scalper dont les règles sont justes...
andreag76 Thank you Francesco78 !
juanj What happened after August 21?
jpgcreatestrading Hi Manel, i have found this same issue, some strategies (but not all) that are written with ...
Ciccio As written some posts above, there is an update here https://www.prorealcode.com/prorealtim...
Mrmamps079 Hi Admin, I can't plug this indicator on my metatrader 4 on my laptop. When I add it on my i...
Nicolas Sorry but we do not provide any help for mt4 users. Our website is dedicated to ProRealTime ...
Maxime Leleux Nice screener but the 2 candelsticks around the doji should be long sticks (red and green). ...

Top