vdemydiuk / mtapi

MetaTrader API (terminal bridge)
MIT License
529 stars 283 forks source link

How to open an order using OrderSend #236

Open raykavin opened 4 years ago

raykavin commented 4 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 4 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__