Volatility Ratio

Here you can post and download custom indicators written in JavaScript.

Moderator: admin

Volatility Ratio

Postby Alexander.Gettinger » Wed May 02, 2018 3:01 pm

Formulas:
VR[i] = tr[i]/pr[i], where
tr[i] = Max(hl[i], hc[i], lc[i]),
hl[i] = High[i]-Low[i],
hc[i] = Abs(High[i]-Close[i-1]),
lc[i] = Abs(Low[i]-Close[i-1]),
pr[i] = Max(MH, Open[i-Length+1])-Min(ML, Open[i-Length+1]),
MH, ML - maximum and minimum prices at range from (i-Length+1) to (i).

Volatility_Ratio.PNG


Download:
Volatility Ratio_JS.jsl
(1.97 KiB) Downloaded 613 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Return to JavaScript Indicators and Strategies

Who is online

Users browsing this forum: No registered users and 7 guests