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
Do not use this code. It is very poorly written. There is a good library https://www.mql5.com/ru/code/32430 here.
Hello Alain,
Unfortunately i got to the same conclusion. I am pretty new in MQL5 coding and very confused about all the curious error messages.
Meanwhile i have solved the error, mentioned in my post before. Nevertheless, when i am using the news.next Class. it doesnt show me the red line with the next upcoming news event (in the backtester mode)
Do you know something that works well? Or can you help me with this issue?
Thank You!
I am not sure why you think it's a good library ? In my opinion it's equally "poorly written".
Because it works, is flexible and fast.
Granted, saber has a style of coding not everybody likes. Personally i do not see any issues with the code.
Because it works, is flexible and fast.
Granted, saber has a style of coding not everybody likes. Personally i do not see any issues with the code.
Is this code correct?
int idx=news.next(0,"EUR",false,0); //will fetch next news from current time
datetime time = news.event[idx].time; //gets the time of the next news found above
int imp = news.event[idx].importance; // gets the importance of the next news found above
if(imp>=2 && (time-TimeTradeServer()>0 && time-TimeTradeServer()<=checknewsduration)) return true; //if news is importance medium and above, and is within nextnewsducartion(24), do not open new trades.
I am using the latest version of this code and I am getting an error that say Array out of range. I increases the size of the three array to 500000, and even larger numbers as suggested, but I still get that error. I am using the code below, which should plot the news as vertical lines...Any suggestion of how to fix this?