Re: MT4 Indicator requests and ideas

1983
ekmanso1 wrote: Sat Aug 26, 2017 11:01 pm Hello traders, does any one know of any indicator that shows or alert an engulfing, pinbar or other candle patterns on the CURRENT candle rather than at the close or open of the next candle. .. Thanks in Advance
None of those can be calculated for current bar - since either the right side data of pattern recognition is missing or, as long as the current bar can be changed, like in case of a pinbar, you would get a load of false signals
Also, see these examples :


How many "pinbars" by definition were omitted at the example and why? Ie: you can not do even pinabrs without the knowledge of the "future" bars

Re: MT4 Indicator requests and ideas

1985
Mladen

Is this codeable in mql4?
The Yang Zhang extension of the Garman-Klass volatility is considered to be the second most precise method to evaluate ex-ante volatility......

Code: Select all


//YANG-ZHANG extention of the GARMAN-KLASS volatility
p=22
corr=sqrt(p/(p-1))

gkyzoc=log(open/close[1])*log(open/close[1])
gkyzhl=0.5*log(high/low)*log(high/low)
gkyzco=(2*log(2)-1)*log(close/open)*log(close/open)

gkyz=sqrt(summation[p](gkyzoc+gkyzhl-gkyzco))*sqrt(256/p)

gkyzvolatility=gkyz*corr

return gkyzvolatility as "Garman-Klass Yang-Zhang"

//YANG-ZHANG extention of the GARMAN-KLASS volatility
p=22
corr=sqrt(p/(p-1))
 
gkyzoc=log(open/close[1])*log(open/close[1])
gkyzhl=0.5*log(high/low)*log(high/low)
gkyzco=(2*log(2)-1)*log(close/open)*log(close/open)
 
gkyz=sqrt(summation[p](gkyzoc+gkyzhl-gkyzco))*sqrt(256/p)
 
gkyzvolatility=gkyz*corr
 
return gkyzvolatility as "Garman-Klass Yang-Zhang"
Attachments


Re: MT4 Indicator requests and ideas

1986
Another interesting one; Yang-Zhang volatility estimator:

Code: Select all

[
//parameters
// n = 20
// averageP = 200
 
No = log( open ) - log( close[1] )  // normalized open
Nu = log( high ) - log( open )             // normalized high
Nd = log( low ) - log( open )              // normalized low
Nc = log( close ) - log( open )            // normalized close
 
Vrs = 1 / n * Summation[n]( Nu * ( Nu - Nc ) + Nd * ( Nd - Nc ))  // RS volatility estimator
 
Noavg = 1 / n * Summation[n](No)
Vo = 1 / ( n - 1 ) * Summation[n]( SQUARE( No - Noavg ) )
 
Ncavg = 1 / n * Summation[n]( Nc )
Vc = 1 / ( n - 1 ) * Summation[n]( SQUARE( Nc - Ncavg ) )
 
k = 0.34 / ( 1.34 + ( n + 1 ) / ( n - 1 ) )
 
Vyangzhang = Vo + k * Vc + ( 1 - k ) * Vrs
 
avg = average[averageP](Vyangzhang)
 
return Vyangzhang, avg as "average volatiliy"/code]


Who is online

Users browsing this forum: alimpe2000, Amazon [Bot], areteus1, NasdaqBoss, Twitter [Bot], Yahoo Japan [Bot], Yandex [Bot] and 75 guests