Download MetaTrader 5

EA on 3 pairs - magical problems - page 2

To add comments, please log in or register
SYED NAUFAL GADDAFI 2014.04.14 14:27  

So, you want to check for currency pair a.k.a. Symbol() too? Just add ..

if (OrderClosePrice()==OrderTakeProfit() && Symbol()==OrderSymbol())

Something like that.

It seems to me you still have a lot of homework to do. You need to check and study documentation more.

Niko 2014.04.14 17:59  

Oh yeah, coding is like Japense to me, but I've come way already!

Thanks for the Symbol tip (strange I couldn't figure that one out, its so simple)

Now I gotta figure out how to make sure the orderhistory checker works with i2, i3, i4 etc - as in history there will be all symbols mixed together so i2 could be any symbol which created a trade

But I can't just say if i2 == Symbol(), the EA needs to look for i2 trade within that symbol, not within the total history pool

(eg: i2 for EURUSD's 2nd last trade in history, or USDCHF 2nd last trade history, for USDJPY 2nd last trade in history = not just 2nd last trade in total pooled history). That's the hard bit I can't figure out.

Any ideas?

To add comments, please log in or register