vdemydiuk / mtapi

MetaTrader API (terminal bridge)
http://mtapi4.net/
MIT License
511 stars 276 forks source link

How to open an order using OrderSend #236

Open raykavin opened 3 years ago

raykavin commented 3 years ago

I'm trying to open an order, but some arguments like stoploss and takeprofit are not sent with the score due to conversion to double, when the order arrives in MetaTrader it informs that the levels of stop loss or take profit are incorrect. If possible give me some examples of how to use OrderSend. Thanks!

eabase commented 3 years ago

@RKDEVSYS

  1. This repo is for both MT4 and MT5, please edit your post and make sure to tell us what you are using.
  2. Please provide a code snippet of what you have tried, and what part is not working.
  3. Error messages?
  4. Re-compile the EA and remove the comment (so to enable debug. 5, Make sure you are able to execute the same trade also in your terminal, to be sure that your broker have not blocked too tight trades.

https://github.com/vdemydiuk/mtapi/blob/master/mq4/MtApi.mq4#L48

//#define __DEBUG_LOG__