Newbie... help please...

 

Hi All,

I am trying to understand Mql4 coding. Meanwhile I need your help about a specific matter.

My case is: I am trying to keep data (trade way and level) of last 10 buy/sell signals generated by MACD. I am ok with having very last signal with last data but cannot find a way to keep a list of old signals.

If anyone helps, will be much appreciated.

 
gilgamis:

Hi All,

I am trying to understand Mql4 coding. Meanwhile I need your help about a specific matter.

My case is: I am trying to keep data (trade way and level) of last 10 buy/sell signals generated by MACD. I am ok with having very last signal with last data but cannot find a way to keep a list of old signals.

If anyone helps, will be much appreciated.

Save the information to an array and shuffle the data along the array when you get a new signal, FIFO like.
 
if(isNewSignal){
   static double signals[10];
   for(int iSig=9; iSig > 0; iSig--) signals[iSig] = signals[iSig - 1];
   signals[0] = newSignal;
is that so hard?
 
Gents, thank you for your help. Much appreciated.
Reason: