Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1187
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
but is it possible to declare a class as a base class and then, depending on the conditions, override it as one of the inherited classes?
The task is to leave the class name the same in the code.
Also, please advise which directive to use to define the tester.
Is it possible to do it this way?
Thank you. Yes, but here the news_filter object turns out to be undefined. It must be declared globally to be accessible from anywhere in the code. What to do?
Thank you. Yes, but here the news_filter object turns out to be undefined. It must be declared globally to be accessible from anywhere in the code. What to do?
In what cases would it be undefined?
In which cases will it be indefinite?
Please help me understand the logic behind the execution of this statement and the expression of its condition.
CTrade m_trade; CPositionInfo m_position; if(!m_trade.PositionClose(m_position.Ticket()))
If it does NOT close the position defined by the ticket?
First it gets a position ticket -> the program tries to close the position -> the returned boolean value is reversed.
Right?
Please help me understand the logic behind the execution of this statement and the expression of its condition.
If it does NOT close the position defined by the ticket?
First it gets a position ticket -> the program tries to close the position -> the returned boolean value is reversed.
Right?
-> Returns true if the position with the specified ticket is closed, otherwise false
Condition reads: If position with specified ticket is not closed...
-> Returns true if position with specified ticket is closed, otherwise false
Condition reads: If position with specified ticket is not closed...
The question is, is the program trying to close the position or not?
The question is, does the programme try to close the position or not?
Yes, it does.
Yes, he is.
Thank you for your reply
Please explain.
TheOnTradeTransaction function.
Does it have to be in the Expert Advisor?
If not, in what cases should it be included in the code? And why?