CopyTime() always shows a compiling error ("no one of the overloads can be applied to the function call")
Marbo :
Hello,
can anyone tell me why this CopyTime() always shows a compiling error?
A little care and everything will work out:
//+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart() { int bars=Bars(_Symbol,PERIOD_CURRENT); //MqlDateTime times[]; datetime times[]; ArraySetAsSeries(times,true); CopyTime(_Symbol,PERIOD_CURRENT,0,bars,times); for(int i=ArraySize(times); i>=0; i--) { MqlDateTime STimes; TimeToStruct(times[i],STimes); //Print(times[i].mon); Print(STimes.mon); } }
Vladimir Karputov:
A little care and everything will work out:
Great, thank you very much!

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
Hello,
can anyone tell me why this CopyTime() always shows a compiling error?