Roman Sharanov NULL. But if I just copy the code from the first constructor to the second one and don't call it, everything works. What is the problem?
And here it's simple. A CWave object is created and immediately destroyed))) This temporary object has nothing to do with the instance in whose constructor the call was made)))
The problem is not understanding what happens when you make a call:
And here it's simple. A CWave object is created and immediately destroyed.) This temporary object has nothing to do with the instance in whose constructor the call was made)))
I am writing a grid EA, I need to find a profit only for the order with the maximum ticket and the order with the minimum ticket (the minimum is for later), now I want to find a profit for the maximum order. I am attaching the function and a picture which shows the principle of opening a grid of orders. My question is, am I correct in writing the function for calculating the profit of an order with a maximal ticket? Thanks in advance.
I am writing a grid EA, I need to find a profit only for the order with the maximum ticket and the order with the minimum ticket (the minimum is for later), now I want to find a profit for the maximum order. I am attaching the function and a picture which shows the principle of opening a grid of orders. My question is, am I correct in writing the function for calculating the profit of an order with a maximal ticket? Thanks in advance.
The problem is not understanding what happens when you make a call:
And here it's simple. A CWave object is created and immediately destroyed.) This temporary object has nothing to do with the instance in whose constructor the call was made)))
Don't get fancy. The essence of what happens is that you call a method that is a constructor with a different set of parameters. No object is created by this.
A similar constructor call, which also will not lead to the desired result:
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
... I'll check it out one of these days.
Today or the other day?
That's troubling...
But if I just copy the code from the first constructor to the second one and don't call it, everything works. What is the problem?
The problem is in MQL.
In such situations, I put initialization in separate method which I pull from different constructors.
---
There is also a problem with calling the parent constructor.
The problem is in not understanding what is happening when calling it:
And here it's simple. A CWave object is created and immediately destroyed))) This temporary object has nothing to do with the instance in whose constructor the call was made)))
The problem is not understanding what happens when you make a call:
And here it's simple. A CWave object is created and immediately destroyed.) This temporary object has nothing to do with the instance in whose constructor the call was made)))
Good day all!!!
I am writing a grid EA, I need to find a profit only for the order with the maximum ticket and the order with the minimum ticket (the minimum is for later), now I want to find a profit for the maximum order. I am attaching the function and a picture which shows the principle of opening a grid of orders. My question is, am I correct in writing the function for calculating the profit of an order with a maximal ticket? Thanks in advance.
So today or the other day?
It's a bit alarming...
It's fine. I wanted to check now, but they called me and I realised I wouldn't be back soon. That's quite a report, isn't it?)
Good day all!!!
I am writing a grid EA, I need to find a profit only for the order with the maximum ticket and the order with the minimum ticket (the minimum is for later), now I want to find a profit for the maximum order. I am attaching the function and a picture which shows the principle of opening a grid of orders. My question is, am I correct in writing the function for calculating the profit of an order with a maximal ticket? Thanks in advance.
The problem is not understanding what happens when you make a call:
And here it's simple. A CWave object is created and immediately destroyed.) This temporary object has nothing to do with the instance in whose constructor the call was made)))
Don't get fancy. The essence of what happens is that you call a method that is a constructor with a different set of parameters. No object is created by this.
A similar constructor call, which also will not lead to the desired result:
this.CWave(namePref, startPrice, startTime, endPrice, endTime);Hello, could you please tell me if I understand the expression correctly?
MaxMartinLot = Lot*MathPow(K_Martin,OrdersClose); - means K_Martin , to the extent of OrdersClose ?
Hello, could you please tell me if I understand the expression correctly?
MaxMartinLot = Lot*MathPow(K_Martin,OrdersClose); - means K_Martin , to the extent of OrdersClose ?
What is OrdersClose ?
See here