Questions from Beginners MQL4 MT4 MetaTrader 4 - page 220
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
//
Personally I have the following idea:
1. Fiya fills the array of losing orders with their closing values ( Mass[i] = OrderCloseTime();). That is, the array stores only the closing dates and times of the losing orders
2. We start comparing the element at position i and at position i-1 (2 adjacent ones)
2.1 we compare them by converting the cell data to the day of the year ( TimeDayOfYear(Mass[i]) and TimeDayOfYear(Mass[i-1])
2.(Suppose the first losing day = 178, and the previous one = 176 --> no series, because they are not consecutive, respectively if the first = 178, and the second 177 --> we have a series)
2.3 With the for loop we look through all cells of the array and compare its neighbours. If there is a series of losses on neighboringelements of the array--> let's start accelerating until we reach the necessary minimumnumber of losing days to consider it as a series. 2. (if point 1 is fulfilled) BEFORE the series stops.
2.4 THE SERIES STOP --> remember the index of the array element where it ended and remember the number of elements in the series (the series can be == OR greater than the value entered from the keyboard)
3. ----here begins problem of realization---
3.1 We should "step back" somehow through series of losing days, knowing date of each element, translate date from datetime --> string,
3.11 fill string ( I don't know, maybe through StringAdd()?), and output it to LOG-file (not million times, just one)
Algorithm of Expert Advisor is not important, important is user's function itself
For Christ sake, help!))
Hello. Signed up for the signal. But after a few days the percentage of total increase from a few hundred was only 58%. Percentages from previous months have lost their blue colour and turned grey. Why is this happening? What could be the reason?
You have signed up for yet another deposit divider. Do you see the vertical line on the chart to the left of the 76th trade? This line shows the moment you connected to the monitoring. Before the connection to monitoring, this account was "withdrawn" from several dozens of other accounts that do not have such a pretty picture (they were safely drained). The deposit with beautiful indicators is connected to the monitoring and receives money from newcomers who like beautiful pictures. So do not believe the indicators that were obtained before joining the monitoring.
A copy of an instance of the class.
If I make this assignment:
then when I subsequently change Cl1, then Cl2 changes as well.
So, obviously, the assignment is just a reference.
But I need to save an instance of a class which would store all the properties that were given to it at the time of the assignment.
How to do this?
A copy of an instance of the class.
If I make this assignment:
then when I subsequently change Cl1, then Cl2 changes as well.
So, obviously, the assignment is just a reference.
But I need to keep an instance of a class which would store all the properties which were given to it at the time of assignment.
How to do this?
You probably do it:
CClass* cl1=new CClass; CClass* cl2=cl1;
, and you need this.
You need a copy constructor:
You need a copy builder:
Thank you!
I'll try it, but it's not clear how it works.
If it passes the copy reference to the copied class, what difference does it make?
Will both be referring to each other again?
Thank you!
I'll give it a try, but it's not clear how it works.
If it passes the copy a reference to the copied class, what difference does it make?
Will both of them be referring to each other again?
No, they won't. This is a new object. And in the constructor you simply fill in the fields. There are subtleties there too, so chew on it) There's nothing about it in local help (although I may be wrong), so read how it's all done in C++ and make corrections for local realities. Good luck)
They won't. This is a new object. And in constructor you just fill fields. There are subtleties there too, so chew on it) There is nothing about it in local help (although I may be wrong), so read how c++ does it all and make adjustments for local realities. Good luck)
Yes, that's how it works.
Thank you!
It would be interesting to know from the authors how it works:
{this=mOther;}
Why is there a transfer by value when one would expect a reference to be transferred?
Fortunately, such a copy construct is possible!
Good afternoon!
Can you please tell me why in my MT4 I can't set take and stop loss with my mouse from the entry point of the position?
Maybe I need to adjust something, but I don't understand what it is, please help me
Good afternoon!
Can you please tell me why in my MT4 I can't set take and stop loss with my mouse from the entry point of the position?
Perhaps I need to configure something, but I do not understand what it is, please help me
Try holding down "Alt" on your keyboard and drag