
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
A word of advice. There are two variables of datetime type. How can I find out the time difference between two points in MQL5?
... In other words, time1 = 21:20, time2 = 21:35, how do I get 15 minutes?
... For C++, there is such a function:http://www.cplusplus.com/reference/clibrary/ctime/difftime/, but I can't find it in MQL5.
2 Karlson:
I noticed it straight away, it's just the 1970s that confuse me. So far I don't have a good solution, so I'm doing this:
Print("Connection is restored after ", TimeToString(TimeLocal()-disconnectTime,TIME_MINUTES), " of waiting.");
2 Karlson:
I noticed it right away, it's just the 1970s that confuse me.
Is it possible to write an Expert Advisor and run it in the strategy tester in such a way, that the indicators which are used in the Expert Advisor are not displayed in the Strategy Tester? And is it possible to increase the font size with Comment when displaying comments?
1. You can. Create a special template for the expert to test <expert_name>.tpl
2. You cannot. For your purposes, use the "text label" object(OBJ_LABEL) and set a font size you need (OBJPROP_FONTSIZE)
How to solve a problem like this.
There are two arrays of zigzag extrema, High and Low, and a TimeBuffer array
It is unknownwhich array, High or Low, begins to fill first.
We need to find the anchor points for the objects as shown in the screenshot.
Let the first object (1) be at the Low extremum ; the second object (2) have the same bar but the bar price is High (3). Accordingly, (3) is at theHigh extremum, (4) is the time object (3) at the price (5), etc.
Twisted two variants: two variables and two flags; two additional arrays. As a result, I only got completely confused.
Nah, the extremes (1,3,5,7,9) are plotted against.
Object 2 has the time of the 1st extremum (low) and the price of the 3rd (nai). And 4,6 etc. are the same, with a shift. These are the even ones how to find/build.
And in parallel, another question on the same subject.
How to pull out anchor points/extremes from two arrays? For example, to draw trend points through 1-3 points, 3-5, 5-7... They are indexed differently in the arrays.
Through a variable, look for the first nonempty value, store it, look for the second one in another array, compare... In general, is it easier to zigzag with a single buffer?
(Please file this down but please))) I really thought I could not do it, but something came up. Again, I do not pretend to be right. This is not my bread )))
If something is not clear, then specify. I do not know how to count the zigzag, which is recalculated, so marks have a chance to disappear, as well as appear redundant. on peaks, but there zigzag no longer.