Pattern Recognition Probabilities [racer8]

Brief 🌟
Pattern Recognition Probabilities (PRP) is a REALLY smart indicator. It uses the correlation coefficient formula to determine if the current set of bars resembles that of past patterns. It counts the number of times the current pattern has occurred in the past and looks at how it performed historically to determine the probability of an up move, down move, or neutral move.

I'd like to say, I'm proud of this indicator 😆🤙 This is the SMARTEST indicator I have ever made 🧠🧠🧠

Note: PRP doesn't give you actual probabilities, but gives you instead the historical occurrences of up, down, and neutral moves that resulted after the pattern. So you can calculate probabilities based on these valuable statistics. So for example, PRP can tell you this pattern has historically resulted in 55 up moves, 20 down moves, and 60 neutral moves.

Parameters 🌟
You can adjust the Pattern length, Minimum correlation, Statistics lookback, Exit after time, and Atr multiplier parameters.
Pattern length - determines how long the pattern is
Minimum correlation - determines the minimum correlation coefficient needed to pass as a similiar enough pattern.
Statistics lookback - lookback period for gathering all the patterns in the past.
Exit after time - determines when exit occurred (number of periods after pattern) ; is the point that represents the pattern's result.
Atr multiplier - determines minimum atr move needed to qualify whether result was an up/down move or a neutral move. If a particular historical pattern resulted in a move that was less than the min atr, then it is recorded as a neutral move in the statistics.

Thanks for reading! 🙏
Good luck 🍀 Stay safe 😷 Drink lots of water💧
Enjoy! 🥳 and Hit the like button! 👍
Notas de prensa: After receiving feedback about how slow the script loads, I've decided to change the default parameters so that it loads faster. Enjoy ;)
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con las Normas internas. Puede marcarlo como favorito para usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?


Hope you know how amazing this is! I made a small conversion to your code -
My mod checks for predictive capability of both a source input and closing price, then checks the correlation between those two predictive capabilities. Sort of like very basic machine learning! Its like an auto-adjusting backtest! Slapped strategy stuff on it - amazing work. Really. And I've so far only tested it on "Function Geometric Moving Average" (500 length) so far haha... and it already looks good. Ridiculous. Kudos. If this makes me not poor you get a chunk, sir!

+1 Responder
haddy7 burgercrisis
@burgercrisis, have you published it? thanks
@haddy7, I have not, I think the idea has potential but what I realized is that either need more lookback length then TV allows to have truly lasting results, or the ability to do a few more comparison calculations, but TV script caps out before it gets really good. So rather, someone with Python skill should apply the concept there with thousands of bars of 5min charts IMO. I suppose any time some (especially me) is this excited about something, take it with a grain of salt... TV would not allow anything so amazing on their platform ;)
I want to learn Python... So many of my best ideas were beyond TVs ability in terms of how much computation TV is capable of, or how much of that code limit I had to waste on teaching it things it should know, thus limiting the actual strategy or at the very least slowing load time down considerably.

Also I only publish editted scripts if the OP grants access, per TV rules. I didn't PM him but he probably wasn't too enthused when he saw my comment cause he knew that TV has limits and I was in a pipedream ahaha, happens
+1 Responder
racer8 burgercrisis
@burgercrisis, ahaha :D May your luck persist!
@racer8, Hahaha, turns out TV simply doesn't have enough power to have a lasting and self-regulating "machine learning" strategy on here lmao... It is a great concept though and if I ever learn Python I will apply it there. Who says machine learning and TA can't get along?

Since then I've gone back to my old bot work lol. I'm basically running several basic single-indicator strats right now while I build a filter library that I will apply to them. Right now they're doing pretty good though! I have 7 running on BTC and 7 running on LINK, and right now almost all of them are at or near peaking profit and when some of them are weaker the rest tend to do a good job hedging against that.

I think if we could graph our "luck" as traders, it would probably look much like the charts we trade! hahah, sometimes I think the most important thing for a trader is just knowing when to retire :P
+1 Responder
So creative, looks great!
+1 Responder
racer8 stevenwalter0
@stevenwalter0, always a pleasure :)
Down moves never seem to exceed neutral or up moves... is this due to a preponderance for markets to go up? Or should neutral be considered a down inclination. Even Mar 2020 was considered neutral
racer8 jroche1973
@jroche1973, for stocks, yes, markets tend to go up.
Hi, it looks interesting. May you explain little on the usage please, like some rules for entrance/ exit, etc ... if any?