OPEN-SOURCE SCRIPT

Gold Trading Signal

100
//version=5
indicator("Gold Trading Signal", overlay=true)

// Input parameter
emaLength = input(200, title="EMA Length")

// Calculate EMA
ema200 = ta.ema(close, emaLength)

// Buy & Sell Conditions
buyCondition = ta.crossover(close, ema200)
sellCondition = ta.crossunder(close, ema200)

// Plot signals
plot(ema200, title="EMA 200", color=color.blue, linewidth=2)
plotshape(buyCondition, location=location.belowbar, color=color.green, style=shape.labelup, title="BUY")
plotshape(sellCondition, location=location.abovebar, color=color.red, style=shape.labeldown, title="SELL")

// Alerts
alertcondition(buyCondition, title="Buy Signal", message="Gold Buy Signal")
alertcondition(sellCondition, title="Sell Signal", message="Gold Sell Signal")

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.