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 de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?


También en:

Exención de responsabilidad