You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Changed the code but still not solved my problem. Review snapshot.
Would you mind explaining what have you changed?
In your log it still shows i==0. Which means CURRENT bar, not yet closed.
Would you mind explaining what have you changed?
In your log it still shows i==0. Which means CURRENT bar, not yet closed.
basically logic is when ever a white candle appear and it close white after some red bars I have to get last highest high value from current white candle till before last white bar appeared in previous and then want to place a pending order. When ever second white candle appear I truncate my loop so no chance of getting 2 white candles in my loop. According to my logic White bar will always be at 0 position.
Free to Download for Metatrader 5
There are many Heiken Ashi indicators (and EA) on MT5 CodeBase, for example :
========
========
How To Trade - Heiken Ashi indicator and How Does It Work (adapted from the article)
Heikin-Ashi chart looks like the candlestick chart, but the method of calculation and plotting of the candles on the Heikin-Ashi chart is different from the candlestick chart. In candlestick charts, each candlestick shows four different prices: Open, Close, High and Low price.
But Heikin-Ashi candles are different and each candle is calculated and plotted using some information from the previous candle:
1- Open price: the open price in a Heikin-Ashi candle is the average of the open and close of the previous candle.
2- Close price: the close price in a Heikin-Ashi candle is the average of open, close, high and low prices.
3- High price: the high price in a Heikin-Ashi candle is chosen from one of the high, open and close price of which has the highest value.
4- Low price: the low price in a Heikin-Ashi candle is chosen from one of the low, open and close price of which has the lowest value.
So candles of a Heikin-Ashi chart are related to each other because the open price of each candle should be calculated using the previous candle close and open prices, and also the high and low price of each candle is affected by the previous candle. So a Heikin-Ashi chart is slower than a candlestick chart and its signals are delayed.
The Heikin-Ashi chart is delayed and the candlestick chart is much faster and helps us to make more profit. Why should we use a Heikin-Ashi chart then? As it was already explained, because of the delay that the Heikin-Ashi chart has, it has less number of false signals and prevent us from trading against the market. On the other hand, Heikin-Ashi candles are easier to read because unlike the candlesticks they don’t have too many different patterns.