RicardoSantos

[RS]Impulse Oscillator V0

EXPERIMENTAL:
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
study(title='[RS]Impulse Oscillator V0', shorttitle='IO', overlay=false)
inner_range = close - close[1]
up_sequence = na(up_sequence[1]) ? 0 : close < close[1] ? 0 : up_sequence[1] + inner_range
down_sequence = na(down_sequence[1]) ? 0 : close > close[1] ? 0 : down_sequence[1] + inner_range
plot(title='Bull Impulse', series=up_sequence, style=columns, color=lime)
plot(title='Bear Impulse', series=down_sequence, style=columns, color=red)
length = input(21)
smoothing = input(4)
avg_up = sma(up_sequence, length)
signal_up = ema(avg_up, smoothing)
avg_down = sma(down_sequence, length)
signal_down = ema(avg_down, smoothing)

plot(title='Average+', series=avg_up, color=black)
plot(title='Average-', series=avg_down, color=black)
plot(title='Bear Squeeze', series=signal_up >= avg_up ? signal_up : na, style=circles, color=red, linewidth=2)
plot(title='Bull Squeeze', series=signal_down <= avg_down ? signal_down : na, style=circles, color=lime, linewidth=2)
xel_arjona
a year ago
Simple, Nice & Clean ;)
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