Please check documentation to use the correct input parameters to the Buy method:
https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade/ctradebuy
Also make sure to turn on AutoTrading when running live!
Documentation on MQL5: Standard Library / Trade Classes / CTrade / Buy
- www.mql5.com
Buy(double,const string,double,double,double,const string) - CTrade - Trade Classes - Standard Library - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
Yashar Seyyedin #:
I checked everything. Ordering is done well in test and demo transactions. But in real trading, all orders are executed well and even the comment is displayed in the chart window, but it does not open a position.
Please check documentation to use the correct input parameters to the Buy method:
https://www.mql5.com/en/docs/standardlibrary/tradeclasses/ctrade/ctradebuy
Also make sure to turn on AutoTrading when running live!mansour afshar #:
I checked everything. Ordering is done well in test and demo transactions. But in real trading, all orders are executed well and even the comment is displayed in the chart window, but it does not open a position.
Did you enable algo trading? Check journal tab for possible errors and messages when executing orders.
I checked everything. Ordering is done well in test and demo transactions. But in real trading, all orders are executed well and even the comment is displayed in the chart window, but it does not open a position.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello, this is my code, it works well in the tester strategy, but when I put it in the main chart for real trades, it does not open a position.