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/
Mã nguồn mở

Với tinh thần TradingView, tác giả của tập lệnh này đã xuất bản nó dưới dạng mã nguồn mở, vì vậy các nhà giao dịch có thể hiểu và xác minh nó. Chúc mừng tác giả! Bạn có thể sử dụng mã này miễn phí, nhưng việc sử dụng lại mã này trong một ấn phẩm chịu sự điều chỉnh của Nội quy nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?