I’m developing an automatatic candlestick patterns recognition system and I see in many patterns the close quote of one candlestick is different from the open of the next one. I can’t understand why.
Doesn’t a candlestick open when another one closes?
Or they just hang around for a while before deciding when to open?
Candles charts are based on transactions within a given time frame. The price someone bought or sold for (in MT4 it’s bought only) most recently makes the candle grow or shrink.
If the next transaction after the candle closes is a higher price than the candle closed at, you have a gap up. And vice versa for gap down.
It is because the ticks that create the close price and open prices are not generated by the clock, they are generated by a change in price.
These changes in price occur at random intervals depending on the volatility of the market.
The close price is created by the last tick to arrive before the end of the candles time period, this may be several seconds before the end of the candles time period.
The next candles open price is generated by the first tick to arrive after the beginning of its time period, this tick will reflect a change in price since the tick that generated the close price of the last candle, this first tick of the new candle may be several seconds after the beginning of the candles time period.
It should not be possible for a candles close price to be equal to the next candles open price because that would mean a tick was generated without a change in price, the only time this should occur is if there is no change in price during the whole period of the candle so to prevent gaps in the chart a tick is generated to create a 1 tick, flat candle.
This is not a common occurance but you will sometimes see them on the one minute chart during periods of low trading activity.