MarketInfo to get last tick type in mql4

To add comments, please log in or register
Gbenga Ayodele
282
Gbenga Ayodele  
void OnTick()
  {
   MqlTick last_tick;
//---
   if(SymbolInfoTick(Symbol(),last_tick_flag))
     {
      Print(last_tick.flag,": Bid = ",last_tick.bid,
            " Ask = ",last_tick.ask,"  Volume = ",last_tick.volume);
     }
   else Print("SymbolInfoTick() failed, error = ",GetLastError());
//---
  }

I need a short code to get the the following info from MarketInfo() or Market watch window in mt4:

Consecutive Ask in  one bar (TickType.Ask)

Consecutive Bid in one  bar (TickType.Bid)

Bid_Count per bar

Ask_Count per bar 

I do not Know if this would be possible in MQL4. Though it is easier in MQL5 but i do not know about coding in Mql5.


Your help will be Appreciated.

Thank. 

To add comments, please log in or register