Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1299
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
You have to check in the debugger. I can't say for sure.
Got it, thanks.
Friends,please advise how to prescribe a code in the advisor to trade only in one direction Buy or Sell
F7 - general - shopping only
F7 - general - purchases only
no such thing in mt5
Friends,please advise how to prescribe a code in the advisor to trade only in one direction Buy or Sell
That's the way it is;
That's the way it is;
Thank you
Good afternoon, colleagues. I can't find an error in the code. The .Magic() method of theCPositionInfo class gives the correct value, if the trade is opened directly in the code through the Trade.mqh class.
If I open a deal through Trade.mqh, but called in another class, then the.Magic() method gives 0 in the Expert Advisor code. Why is it so?
I am attaching the code.
Good afternoon, colleagues. I can't find an error in the code. The .Magic() method of theCPositionInfo class gives the correct value, if the trade is opened directly in the code through the Trade.mqh class.
If I open a deal through Trade.mqh, but called in another class, then the.Magic() method gives 0 in the Expert Advisor code. Why is it so?
I am attaching the code.
I do not open the code)
So, the second variant does not use Magic, look carefully at the code
Good afternoon, colleagues. I can't find an error in the code. The .Magic() method of theCPositionInfo class gives the correct value, if the trade is opened directly in the code through the Trade.mqh class.
If I open a deal through Trade.mqh, but called in another class, then the.Magic() method gives 0 in the Expert Advisor code. Why is it so?
I am attaching the code.
I haven't even looked at the archive.
The algorithm is always the following: You create 'm_trade' - object of CTrade class. If you want it to trade by its Magic - you must do
- That is, you must set this Magic for the object of CTrade class.
there's no such thing in mt5.
I'm doing it the old-fashioned way, I can't get out of it...