Hello folks, I would like to know why when I'm going to place an order I have to specify the price?
I have noticed that I have to specify the price for the two ways I know I can place an order:
"CTrade.PositionOpen(...)" and "OrderSend(request, ...);" where request contains the bid/ask price depending on if it is a buy or sell operation.
Where you specify the price you also specify deviation (slippage), the price is the price you would like to buy/sell at if that price cannot be met then you allow an amount of latitude, deviation. You can't specify a deviation without also specifying a price. If you don't want to specify a price then you need to be able to use Market or Exchange execution, but they may not be available for the symbol you want to trade from the Broker you are using . . . it is possible to check . . .
It depends on the symbol execution type ( ENUM_SYMBOL_TRADE_EXECUTION ) if it's Market or Exchange execution then you don't send the open price, if it's Request or Instant execution then you need to send the open price.
There is a little more info in this thread: https://www.mql5.com/en/forum/11303


- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello folks, I would like to know why when I'm going to place an order I have to specify the price?
I have noticed that I have to specify the price for the two ways I know I can place an order:
"CTrade.PositionOpen(...)" and "OrderSend(request, ...);" where request contains the bid/ask price depending on if it is a buy or sell operation.
Thanks in advance, Cyberglassed.