CopyTicks Array Time Problem

To add comments, please log in or register
huwa
114
huwa  

SOLVED

long NewMinute[];

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit(){      
   
   ArrayFree(NewMinute);     
   ArrayResize(NewMinute,2);
}        
//+------------------------------------------------------------------+
//| ON TIMER                                                         |
//+------------------------------------------------------------------+
void OnTimer()
{

MqlDateTime date;

datetime start = TimeCurrent();
datetime StartFade=start+50;


for(int i=0; i<ArraySize(NewMinute); i++){
   if(date.sec==00){
      ArrayFill(NewMinute,0,1,start);
      ArrayFill(NewMinute,1,1,StartFade);}
   }
       
ArrayPrint(NewMinute); 
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
Documentation on MQL5: Constants, Enumerations and Structures / Named Constants / Predefined Macro Substitutions
  • www.mql5.com
//| Expert initialization function                                   | //| Expert deinitialization function                                 | //| Expert tick function                                             | //| test1                                                            |...
William Roeder
22306
William Roeder  
         this_bar_time = TimeLocal();
All times on the chart are broker's times.
To add comments, please log in or register