RicardoSantos

[RS]MTF Volatility Stop V0

request for: jackmk
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
study(title='[RS]MTF Volatility Stop V0', shorttitle='mtfVS', overlay=true)
multiplier = input(title='True Range Multiplier', type=float, defval=1.618)
tf = input(title='Timeframe to pool ATR:', type=string, defval='D', confirm=false)
length = input(title='ATR Length', type=integer, defval=20, minval=1)
range = security(tickerid, tf, atr(length))

trend = na(trend[1]) ? +1 : close > vstop[1] ? +1 : close < vstop[1] ? -1 : trend[1]
max_close = change(trend) != 0 ? close : close >= max_close[1] ? close : max_close[1]
min_close = change(trend) != 0 ? close : close <= min_close[1] ? close : min_close[1]
vstop = na(vstop[1]) ? hl2 :
         change(trend) > 0 ? close - (multiplier * range) : 
         trend > 0 ? max(vstop[1], max_close - (multiplier * range)) :
         change(trend) < 0 ? close + (multiplier * range) : 
         trend < 0 ? min(vstop[1], min_close + (multiplier * range)) : 
         vstop[1]

plot(title='mtfVS', series=vstop, style=circles, color=close>=vstop?lime:red, transp=0, linewidth=2)
plot(title='mtfVS', series=vstop, style=line, color=black, transp=0, linewidth=1)
Thank you so much!

Could you please an MTF MACD indicator for me? the one I found here is still repaints the signals, and I can't trade with it.

Thanks in advance.
Reply
Great!
Reply
thank you very much again.
Reply
United States
United Kingdom
India
Deutschland
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
Home Stock Screener Forex Signal Finder 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
Profile Profile Settings Account and Billing Priority Support Ideas Published Followers Following Private Messages Chat Sign Out