samuelhei

VOLATILITY COMPARISON METHODOLOGY

209 0 17
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
Deutschland
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
简体
繁體
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 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