Question for newbie's: Can we launch script from EA ?

 

I understand we can launch a script directly on the security window but how can we do it automatically from EA ?

Or, should I set it at the same time as the EA on the screen but in this case how can I have it coming back periodically ? (once a month) and I suppose that will not show in back testing?

Please help as I my knowledge in programming MQL4 stop right here for now!

 

Yes, you can

here is how to do it :

first, you should assign a hotkey to your script, and then import winuser32 lib to your EA, and then use the functions keybd_event to simulate keyboard press..

but, there is some more simpler things.. like..

break up your script, and find the functions you need in there, and implement it's algorithm directly to your EA ;)

Reason: