How candlestick are formed using ticks?

 

In MqlTick we have bid ask and last price

so I want to know how candlesticks are formed? using bid ask or last?

If bid=0 and ask=0 an d last!=0 will it form a chart?

if bid!=0 and ask!=0 and last!=0 how it will form using which array bid,ask or last?

Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Price Data Structure
Documentation on MQL5: Constants, Enumerations and Structures / Data Structures / Price Data Structure
  • www.mql5.com
Price Data Structure - Data Structures - Constants, Enumerations and Structures - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Rodger Sen:

In MqlTick we have bid ask and last price

so I want to know how candlesticks are formed? using bid ask or last?

If bid=0 and ask=0 an d last!=0 will it form a chart?

if bid!=0 and ask!=0 and last!=0 how it will form using which array bid,ask or last?

Bid is the answer 
A candle is started by the first tick arrival after the start time for the candle.  That means it may start later than start time depending on tick frequency 
As it only starts with a tick it will not be all zeros 
 
Paul Anscombe #:
Bid is the answer 
A candle is started by the first tick arrival after the start time for the candle.  That means it may start later than start time depending on tick frequency 
As it only starts with a tick it will not be all zeros 

Thanks