Hi,
i have a working EA finally, thanks to online reference and forum suggestions. Now, i want to restirct EA from running during the New York end and Sydney start time. How can i do this? will be using NY time as input to EA.
secondly i want to restrict EA from placings orders 30 mins before and and after importance news declarations which have "//" or "///" importance level as per new importance. How can i use such a feature in EA? Can EA get control of news and its importance level. I am interested in implementing importance level news of major currncies only - USD, GBP, EUR, JPY and AUD.
do suggest me some reference if you have for such usage, if you have examples please share it. I plan to addthese features to EA soon.
Thanks
What do you mean by "start time" ?
To manage new in code, see this topic https://www.mql5.com/en/forum/11155

- www.mql5.com
What do you mean by "start time" ?
To manage new in code, see this topic https://www.mql5.com/en/forum/11155
Thanks for link for calendar - "can not define the events by priority" - was actually looking for this feature on same. Hope wait is only option to add this.
BTW, any pointers to coding for start time ? Hope i am clear on same. I actually need to block EA from trading NY 5:00 PM to 7:30 PM. So, how can i add this restriction on EA?
Thanks for link for calendar - "can not define the events by priority" - was actually looking for this feature on same. Hope wait is only option to add this.
BTW, any pointers to coding for start time ? Hope i am clear on same. I actually need to block EA from trading NY 5:00 PM to 7:30 PM. So, how can i add this restriction on EA?
If the time matches the time you don't want to trade; return from start() . . . in other words, do nothing.
One more quick question:
Is there a function available for giving me no of open trades for a particular symbol. I am aware of OrdersTotal() but it gives me all open trade count. Do we already have an API for orderCount based on Symbol or i need to write for loop for same?
In MT5 there can be only 1 position for a symbol. You can use PostionSelect to check that.
okies...so i will add for loop to do same. I am surprised to see this behaviour for MT5

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
i have a working EA finally, thanks to online reference and forum suggestions. Now, i want to restirct EA from running during the New York end and Sydney start time. How can i do this? will be using NY time as input to EA.
secondly i want to restrict EA from placings orders 30 mins before and and after importance news declarations which have "//" or "///" importance level as per new importance. How can i use such a feature in EA? Can EA get control of news and its importance level. I am interested in implementing importance level news of major currncies only - USD, GBP, EUR, JPY and AUD.
do suggest me some reference if you have for such usage, if you have examples please share it. I plan to addthese features to EA soon.
Thanks