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/
نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الكود في منشور تحكمه قواعد الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟