OPEN-SOURCE SCRIPT

Custom MA Indicator

76
// version=6
indicator("Custom MA Indicator", overlay=true)

// Define the moving average periods
ma_red_period = 50
ma_orange_period = 100
ma_green_period = 200

// Calculate the moving averages
ma_red = ta.sma(close, ma_red_period)
ma_orange = ta.sma(close, ma_orange_period)
ma_green = ta.sma(close, ma_green_period)

// Plot the moving averages with specified colors
plot(ma_red, color=color.red, title="Red MA")
plot(ma_orange, color=color.orange, title="Orange MA")
plot(ma_green, color=color.green, title="Green MA")

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน