MLooo1

EMA / MA Scirpt update

MLooo1 מעודכן   
BITFINEX:BTCUSD   ביטקוין
Hi, an update of my scirt, I have add crossing (glod and death crossing).

Have a fun
ML1
הערה:
Forget the script ;)

//@version=3
strategy("SMA",overlay=true)
//
src = input(close, title="Source")

//Volume


//SMA
plot(sma(close,10),color = orange,linewidth=4, title = '10')
plot(sma(close,20),color = gray, linewidth=4, title = '20')
plot(sma(close,50),color = blue, linewidth=3, title = '50')
plot(sma(close,100),color = green, linewidth=4, title = '100')
plot(sma(close,200),color = purple, linewidth=3, title = '200')

//SMA High Low
//plot(sma(high,10),color = gray,linewidth=1, title = '10 High')
//plot(sma(low,200),color = red,linewidth=1, title = '200 Low')


//Golden Cross MA 50 & 200
ma50= input(50, minval=1, title="Moving Average 50")
ma200= input(200, minval=1, title="Moving Average 200")

exponential = input(false, title="Exponential MA")
select1 = exponential ? ema(src, ma50) : sma(src, ma50)
select2 = exponential ? ema(src, ma200) : sma(src, ma200)

golden_cross() => select1 > select2
death_cross() => select1 < select2

Golden() => golden_cross() and death_cross()
Death() => death_cross() and golden_cross()
bgcolor(Golden() ? #FFD700 : Death() ? #D3D3D3 : na,transp=0, title="Golden & Death Cross Background Color")

plotshape(Golden(), color=black, style=shape.xcross, text="Golden Cross", location=location.top)
plotshape(Death(), color=black, style=shape.xcross, text="Death Cross", location=location.top)

רעיונות קשורים

כתב ויתור

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