![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
If you're willing, let's do it this way:
Do you have a function for defining a new bar? If you have it, post its code.
And immediately describe the sequence of calls to this function when we need to know the arrival of a new bar on M5, H1 and D1.
Then we will continue.
I really don't know why you need it. This is a skeleton for the current TF.
Now make it return the fact of opening a new bar on M5. Then make it return the opening on H1, and then return the opening on D1
I really do not know why you need it. This is a skeleton for the current TF.
Fine. What if on any timeframe we need to determine the onset of a new day? That is, a new bar on D1. What do you do in this case?
It is a consistency of a self-taught programmer to explain to another self-taught programmer the advantages of OOP. Not fully, but only the rudiments of OOP.
Now make it return the fact of opening a new bar on M5. And then make it return the fact of opening on H1, and then return the fact of opening on D1.
Don't mock) It cannot be done universally in this style. You have to make copies for every timeframe.
Don't mock) It cannot be done universally in this style. You have to make copies for every timeframe.
Don't tell me. Sit down two...
And Artem's stake, too.
Don't mock) It cannot be done universally in this style. You have to make copies for every timeframe.
What a waste... You should have tried it yourself and come up with a simple solution - class.
Don't tell me. Sit down two...
I came across a very succinctly written one somewhere, but I can't remember who posted it or where.
Well, that's for nothing... You should have tried it yourself and come to a simple decision - class.
Sooner or later it comes to that if the need arises.
And Artem's stake, too.
So I'm... I didn't...![](https://c.mql5.com/3/153/neznaet.gif)
I figured you weren't here, so I went ahead with your plan... I wouldn't just give it all away. I would have let him feel it for himself...