- What are the parameters to put in iCustom using Heikin Ashi indicator
- Heikin Ashi
- Very Profitable Heiken-Ashi System
Please note the the Heikin Ashi Open and Close prices are virtual prices (moving average) and not the prices of the current real candle. So when you place the order it will be for the current market prices, not the heikin ashi prices.
You can obviously also place pending orders for the desired prices based on the Heikin Ashi, but there is no guarantee that it will be triggered within a reasonable timespan.
A Heikin Ashi is a exponential moving average (EMA) of period 3 (alpha = 0.5), of the Total Price ( (O+H+L+C)/4 ). It is definitely not median price.
No! Not at the open of the bar. Only possible if you wait for the quote to move to the desired price, but by then it may already be a invalid signal or it may never happen at all.
I repeat, Heikin Ashi is just an indicator in the form of a candle. It is not a real candle or bar. It is virtual. It is just an indicator.
No! Not at the open of the bar. Only possible if you wait for the quote to move to the desired price, but by then it may already be a invalid signal or it may never happen at all.
I repeat, Heikin Ashi is just an indicator in the form of a candle. It is not a real candle or bar. It is virtual. It is just an indicator.
A Heikin Ashi is a exponential moving average (EMA) of period 3 (alpha = 0.5), of the Total Price ( (O+H+L+C)/4 ). It is definitely not median price.
Are you sure???
I cannot find EMA/SMA here:
//+------------------------------------------------------------------+ //| Heiken Ashi | //+------------------------------------------------------------------+ int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { int start; //--- preliminary calculations if(prev_calculated==0) { ExtLBuffer[0]=low[0]; ExtHBuffer[0]=high[0]; ExtOBuffer[0]=open[0]; ExtCBuffer[0]=close[0]; start=1; } else start=prev_calculated-1; //--- the main loop of calculations for(int i=start; i<rates_total && !IsStopped(); i++) { double ha_open =(ExtOBuffer[i-1]+ExtCBuffer[i-1])/2; double ha_close=(open[i]+high[i]+low[i]+close[i])/4; double ha_high =MathMax(high[i],MathMax(ha_open,ha_close)); double ha_low =MathMin(low[i],MathMin(ha_open,ha_close)); ExtLBuffer[i]=ha_low; ExtHBuffer[i]=ha_high; ExtOBuffer[i]=ha_open; ExtCBuffer[i]=ha_close; //--- set candle color if(ha_open<ha_close) ExtColorBuffer[i]=0.0; // set color DodgerBlue else ExtColorBuffer[i]=1.0; // set color Red } //--- return(rates_total); } //+------------------------------------------------------------------+
Yes, I am absolutely sure.
- haClose = ( Open + High + Low + Close) / 4
- haOpen = ( haOpen(previous) + haClose(previous) ) / 2
= haOpen(previous) + 0.5 * ( haClose(previous) - haOpen(previous) ) = μn−1 + α(xn − μn−1) - EMS equation: μn = μn−1 + α(xn − μn−1)
- alpha for period 3 = α = 2 / ( p + 1 ) = 2 / (3 + 1) = 2 /4 = 0.5
The only detail to note is the current haOpen is based on the previous Total Price instead of the current Total Price (data points are shifted by one) but the equation remains the same.
EDIT: Here are the equations in graphic form for easier viewing:
EDIT 2: This is the reason why I publish my Dōteki Heikin Ashi (Dynamic Average Foot/Bar) with the variable period, where a period of 3.0 is the default for the original Heikin Ashi.
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use