OPEN-SOURCE SCRIPT

Custom MA Indicator

80
// 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. קרא עוד בתנאים וההגבלות.