pls I need your assistance on this EA waiting times

 

Pls can someone explain this senerio pls,I use this code to tell make the EA wait for some seconds but my problem is when its

Attached to each symbol said like EURUSD, and gbpusd after number of wait is completed it loop in to another pair time and

Made the pair to wait again ,there by creating corusion between the two pair symbols..like interference in wait time of each pair

I have other orderselected it yet its doesn't work properly when its attach to 1pair only

Its has no problem when attached to only 1 pair symbol on the chart  but has problem of endless wait loop when attached

To two pairs symbol on the chart.. Pls any assistance is applicated.thanks

Here is the code...

If(localtime() - lasttradetime > 50)
Comment(50second passed)
Return (-1);

Later I tried...
If(Ordersymbol() !=symbol() && localtime() - lasttradetime > 50)
Comment(50second passed)
Return (-1);

Yet its not respond fine,pls I need your assistance.
On how to make the code work separately on each pair symbols and not interferring into
Another pair symbol waiting time
 
chudanever:

Pls can someone explain this senerio pls,I use this code to tell make the EA wait for some seconds but my problem is when its

Attached to each symbol said like EURUSD, and gbpusd after number of wait is completed it loop in to another pair time and

Made the pair to wait again ,there by creating corusion between the two pair symbols..like interference in wait time of each pair

I have other orderselected it yet its doesn't work properly when its attach to 1pair only

Its has no problem when attached to only 1 pair symbol on the chart  but has problem of endless wait loop when attached

To two pairs symbol on the chart.. Pls any assistance is applicated.thanks

Here is the code...


You're better off putting your trading logic in OnTimer if that's what you're doing... 
 

nicholishen:

You're better off putting your trading logic in OnTimer if that's what you're doing...




Yes you are correct I want to put it on timer after the time expires the EA can trade any tick

But how can I do that, this one above works well when you attach it on one symbol, but fails

In timing when another symbol or pair is add...any more help pls

 
I recommend
Do not trade multiple currencies in one EA
Reason: