Download MetaTrader 5
To add comments, please log in or register
Publish your article to let the traders see it in MetaTrader 5!
SYED NAUFAL GADDAFI
1401
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
369
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?

/ /12
To add comments, please log in or register