OPEN-SOURCE SCRIPT

Pink's Daily SMA Script

由PureDelta提供
🚗 This script provides a customizable overlay of seven simple moving averages (SMAs) on the chart. Users can control the display of each SMA by toggling them on or off. The lengths of these SMAs are adjustable, allowing for tailored analysis based on individual preferences.

📊 The script calculates daily SMA values using the request.security() function and plots them as horizontal lines on the chart. These SMAs are updated once per day, typically at the start of the pre-market session (9:00 AM in the "America/New_York" timezone). The script resets the SMA values at the start of each new day, ensuring fresh data for daily analysis.

🕒 In addition to the SMAs, the script includes an optional feature that highlights specific time ranges on the chart: from 11:00 AM to 11:05 AM and from 1:00 PM to 1:30 PM (based on the "America/New_York" timezone). Users can toggle these background highlights on or off, providing visual cues for key times during the trading day. The 11:00 AM window is highlighted in gray, while the 1:00 PM window is highlighted in blue.

🔖 The SMAs are labeled on the right side of the chart, with only one label visible at a time for each SMA. These labels display the length of the respective SMA, and their colors match the lines drawn on the chart, helping to distinguish between the different SMAs.

Special thanks to Pinks333 (tradingview.com/u/pinks333/
Who provided the logic for the script and was willing to share her logic and open source the script.
Simple Moving Average (SMA)

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?

免责声明