soru

MAcross tracker

92 3 10
Please test it :)
Remove from Favorite Scripts Add to Favorite Scripts
study("MAcross tracker",overlay=true)
k = ismonthly ? 'M' : isweekly ? 'W' : isdaily ? 'D' : ''
ma_len = input(200)
TW1=input('240')
TW2=input('1D')
TW3=input('1W')
TW4=input('1M')
Ins1 = input("FX:USDCAD")
Ins2 = input("FX:AUDUSD")
Ins3 = input("FX:EURUSD")
Ins4 = input("FX:GBPUSD")
signal(x,y)=>
    ma = security(y,x, sma(close,ma_len))
    c = security(y,x, close)
    s = cross(ma,c) ? cross(ma,c) : na
    [s]

[s1_TW1] = signal(TW1,Ins1)
[s1_TW2] = signal(TW2,Ins1)
[s1_TW3] = signal(TW3,Ins1)
[s1_TW4] = signal(TW4,Ins1)
[s2_TW1] = signal(TW1,Ins2)
[s2_TW2] = signal(TW2,Ins2)
[s2_TW3] = signal(TW3,Ins2)
[s2_TW4] = signal(TW4,Ins2)
[s3_TW1] = signal(TW1,Ins3)
[s3_TW2] = signal(TW2,Ins3)
[s3_TW3] = signal(TW3,Ins3)
[s3_TW4] = signal(TW4,Ins3)
[s4_TW1] = signal(TW1,Ins4)
[s4_TW2] = signal(TW2,Ins4)
[s4_TW3] = signal(TW3,Ins4)
[s4_TW4] = signal(TW4,Ins4)
hline(1,color=black,linewidth=2)
plotshape(s1_TW1 ? 1 : na,style=shape.labeldown,color=#006600, textcolor=black,text='4h', location=location.absolute)
plotshape(s1_TW2 ? 1 : na,style=shape.labeldown,color=#006600, textcolor=black,text='1D', location=location.absolute)
plotshape(s1_TW3 ? 1 : na,style=shape.labeldown,color=#006600, textcolor=black,text='1W', location=location.absolute)
plotshape(s1_TW4 ? 1 : na,style=shape.labeldown,color=#006600, textcolor=black,text='1M', location=location.absolute)
hline(2,color=black,linewidth=2)
plotshape(s2_TW1 ? 2 : na,style=shape.labeldown,color=#006600, textcolor=black,text='4h', location=location.absolute)
plotshape(s2_TW2 ? 2 : na,style=shape.labeldown,color=#006600, textcolor=black,text='1D', location=location.absolute)
plotshape(s2_TW3 ? 2 : na,style=shape.labeldown,color=#006600, textcolor=black,text='1W', location=location.absolute)
plotshape(s2_TW4 ? 2 : na,style=shape.labeldown,color=#006600, textcolor=black,text='1M', location=location.absolute)
hline(3,color=black,linewidth=2)
plotshape(s3_TW1 ? 3 : na,style=shape.labeldown,color=#006600, textcolor=black,text='4h', location=location.absolute)
plotshape(s3_TW2 ? 3 : na,style=shape.labeldown,color=#006600, textcolor=black,text='1D', location=location.absolute)
plotshape(s3_TW3 ? 3 : na,style=shape.labeldown,color=#006600, textcolor=black,text='1W', location=location.absolute)
plotshape(s3_TW4 ? 3 : na,style=shape.labeldown,color=#006600, textcolor=black,text='1M', location=location.absolute)
hline(4,color=black,linewidth=2)
plotshape(s4_TW1 ? 4 : na,style=shape.labeldown,color=#006600, textcolor=black,text='4h', location=location.absolute)
plotshape(s4_TW2 ? 4 : na,style=shape.labeldown,color=#006600, textcolor=black,text='1D', location=location.absolute)
plotshape(s4_TW3 ? 4 : na,style=shape.labeldown,color=#006600, textcolor=black,text='1W', location=location.absolute)
plotshape(s4_TW4 ? 4 : na,style=shape.labeldown,color=#006600, textcolor=black,text='1M', location=location.absolute)
bgcolor(n>n[1] ? blue : gray)
Deleted
2 years ago
will do )
Reply
Andyle
2 years ago
Cool stuff mate
Reply
soru Andyle
2 years ago
thanks;]
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
France
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out