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

Script open-source

In pieno spirito TradingView, l'autore di questo script lo ha pubblicato open-source, in modo che i trader possano comprenderlo e verificarlo. Un saluto all'autore! È possibile utilizzarlo gratuitamente, ma il riutilizzo di questo codice in una pubblicazione è regolato dal nostro Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Vuoi usare questo script sui tuoi grafici?


Anche su:

Declinazione di responsabilità