PineCodersTASC

TASC 2023.07 Keeping With The Larger Trend

█ OVERVIEW

TASC's July 2023 edition of Traders' Tips features an article by Barbara Star titled "Stay On Track With The Supertrend Indicator". The article explores how the supertrend indicator, whether used as a standalone tool or in conjunction with other indicators, can assist traders in aligning with the larger trend. Drawing inspiration from the article, this script enhances the supertrend indicator with additional visual and analytical features, making it easier to analyze the readings and make informed trading decisions.


█ CONCEPTS

Over the past few years, the supertrend indicator has gained significant popularity among traders. Unlike moving averages, it incorporates both price and volatility information, enabling traders to navigate upward or downward trends despite occasional price disruptions.

When using the supertrend indicator, a trader may consider entering a long position when the price surpasses the supertrend line or retraces to it after the initial crossover. Similarly, for short positions, a trader could enter when the price drops below the supertrend line or retests it. Exiting these positions can be triggered by the opposite scenario, such as a price drop below the supertrend line for long positions or a price rise above the supertrend line for short positions. To assist in monitoring the distance between the price and the indicator line, this script introduces the following display features:
  • Breach levels, representing fractions of the most recent maximum distance.
  • On-chart signals indicating crossings of the highest and lowest breach levels.
  • An infobox displaying the average value of the maximum distance.


█ CALCULATIONS

For calculating the supertrend line, this script uses the built-in function ta.supertrend(). Additionally, the script showcases the use of state-of-the-art PineScript® functionality, including methods and tables.

Tools and ideas for all Pine coders: www.tradingview.com/u/PineCoders/
Pine news broadcasts: t.me/PineCodersSquawkBox or twitter.com/PineCoders
TASC: traders.com/
Script de código abierto

Siguiendo el verdadero espíritu de TradingView, el autor de este script lo ha publicado en código abierto, para que los traders puedan entenderlo y verificarlo. ¡Un hurra por el autor! Puede utilizarlo de forma gratuita, aunque si vuelve a utilizar este código en una publicación, debe cumplir con lo establecido en las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.

¿Quiere utilizar este script en un gráfico?