MQL4 - automated forex trading   /  

Forum

script not to execute trade if holiday or certain day

Back to topics list To post a new topic, please log in or register

avatar
12
bimantara 2006.09.04 15:30 
hi
anyone have script that forbidden MT4 to execute any trade if the current day is holiday?
please kindly share it to me
thanks in advance

A Non-Trading EA Testing Indicators

A Non-Trading EA Testing Indicators

All indicators can be divided into two groups: static indicators, the displaying of which, once shown, always remains the same in history and does not change with new incoming quotes, and dynamic indicators that display their status for the current moment only and are fully redrawn when a new price comes. The efficiency of a static indicator is directly visible on the chart. But how can we check whether a dynamic indicator works ok? This is the question the article is devoted to.


avatar
233
codersguru 2006.09.04 19:04 
Do you mean the script monitors MT4 to prevent any of the experts to open a new trade in holidays?

avatar
12
bimantara 2006.09.05 12:28 
codersguru wrote:
Do you mean the script monitors MT4 to prevent any of the experts to open a new trade in holidays?
yes.. right... do you have one?
btw, I've read you interview article.

avatar
233
codersguru 2006.09.05 20:28 
This is not possible! You can not write an expert advisor /script that prevent other expert advisors to open trades!
But the good news is that there's a hack for that:

1- Go to my article: Send Keyboard keys to MetaTrader!
2- Download the script and read the article.
3- The hot key you need to include in your expert advisor (not script because the script runs once and not resedint in the terminal to monitor the holidays) is CTRL+E
For example this is a pesdu code:

if (Holiday) SendKey(Ctrl+E);

I hope it helps!

avatar
12
bimantara 2006.09.06 13:16 
codersguru wrote:
This is not possible! You can not write an expert advisor /script that prevent other expert advisors to open trades!
But the good news is that there's a hack for that:

1- Go to my article: Send Keyboard keys to MetaTrader!
2- Download the script and read the article.
3- The hot key you need to include in your expert advisor (not script because the script runs once and not resedint in the terminal to monitor the holidays) is CTRL+E
For example this is a pesdu code:

if (Holiday) SendKey(Ctrl+E);

I hope it helps!
THANK YOU CODERsGURU :)
Back to topics list  

To add comments, please log in or register