Placing Orders!!

 

Hello EveryBody,

I am trying to place an order using an EA, but nothing happens, could anybody tell me please where the problem is

for(int i0 = 0; i0 < 100; i0++)
{
if (OrderSelect(i0, SELECT_BY_POS) == true)
{
if (OrderSymbol() == "EURUSD")
{
Total++;
}
}

}

if (Total == 0)
{

OrderSend("EURUSD"),OP_SELL, 0.1, Bid, 3, NULL, NULL, NULL, 0, CLR_NONE);
Alert("Opened Sell Order");

}

The behavoir of this code, is that "Total" gets the number of open EURUSD orders correctly, so the problem is in the second part, i get the alert only, but no order execution.

Thanks

 

CB

Dont know why this compiles - what error appears in the Journal tab?

Line should be

OrderSend("EURUSD",OP_SELL, 0.1, Bid, 3, NULL, NULL, "EURUSD Sell", 0, 0, CLR_NONE);

Good Luck

-BB-

 

Thanks for your reply BarrowBoy.

I solved the problem, it was the lot number that caused the problem.

Thanks again