Method to get Times & Trades
Hi, is there a method to take the times & trade data ? Or its a enhancement ?
Hello. Can you clarify what mql functions do you want to see in MtApi? Can you give me more information about data you needed or web link?
I mean that Metaqoutes does not yet provide a function for MQL5 so far.
Hi vdemydiuk,
I think i can use mtApi method = _mtApiClient.CopyTicks(TimeSeriesValues.SymbolValue) . But when execute this method, i get less data than my data in times and Trades windows from mql5 like my print above.
I want to sum trades , when a lasttrade was at the ask or at the bid . In MLQ5 the sample code would be like this .
MqlTick last_tick[];
int received=CopyTicks(_Symbol,last_tick,COPY_TICKS_TRADE,0,1);
int AtBuy ;
int AtSell ;
int ticks=ArraySize(last_tick);
for(int i=0;i<ticks;i++)
{
bool buy_tick=((last_tick[i].flags&TICK_FLAG_BUY)==TICK_FLAG_BUY);
bool sell_tick=((last_tick[i].flags&TICK_FLAG_SELL)==TICK_FLAG_SELL);
if (buy_tick)
{
AtBuy= AtBuy+ last_tick[i].volume;
}
else if (sell_tick)
{
AtSell= AtSell+ last_tick[i].volume;
}
}
Hi KptKuck , maybe u r correct , a quick look on mql5 community i see a lot discussion about get times & trades window ... but nothing conclusive . tks.