I open a new EA, and I see so much code, so I jokingly think "Do I even need to add any more code for it to trade", and so I load it into the tester, IT TRADES!!
lol
I'm not really sure what's going on but I was hoping I could build my own EA based on the one I had designed on mt4 , using mt5 EAs as a reference, but I see so many "include"s that I'm sure no EA gives you the full picture of what is going on.
Is there anything like the MACD sample from mql4, that would be a great start, atm the EA creator is getting too involved with aspects of the code, it's trying to manage my money management ect.
How can I go about tackling this?
int OpenOrdersThisPair(string pair) { int total=0; for(int a=OrdersTotal()-1;a>=0;a--) { OrderSelect(a,SELECT_BY_POS,MODE_TRADES); if(OrderSymbol()==pair) total++; } return (total); } int OpenSellOrdersThisPair(string pair) { int total=0; for(int b=OrdersTotal()-1;b>=0;b--) { OrderSelect(b,SELECT_BY_POS,MODE_TRADES); if(OrderType()==OP_SELL && OrderSymbol()==pair) total++; } return (total); } int OpenBuyOrdersThisPair(string pair) { int total=0; for(int c=OrdersTotal()-1;c>=0;c--) { OrderSelect(c,SELECT_BY_POS,MODE_TRADES); if(OrderType()==OP_BUY && OrderSymbol()==pair) total++; }
I want to translate it into mql5 but it's totally different.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I open a new EA, and I see so much code, so I jokingly think "Do I even need to add any more code for it to trade", and so I load it into the tester, IT TRADES!!
lol
I'm not really sure what's going on but I was hoping I could build my own EA based on the one I had designed on mt4 , using mt5 EAs as a reference, but I see so many "include"s that I'm sure no EA gives you the full picture of what is going on.
Is there anything like the MACD sample from mql4, that would be a great start, atm the EA creator is getting too involved with aspects of the code, it's trying to manage my money management ect.