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
Now make it return the fact of opening a new bar on M5. Then make it return the fact of opening on H1, and then return the fact of opening on D1
Why?
My TS does not imply trading on the "new bar". I took it out of the closet at your request.
And if you have a moose growing, it will continue to grow on a new bar. And on the next one after the new one. And (yes, yes, do not be surprised) at the beginning of the next day it won't go anywhere.
So what? Create a new top like this with a description?
I like it much easier to give an estimate of where a tool will go than to write a bot for it.
As for the question
For 5 minutes, the algorithm will be about this:
If 300 seconds have passed since the last value, then this bar is new, respectively, 3600 for an hour.
Why?
My TS does not involve trading on a "new bar" at all I took it out of the closet at your request.
And if your moose is growing, it will continue to grow on the new bar. And on the next one after the new one. And (yes, don't be surprised) at the beginning of the next day it won't go anywhere.
So what? Create a new top with the same description?
A description of what? What kind of new topic?
You were simply asked to make a hypothetical task - to find a new bar. On at least three timeframes in one EA.
If Reteg Konow wishes to participate, please be my guest.
No, not like this. It's like this:
If @Reteg Konow wants to participate, you're welcome.
The other side is those who don't need OOP, because there are no OOP-specific tasks. But they use it. Because they like it, it is progressive, professional programmers use it and it will come in handy.
But from the viewpoint of result it does not matter much whether it has OOP or not
It is not.
I have already said more than once what the advantage of the OOP approach is.
Encapsulation allows me not to worry that I could "get in the wrong place" and disturb the work of ready to use module.
Inheritance and polymorphism - allows to easily change behavior of similar objects, in case of MT - that is orders (open MT4, pending and historical MT4-5) and MT5-positions. In addition - the protocols of interaction with the trade server.
Also, my internal architecture of the Expert Advisor - there is a queue of requests for trade actions, all the TC in the Expert Advisor send their requests to this queue and then the trade processor executes these requests. So the requests themselves are very effectively described within OOP-approach.
All these things would be no less easy to write in procedural approach, and most importantly - then it is very difficult to modify, if necessary.
If Rehtag Konow wants to participate, you're welcome to do so.
Participate in what?
I'm sorry, I don't understand.
No, not like this. It's like this:
If @Reteg Konow wishes to participate, you're welcome.
That didn't work for me. And not everyone has push notifications enabled. I certainly do not and never will.
Participate in what?
Sorry, I do not understand.
Forum on trading, automated trading systems and trading strategy testing
Mt4 End Support.
Alexey Viktorov, 2017.09.10 16:47
If you are willing, let's do it this way:
Do you have a function to define a new bar? If you have it, post its code.
And describe the sequence of calls to this function when we need to know the new bar on M5, H1 and D1.
Then we will continue.
Forum on trading, automated trading systems and trading strategy testing
Mt4 End of support.
Mickey Moose, 2017.09.10 17:40
I really don't know why you need it. This is a skeleton for the current TF.Forum on trading, automated trading systems and trading strategy testing
Mt4 End of support.
Alexey Viktorov, 2017.09.10 17:45
I have been working on this for a long time and I am confident that it will work. What if on any timeframe it is necessary to identify the onset of a new day? I.e. a new bar on D1. How do you do in this case?
It's a sequence of a self-taught person explaining the benefits of OOP to an equally self-taught person. Not to the full extent, but only the rudiments of OOP.
This is a continuation.
So you need a function that determines the start of a new bar on any timeframes?