OPEN-SOURCE SCRIPT
Aggiornato Hindsight Trend

Non-realtime but highly accurate trend analyzer with only one fundamental parameter (period aka "minimum trend length")
Basically Hindsight Trend is pivot points on steroids (handles many cases much better). Plus it shows the trend line.
Period
I usually like periods of 10, 20 or 30.
The indicator's delay is identical to the chosen period.
You can actually try a low period like 4 or 5 to get something resembling a realtime indicator.
Uptrends are based on candle lows, downtrends are based on candle highs. So it is possible to have an uptrend and a downtrend at the same time.
Triangles
At trend start, a triangle is drawn. (Trendline isn't always there if the trend didn't last that long.)
Triangle size shows how long the high or low that started the trend remained unbroken. E.g. with period 20: Small triangle = 20+ candles, medium triangle = 40+ candles, big triangle = 80+ candles. So a big triangle marks an important reversal point.
How Hindsight Trend works
Whenever a candle completes, its high and low are saved as potentially "notable" points. A high or low is the more notable the longer it stays unbroken (= not touched again by price).
Now we simply take the notable highs and lows (as in, staying unbroken at least for the user-selected period)... and connect them together - if they are close enough to each other (less than "period" candles away). And decorate the first point in each trend with a triangle.
We only know whether a point is notable after "period" more candles have printed, so that's where the indicator's delay comes from.
Finally we divide the period by 2 and look at highs and lows which are unbroken for that shorter time. While they are not fully "notable" as defined above, we'll call them "semi-notable". Those points are only considered at the end of a trend, and help us extend the trend line a bit further.
Basically Hindsight Trend is pivot points on steroids (handles many cases much better). Plus it shows the trend line.
Period
I usually like periods of 10, 20 or 30.
The indicator's delay is identical to the chosen period.
You can actually try a low period like 4 or 5 to get something resembling a realtime indicator.
Uptrends are based on candle lows, downtrends are based on candle highs. So it is possible to have an uptrend and a downtrend at the same time.
Triangles
At trend start, a triangle is drawn. (Trendline isn't always there if the trend didn't last that long.)
Triangle size shows how long the high or low that started the trend remained unbroken. E.g. with period 20: Small triangle = 20+ candles, medium triangle = 40+ candles, big triangle = 80+ candles. So a big triangle marks an important reversal point.
How Hindsight Trend works
Whenever a candle completes, its high and low are saved as potentially "notable" points. A high or low is the more notable the longer it stays unbroken (= not touched again by price).
Now we simply take the notable highs and lows (as in, staying unbroken at least for the user-selected period)... and connect them together - if they are close enough to each other (less than "period" candles away). And decorate the first point in each trend with a triangle.
We only know whether a point is notable after "period" more candles have printed, so that's where the indicator's delay comes from.
Finally we divide the period by 2 and look at highs and lows which are unbroken for that shorter time. While they are not fully "notable" as defined above, we'll call them "semi-notable". Those points are only considered at the end of a trend, and help us extend the trend line a bit further.
Note di rilascio
Fixed a typo in the settingsNote di rilascio
Fixed the script for non-Premium membersNote di rilascio
Optimized the script to run fasterNote di rilascio
Fixed the trendline distance logicNote di rilascio
Changed period step size to 5Note di rilascio
Now plots trendlines all the way into the pastNote di rilascio
Removed values from status lineNote di rilascio
Optimized the script to run fasterScript open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.