TradingView
KioseffTrading
30 Th08 2023 17:53

The Next Pivot [Kioseff Trading] 

SPDR S&P 500 ETF TRUSTArca

Mô tả

Hello!

This script "The Next Pivot" uses various similarity measures to compare historical price sequences to the current price sequence!

Features

  • Find the most similar price sequence up to 100 bars from the current bar
  • Forecast price path up to 250 bars
  • Forecast ZigZag up to 250 bars
  • Spearmen
  • Pearson
  • Absolute Difference
  • Cosine Similarity
  • Mean Squared Error
  • Kendall
  • Forecasted linear regression channel




The image above shows/explains some of the indicator's capabilities!



The image above highlights the projected zig zag (pivots) pattern!

Colors are customizable (:



Additionally, you can plot a forecasted LinReg channel.

Should load times permit it, the script can search all bar history for a correlating sequence. This won't always be possible, contingent on the forecast length, correlation length, and the number of bars on the chart.

Reasonable Assessment

The script uses various similarity measures to find the "most similar" price sequence to what's currently happening. Once found, the subsequent price move (to the most similar sequence) is recorded and projected forward.

So,

1: Script finds most similar price sequence
2: Script takes what happened after and projects forward

While this may be useful, the projection is simply the reaction to a possible one-off "similarity" to what's currently happening. Random fluctuations are likely and, if occurring, similarities between the current price sequence and the "most similar" sequence are plausibly coincidental.

That said, if you have any ideas on cool features to add please let me know!

Thank you (:


Bình luận
Trendoscope
Great stuff as always.
KioseffTrading
@Trendoscope, Lord V!!! Thank you for taking the time to comment man. I appreciate it as always (:
MarcelloEC
Great work
KioseffTrading
@MarcelloEC, Thnak you Marcello! Very much appreciated (:
RicardoSantos
great stuff :)
KioseffTrading
@RicardoSantos, Ricardo!! Thank you man; your feedback is always very appreciated! (:
dusktrader
Amazing work. Do you think any particular Similarity Calculation is better than others? I noticed if I change it, they all seem to generate different predictions. But if I scroll back I can see where it matched a similar looking price action pattern. It's hard to determine which Similarity Calculation may be more accurate.

Also it seems like setting the Correlation Length to the max 100 would be recommended, since it contains more information to match the pattern. Seems like more is better, but I'm curious your thoughts on this.
Sh_ara
This was great Kiiossef, I have some suggestions to make the idea of ​​this indicator better and more complete, which I will include here after a closer look.
KioseffTrading
@Sh_ara, Thank you Sh_ara!!

I apricate the positive feedback; your thoughts will be very appreciated (:
alis345
dear kioseff nice stuff. But i have confusion that is when i apply this indicator on different time frames on a same script it shows the opposite trend e.g. in 4 hr time frame it shows downtrend for next 15-20 days but when i apply it on daily it shows uptrend. can u plz explain how will i decide to which way i go. ur response will be highly appreciated.
Thêm nữa