static bool openCondition=false; static datetime firstSeen; bool prevCondition = openCondition; openCondition = OPENCONDITION; if(openCondition){ if(!prevCondition) firstSeen = TimeCurrent(); // Remember first seen else if(TimeCurrent() - firstSeen >= 2){ // Still set for 2 seconds OrderSend(); } // else // still waiting. }
-
“Doesn't work” is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
How To Ask Questions The Smart Way. (2004)
When asking about code
Be precise and informative about your problem -
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the file.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problemWe can't see your broken code.
-
“Doesn't work” is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
How To Ask Questions The Smart Way. (2004)
When asking about code
Be precise and informative about your problem -
Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the file.
How To Ask Questions The Smart Way. (2004)
Be precise and informative about your problemWe can't see your broken code.
- 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 all,
I would need to double-test the entry condition in my EA. The condition is the same but I want to test its validity with a time delay.
for example:
Sleep() function does not suspend execution of the EA in the Strategy Tester.
Any idea for this?