Yhang-Zhan variation of Garman-Klas

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Yhang-Zhan variation of Garman-Klas

Postby isamegrelo » Sat Aug 18, 2018 3:04 pm

Position sizing based on Yhang-Zhan variation of Garman-Klass volatility

Code:

//periodo=254

a=log(close/close[periodo])

//volatility with GARMAN-KLASS YANG-ZHANG
zz=call "mio - tsmom improved volat"[22]
vol=sgn(a)/zz
ret=log(close/close[1])
//l=60/61
l=0.983
cx=ret*ret
if barindex>2 then
s2=l*s2[1]+(1-l)*cx[1]
endif

sann=(periodo*s2)

return SGN(a)*1/sann as "Positions with EWMA",0, vol as "Positions with GARMAN-KLASS YANG-ZHANG"
isamegrelo
FXCodeBase: Initiate
 
Posts: 114
Joined: Mon May 29, 2017 3:36 pm

Re: Yhang-Zhan variation of Garman-Klas

Postby Apprentice » Sun Aug 19, 2018 6:28 am

zz=call "mio - tsmom improved volat"[22]

Can you provide mio - tsmom improved volat?
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Yhang-Zhan variation of Garman-Klas

Postby isamegrelo » Sun Aug 19, 2018 4:44 pm

mio = 8.5155
tsmom improved volat = time series momentum improved volatility
isamegrelo
FXCodeBase: Initiate
 
Posts: 114
Joined: Mon May 29, 2017 3:36 pm

Re: Yhang-Zhan variation of Garman-Klas

Postby Apprentice » Mon Aug 20, 2018 5:11 am

And how it is calculated?
Can you provide indicator code, web reference or detailed description?
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Yhang-Zhan variation of Garman-Klas

Postby isamegrelo » Mon Aug 20, 2018 7:02 am

isamegrelo
FXCodeBase: Initiate
 
Posts: 114
Joined: Mon May 29, 2017 3:36 pm


Re: Yhang-Zhan variation of Garman-Klas

Postby Apprentice » Thu Aug 23, 2018 4:42 am

Done, but I'm not sure I've understood the formula right. The results are really strange.
Yhang-Zhan variation of Garman-Klass.lua
(3.45 KiB) Downloaded 541 times


If you can confirm.
If possible please provide other indicator code.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Yhang-Zhan variation of Garman-Klas

Postby isamegrelo » Thu Aug 23, 2018 11:52 am

isamegrelo
FXCodeBase: Initiate
 
Posts: 114
Joined: Mon May 29, 2017 3:36 pm



Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 7 guests