RicardoSantos

[RS]Leading Momentum Oscilator V0

EXPERIMENTAL: Momentum oscilator based on offset, can also be used for divergence/convergence
Remove from Favorite Scripts Add to Favorite Scripts
study("[RS]Leading Momentum Oscilator V0")
ma_length = input(title='ma length', type=integer, defval=5)
signal_length = input(title='signal length', type=integer, defval=21)
offset = input(title='offset', type=integer, defval=8)

leading_cd(_src, ma_l, signal_l, offset_l)=>
    _ma = sma(_src, ma_l)
    _signal = sma(_src, signal_l)
    _hist = _ma-offset(_signal, offset_l)
    _hist

o = leading_cd(open, ma_length, signal_length, offset)
h = leading_cd(high, ma_length, signal_length, offset)
l = leading_cd(low, ma_length, signal_length, offset)
c = leading_cd(close, ma_length, signal_length, offset)

plotcandle(o, h, l, c, color=c>o?green:c<o?maroon:gray)
hline(0)
Looks great. Thanks for sharing mate
Reply
English
English (UK)
English (IN)
Deutsch
Français
Español
Italiano
Polski
Türkçe
Русский
Português
Bahasa Indonesia
Bahasa Melayu
ภาษาไทย
Tiếng Việt
日本語
한국어
简体中文
繁體中文
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out