OPEN-SOURCE SCRIPT

Auto Swing TP

Automatic TP generator from recent swing highs and swing lows

Multiple long & short TPs from current price are displayed.

Results will differ by timeframe.

The main parameter is the "cell size" which is the least significant price move for the current asset. The default value of 0.4% is optimized for crypto. You may want to use less for less volatile asset classes.

How it works

We divide price into cells of a certain percent sizes, mainly because this makes the computation a lot easier.

We note in which bar every price cell was last visited. We take the distance to the current bar and then the logarithm of that to a certain base (the "time dimension"). Using a logarithm gives a nice balance of near-term and long-term targets. We call that logarithmic value the "level" of that price cell.

If a price cell has a significantly higher or lower level (at least by +2 or -2) than the cell above or below, this is considered a possible TP area.

Finally we check if the trade makes sense (meaning is of a certain size, at least 10 cells by default). If yes, we reduce the TP by a bit (by default 2 cells) and add it to the chart.
Pivot Points

Skrypt open-source

W prawdziwym duchu TradingView autor tego skryptu opublikował go jako open source, aby inwestorzy mogli go zrozumieć i zweryfikować. Pozdrowienia dla autora! Możesz go używać bezpłatnie, ale ponowne użycie tego kodu w publikacji podlega Zasadom Regulaminu. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Chcesz użyć tego skryptu na wykresie?


Również na:

Wyłączenie odpowiedzialności