script not to execute trade if holiday or certain day

 
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
 
Do you mean the script monitors MT4 to prevent any of the experts to open a new trade in holidays?
 
codersguru:
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.
 
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!
 
codersguru:
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 :)
Reason: