I need help with my ea, it doesnt trade.
Ruben Ortega:
Im coding an ea that sells but i dont know why it doesnt work. I upload you the image of the pattern that i want to code. Thanks
The first observation is this:
for (int i=0;i<OrdersTotal();i++) {
If you have no orders in the system this loop will never execute - have you tested that?
After that it is a matter of debugging each step to make sure you reach and successfully execute the OrderSend()
Ruben Ortega:
Im coding an ea that sells but i dont know why it doesnt work. I upload you the image of the pattern that i want to code. Thanks
for (int i=0;i<OrdersTotal();i++) { int orden_seleccionada = OrderSelect (1,SELECT_BY_POS,MODE_TRADES); if (OrderSymbol()==Symbol() && OrderMagicNumber()==magic) { trade= false; break; } }
for (int i=0;i<OrdersTotal();i++) { int orden_seleccionada = OrderSelect (1,SELECT_BY_POS,MODE_TRADES); if (OrderSymbol()==Symbol() && OrderMagicNumber()==magic) { trade= false; break; } }
Im coding an ea that sells but i dont know why it doesnt work. I upload you the image of the pattern that i want to code. Thanks