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精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明