RicardoSantos

[RS]No Lag MaCD V0

EXPERIMENTAL:
Use at your own discretion.
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
study(title='[RS]No Lag MaCD V0', shorttitle='NL.MaCD', overlay=false)
digits = open - round(open) == 0 ? 1:
         open*10 - round(open*10) == 0 ? 10:
         open*100 - round(open*100) == 0 ? 100:
         open*1000 - round(open*1000) == 0 ? 1000:
         open*10000 - round(open*10000) == 0 ? 10000:
         open*100000 - round(open*100000) == 0 ? 100000:
         open*1000000 - round(open*1000000) == 0 ? 1000000:
         0
dif1 = change(close, input(8))*digits
dif2 = change(close, input(34))*digits
adv1 = round(cum(change(dif1, input(3))))
adv2 = round(cum(change(dif2, input(5))))
plot(title='F', series=adv1, color=black)
plot(title='S+', series=adv2>0?adv2:na, style=areabr, color=green, transp=80)
plot(title='S-', series=adv2<0?adv2:na, style=areabr, color=maroon, transp=80)
hline(title='0', price=0, color=black)
Evgenich
a year ago
best
Reply
Ideas Scripts Chart
United States
United Kingdom
India
España
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 Billing Sign Out