public:
Signal_Line();
~Signal_Line();
double Time_Frame(double &Trend_Line_Down[][], int Frame, int Down);
int Short_Proboy(double &Trend_Line_Down[][], string Name_Static, int Down, ENUM_TIMEFRAMES);
And when calling a method from an EA, if I need to pass the third value from the enumeration - frame - PERIOD_M30, what should I write in the code questions below?
Trend_Line_Down[Timer_Down][1]=Signal.Short_Proboy(Trend_Line_Down, Name_Static, ???); // Флаг пробоя трендовой нулевой свечой
Kira27: Hi!!! Can you tell me how to pass enumeration data type in class methods? Let's say I want to pass a timeframe. I create in the header of EA of enumeration Then I declare method in class. And when calling a method from an EA, if I need to pass the third value from the enumeration - frame - PERIOD_M30, what should I write in the code questions below?
Question 1: Why create your own enumeration when you have the standardENUM_TIMEFRAMES
... and then a month later you'll be trying to understand what it means ))))
If you're going to write such a code, at least write it in int
so you can at least understand what the author gets in output
...Although it's a perversion ))))
Why convert it to int? Because in mql5, starting from H1, the enumeration value is not equal to the number of minutes. And on the contrary, I think it will cause a lot of confusion.
Why convert to int? Because in mql5, starting from H1, the enumeration value is not equal to the number of minutes. And in my opinion, on the contrary, it will cause a lot of confusion.
Question 1: Why create your own enumeration if there is standardENUM_TIMEFRAMES
Answer)) Drawing a graphical object in the name of the object there is a substring M30 saying where this object was created, and when writing the object data to array double, using the division of the name into substrings, I compare the 0-index of the array with a broken name, by brute force enumeration with an array
obtained, I write the value in the array double, storing characteristics of graph objects. Then, to track the breakdown, fixing and test line, I use a method, in which I should pass the timeframe parameter from the written double array; because lines are created on different timeframes, the breakdown calculation, fixing, test should be calculated according to the timeframe of objects created, regardless of what period is on the chart at the moment. I planned to associate the value of the array
TimeFrame
written to the array of features of graphical objects to be pulled from the array by the index
So? Do they have something different in the ENUM_TIMEFRAMES enum? Or is there a fear of running out of memory? I don't know how to mess around like that...
ps; Ah, how slow I am typing...)))) While I was typing a single line Kira27 typed a lot of......... And something I suspect this will be used in mql4.
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.
Then I declare a method in a class.
And when calling a method from an EA, if I need to pass the third value from the enumeration - frame - PERIOD_M30, what should I write in the code questions below?
But it writes an error when compiling. What might be the catch?
Hi!!! Can you tell me how to pass enumeration data type in class methods? Let's say I want to pass a timeframe. I create in the header of EA of enumeration
Then I declare method in class.
And when calling a method from an EA, if I need to pass the third value from the enumeration - frame - PERIOD_M30, what should I write in the code questions below?
Question 1: Why create your own enumeration when you have the standardENUM_TIMEFRAMES
A question about the cost of a tick.
For which contract size (lot size) is this value calculated?
For example, for the EURUSD currency pair this script gives the same values, but for metals the difference is 10 times. How, why, and how do I know?
If you think about it, it seems to be asking to write
But it gives an error when compiling. What could be the catch?
If you do this enumeration
then you could try writing it like this
If you do this enumeration
you could try writing it like this
... and then in a month you'll be trying to understand what it means ))))
If you must write such a code, at least write it in int
so you can at least understand what the author gets in output
...Although it's a perversion ))))
... and then a month later you'll be trying to understand what it means ))))
If you're going to write such a code, at least write it in int
so you can at least understand what the author gets in output
...Although it's a perversion ))))
Why convert it to int? Because in mql5, starting from H1, the enumeration value is not equal to the number of minutes. And on the contrary, I think it will cause a lot of confusion.
Why convert to int? Because in mql5, starting from H1, the enumeration value is not equal to the number of minutes. And in my opinion, on the contrary, it will cause a lot of confusion.
Because enum is a named 4-byte constant = int
not the number of minutes
Question 1: Why create your own enumeration if there is standardENUM_TIMEFRAMES
Answer)) Drawing a graphical object in the name of the object there is a substring M30 saying where this object was created, and when writing the object data to array double, using the division of the name into substrings, I compare the 0-index of the array with a broken name, by brute force enumeration with an array
Finding the index of the equal string in the array
associate the index with the int array
obtained, I write the value in the array double, storing characteristics of graph objects. Then, to track the breakdown, fixing and test line, I use a method, in which I should pass the timeframe parameter from the written double array; because lines are created on different timeframes, the breakdown calculation, fixing, test should be calculated according to the timeframe of objects created, regardless of what period is on the chart at the moment. I planned to associate the value of the array
written to the array of features of graphical objects to be pulled from the array by the index
and transfer to the breakdown, anchoring and test calculation method.because enum is a named 4-byte constant = int
not the number of minutes.
So? Do they have something different in the ENUM_TIMEFRAMES enum? Or is there a fear of running out of memory? I don't know how to mess around like that...
ps; Ah, how slow I am typing...)))) While I was typing a single line Kira27 typed a lot of......... And something I suspect this will be used in mql4.