getting error with OrderSend on forex.com

 

Hi all,

I'm getting a weird error with OrderSend function on forex.com. No matter how I set the price parameter,  a new position will always be opened with current price. 

For example with this function 

OrderSend(Symbol(),0,0.2,NormalizeDouble(Ask+10,MarketInfo(Symbol(),MODE_DIGITS)),10,0,0);

I expect it will return error 129 ( invalid price) which is what I get if I execute it on Alpari's version. However in forex.com, a new position will be open with the current price( not Ask+10) if the function is executed.

 Please help me know what is going wrong?

 

You cannot OP_Buy @ Ask+10; You can only OP_Buy @ Ask.

Use OP_Buy instead of 0. Makes the code more readable.

If you want a Pending Order then use OP_BuyStop etc.

 
If forex.com ECN broker ?, With some ECN broker, we don't have to specify open price to buy or to sell.
 
ubzen:

You cannot OP_Buy @ Ask+10; You can only OP_Buy @ Ask.

Use OP_Buy instead of 0. Makes the code more readable.

If you want a Pending Order then use OP_BuyStop etc.


Yes, but the forex.com MT4 client did let me open new position with the ridiculous price" Ask+10" ( the actual price of this newly opened position was the current market price of course). That's why I were confuse. Now I know it was because forex.com was an ECN ( thank phi.nuts)
Reason: