- Bar delay
static datetime LastEntryDetected; int iBar = iBarShift(NULL,0, LastEntryDetected); if (delay = iBar){ // open now } else{ // test for entry if (condition) LastEntryDetected = Time[0]; }
- Time delay
static datetime LastEntryDetected; if (TimeCurrent() > LastEntryDetected + delay * Period() * 60){ // open now } else{ // test for entry if (condition) LastEntryDetected = Time[0]; }
Mafeng:
How can I open a trade with this indicator attached below?
How can I open a trade with this indicator attached below?
You can't trade from an Indicator . . .
DON'T hijack someone else's thread, start your own.
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 have been trying to figure out how to put in a time or bar delay for a Market Order entry. I have seen
a lot of examples.But as I have said before, because there are many ways of doing the code and many
doing it, just makes it harder for me and some others still learning the code. What I am trying to do is:
add a time Delay on a 1 minute chart entry. For example : Order entry + 9min = New Order entry. Or it
could be 9 bars because it will always be a 1 min. chart used for order entry criteria. This is a scalp EA
that uses multiple currency alignment. external double delay = 9.0;
JimTrader1