You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
When using ArrayCopyRates, using Different timeframes, Comment shown below returns current date time rather than Time in Testing
Want to use it in B-clock to show remaining minutes in different timeframes.
//+------------------------------------------------------------------+
//| CopyArray.mq4 |
//+------------------------------------------------------------------+
#property indicator_chart_window
//---- buffers
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
}
return(0);
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
double array1[][6];
ArrayCopyRates(array1,NULL,PERIOD_M1);
Comment("Current bar ",TimeToStr(array1[0][0])," OpenPrice ", array1[0][1]);
return(0);
}
//+------------------------------------------------------------------+