How to retrieve each row/item of Trades & Sales ?

 

Hi everyone!

I'm trying to retrieve the lasts 100 rows/registers of the Trades & Sales without sucess (like the attached image), someone could help me and tell whats i'm doing wrong or how to do it right? 

Actually my code is like that:

MqlTick tick_array[];
CopyTicks(Symbol(),tick_array,COPY_TICKS_TRADE,0,100); 
ArraySetAsSeries(tick_array,true);
      
for (int i=0; i < ArraySize(tick_array); i++){
         
   if (tick_array[0].flags == TICK_FLAG_BUY || tick_array[0].flags == TICK_FLAG_SELL)
      Print(tick_array[0].flags == TICK_FLAG_SELL ? "SELL:" : "BUY:" + " - " + tick_array[0].last + " - lots: "+ tick_array[0].volume);
         
}

When i'm running on the Tester Strategy i never got my IF condition true.

Thanks! 

Files:
mql5.png  26 kb
 

Just updating... i've found my answer on this article:

https://www.mql5.com/en/articles/3336#i3

Implementing a Scalping Market Depth Using the CGraphic Library
Implementing a Scalping Market Depth Using the CGraphic Library
  • www.mql5.com
Now, we will start to work with this improved and revised version trying to gradually turn it into a scalping Market Depth tool. Overview of the CPanel graphics library There are many articles devoted to the creation of user interfaces in MQL5. Anatoly Kazharsky's "Graphical Interfaces" series stands out among them. It is difficult to add...
Reason: