Questions from Beginners MQL5 MT5 MetaTrader 5 - page 831

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
I mean the first name, it says you have to change the first name to the real name, but it doesn't work
Yes, if your status is "Seller" you cannot edit your details:
Try writing a request to servicedesk with an explanation.
Yes, if your status is "Seller" you cannot edit your details:
Try writing an application to servicedesk with an explanation.
That's the thing, no, you have to edit to become one. It's a vicious circle...
Yourapplication for registration as a Seller has been rejected by the moderator.
Please correct the data you provided.
***
Please correct the data you have provided.
Could this be the reason? The pictures are crooked or dark or not as required...
That's the thing, no, you have to edit to become one. It's a vicious circle...
Yourapplication to register as a Seller has been rejected by the moderator.
Please correct the data you provided.
Please advise how to use void Ignore(long value) { m_ignore=value; } method of standard CExpertSignal class in custom Trailing class when programming in MQL5? How can I access it?
I have a custom signals class that gives me methods to open and close positions. But in Trailing I wanted to maintain position by another method. If to write separately custom classes MySignal and MyTrailing, a position is closed by the condition, which triggered first. If Trailing condition was triggered earlier, everything is fine. But sometimes a new (reversal) signal comes from MySignal and the position is reversed, and I need it to be accompanied by Trailing after opening, not closing and not opening a new one. I've looked at the base classes and there is a feeling that m_ignore from the base signals class is responsible for this. If it's assigned value 1 in the appropriate filter, it seems to work as it should. I have added filter0.Ignore(0) to the Expert Advisor class in OnInit. But I'm new to OOP and don't understand how to change this value in MyTrailing class, which is not inherited from CExpertSignal class, but is its "cousin" (let's say filter0.Ignore(1) ). Please advise how to do this.
Actually, more general question: how to pass information between two classes which are not descendants? How to transfer information from trailing class to signal class? Probably, you can create a global variable and communicate through it. But this looks completely perverted with respect to logic of protected members in OOP.
Please help! I already tried to move away from build Ignore (which, of course, is not good in itself, people tried to include it in the base code) and still can not connect. I'm trying to invent for the third day (I haven't got a manual yet).
I've even tweaked class codes: I've implemented protected boolean member (m_permition) in MySignal class and created a Set method for it; I've tucked return(0) into long division and shot division if !m_permition. In MyTrailing also created a protected boolean member m_signal_permition, created Get and Set methods to it, taught CheckTrailing to control it if(position==NULL) {m_signal_permition = true; return(false);} else m_signal_permition = false;
I don't understand only one thing, where and how I should bring them together. I tried simply referring to them in OnTick, but it fails.
I read Vladimir's article "How to teach...". The idea of creating an instance of another signal in custom signal and communicating through it seems to be clear, but somewhere in my system it doesn't fit together completely: classes of signal and trailing are not inherited from each other.
Help, people of goodwill, in any way you can.
Hello colleagues. In addition to the protection price, MT5 quotes contain some data, such as historical spread and slippage (which is the same everywhere by default and is 10 five-digit points).
By making such a request after opening a position:
We get this answer:
Do I understand correctly that the MT5 tester counts both spread and slippage together, exactly as in MT4 I would manually set the spread to 13 pips, for the specific example in the screenshot.
Hello Can someone please help me with this, how can i link an mt5 EA to a specific account number?
Hi, can someone please help me with this, how can i link an mt5 Expert Advisor to a specific account number?
I need to check the account number. This should be done in OnInit() and OnTick(). Example:
Hello, I am trying to transfer indicators from MT4 to MT5. I have a simple indicator that shows the time until the next bar. This indicator uses OnTimer. I update it in OnTimer using void refreshClock() function. Is it correct to use this construction for other indicators that require the use of OnTimer? Or you can optimize the process of addressing to OnTimer?
Can someone please help! Already tried to move away from the built-in Ignore (which, of course, is not good in itself, people tried to include it in the base code) and still can not connect. I'm trying to invent for the third day (I haven't got a manual yet).
I've even tweaked class codes: I've implemented protected boolean member (m_permition) in MySignal class and created a Set method for it; I've tucked return(0) into long division and shot division if !m_permition. In MyTrailing also created a protected boolean member m_signal_permition, created Get and Set methods to it, taught CheckTrailing to control it if(position==NULL) {m_signal_permition = true; return(false);} else m_signal_permition = false;
I don't understand only one thing, where and how I should bring them together. I tried simply referring to them in OnTick, it fails.
I read Vladimir's article "How to teach...". The idea of creating an instance of another signal in custom signal and communicating through it seems to be clear, but somewhere in my system it doesn't fit together completely: classes of signal and trailing are not inherited from each other.
Help me, people of goodwill, in any way you can.
I've made progress in a week! Found Signal method in CExpert class. Inserted code into OnTick.
CExpertSignal *my_signal = ExtExpert.Signal(); my_signal.Ignore(0);
Now, if I change "1" in brackets manually, the Ingnore method works - the Expert Advisor performs no trades by the signal.
It only remains to understand how to get information about the trailing object in OnTick. Unfortunately, there is no method ExtExpert.Trailing() to get reference to trailing object and, hence, the compiler doesn't understand which object I want to apply my implemented in trailing method GetPermition to. Maybe someone can tell me what to do?