bool Stop = false; int start() { if (Stop) return (0); OrderSend(...); if (IsTesting()) { Stop = true; return(0); ) }Flag Stop prevents any further execution even though the tester doesn't stop and continues idling.
Irtron:
bool Stop = false; int start() { if (Stop) return (0); OrderSend(...); if (IsTesting()) { Stop = true; return(0); ) }Flag Stop prevents any further execution even though the tester doesn't stop and continues idling.
Thanks. I've should've realized it was that simple.
If you want to unload, than script is better, but it has to be loop with Sleep(xx_seconds*1000) between cycles of functions until order is sent, than should break the loop in function.
how would look like:
how would look like:
extern int sleep_seconds = 5; int start() { orderTicket=-1; while(orderTicket<0) // loop function until order is filed { // performing check functions and Order Sleep(sleep_seconds*1000); // pause the script to avoid 100% cpu occupancy } return(0); }
thank u very much
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
I'm working with an EA for testing a series of functions, but I only want it to work one trade with each execution right now. How would I have the ea automatically end itself? I tried calling deinit() from start, but that didn't work. Is there a way to do this?
Thanks in advance.
Nick