samuelhei

VOLATILITY COMPARISON METHODOLOGY

189 0 15
A simple method to compare the volatility of two securities.
Remove from Favorite Scripts Add to Favorite Scripts
//@version=2
study("VOLATILITY COMPARASION", overlay=false)

comp1 = input('BTCUSD', type=symbol)
comp2 = input('IF1!', type=symbol)

input = security(comp1,period,close[1])

bars = input(100)
h = highest(input,bars)
l = lowest(input,bars)


dif = h/l
avgDif = (sma(dif,bars)-1)*100

plot(avgDif, title="VOL1", color=black)

input2 = security(comp2,period,close[1])


h2 = highest(input2,bars)
l2 = lowest(input2,bars)


dif2 = h2/l2
avgDif2 = (sma(dif2,bars)-1)*100

plot(avgDif2, title="VOL2", color=red)
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
日本
한국
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
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Account and Billing Sign Out