OPEN-SOURCE SCRIPT

10 Points from 9 EMA

22
//version=6
indicator("10 Points from 9 EMA", overlay=true)

// Calculate the 9-period EMA
ema9 = ta.ema(close, 9)

// Define the levels based on the EMA
tenPointsAboveEMA = ema9 + 10
tenPointsBelowEMA = ema9 - 10

// Create labels based on the distance from EMA
if (high >= tenPointsAboveEMA or low <= tenPointsBelowEMA)
label.new(bar_index, close, "10", color=color.blue, textcolor=color.white, style=label.style_label_up, size=size.small)

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。