- I need some help with this EA coding
- Help with EA CODE
- My bot is not executing trades
Where in the documentation does it state that the CTrade methods Buy or Sell return an enumeration with a possible value of TRADE_RETCODE_DONE?
It doesn't! Both of those methods return a "bool", a true or a false. The same applies to PositionModify.
Also, POSITION_TYPE_BUY and POSITION_TYPE_SELL are constant values from an the enumeration ENUM_POSITION_TYPE. They are not functions.
You need to seriously re-evaluate your code by referencing the documentation and doing more research.
I highly suggest reading the following ...
Orders, Positions and Deals in MetaTrader 5
MetaQuotes, 2011.02.01 16:13
Creating a robust trading robot cannot be done without an understanding of the mechanisms of the MetaTrader 5 trading system. The client terminal receives the information about the positions, orders, and deals from the trading server. To handle this data properly using the MQL5, it's necessary to have a good understanding of the interaction between the MQL5-program and the client terminal.
Where in the documentation does it state that the CTrade methods Buy or Sell return an enumeration with a possible value of TRADE_RETCODE_DONE?
It doesn't! Both of those methods return a "bool", a true or a false. The same applies to PositionModify.
Also, POSITION_TYPE_BUY and POSITION_TYPE_SELL are constant values from an the enumeration ENUM_POSITION_TYPE. They are not functions.
You need to seriously re-evaluate your code by referencing the documentation and doing more research.
I highly suggest reading the following ...
I am new to the mq5 language so I didn't really know this. Thanks🙏🏼.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use