Mt4 End of support. - page 17

 
Artyom Trishkin:

Describing what? What kind of new topic?

You were just asked to make a hypothetical task - to find a new bar. You were just asked to do a hypothetical task - to find a new bar.


Artyom, I can't imagine an EA where this is needed at all, and more importantly what to do with it.

 
Реter Konow:

And the Russian language will have to be abandoned? It will be excruciatingly difficult to read your own code. I don't even know what to do with it...

By the way, I don't quite understand why people don't like Russian in identifiers.

Personally, in my opinion, Russian identifiers are simply longer. At the expense of simply longer words. On average a Russian word is longer than an English one, and my English-speaking identifiers are quite long at times too. Russian ones are going to be monster-like.

But this is the only, and very minor, disadvantage of Russian identifiers...

An even smaller disadvantage - "they look a little unusual".

Here, too, apparently, everything depends on memory. My English is enough not to stumble on the names. But if your English is not good enough, you might even find it useful to use Russian identifiers.

 
Mickey Moose:

Artem, I can't imagine an EA where this is needed at all, and more importantly, what to do with it.

In principle, any EA could come in handy... Hypothetically.
 
Реter Konow:

So you want a function that determines the start of a new bar on different timeframes?

Not the function itself, but based on it, I'm self-taught trying to explain the benefits of my paltry knowledge of OOP.

Here is the main idea

Forum on trading, automated trading systems and trading strategy testing

Mt4 End of support.

Artyom Trishkin, 2017.09.10 17:58

By describing what? What kind of new topic is this?

You were simply asked to do a hypothetical task - finding a new bar. On at least three timeframes in one EA.


How can we do this without using a class in one EA?
 
Mickey Moose:

Artyom, I can't imagine an EA where this is even needed, and more importantly what to do with it.

Perhaps more than that. If you need to get indicator values for 3-5 TFs, you can't do it on every tick...

In principle, this is for illustration.

 
Alexey Viktorov:

Not the function itself, but based on it, I'm self-taught trying to explain the benefits of my paltry knowledge of OOP.

Here is the main idea


How to do it without using a class in one EA.

Specifically - the task to make a function that determines the beginning of a bar at any timeframe, made without OOP?

What do you mean by "Not the function itself, but based on it"?

 
Mickey Moose:

Artem, I can't imagine an EA where this is needed at all, and more importantly, what to do with it.

But in the trading panels, which I am constantly ordered, it is needed there all the time. This is especially the case when we need to search for one condition during one definite timeframe and then, when it is found, look for other conditions on lower timeframes at every opening of a new bar. I.e. - we already need to know two new bars from each symbol. But it is interesting with symbols - they are selected on the fly, based on certain conditions that are realtime searched through the list of symbols on the server and only those that are needed at the moment are selected. At the next moment (hour, day) there may be completely different symbols on which to search for criteria on new bars of different timeframes.

 
Реter Konow:
In principle, it may be useful in any Expert Advisor... Hypothetically.

Alexey Viktorov:

Probably more. If you want to get indicator values for 3-5 TFs, you can't do it on every tick...

In principle, this is for illustration.


I understand that this is a case study, but it all comes down to practical use. But so far I do not see any. Let's be more specific.

I can do it, but it'll take me about 3 days

 
Реter Konow:

Specifically, the task is to make a function that determines the start of any timeframe bar, made without OOP?

What do you mean by "Not the function itself, but based on it"?

The task is as follows: I want to make a function that will return the fact of opening a new bar. Firstly, on EURUSD M5.

Then the task will be extended.

 
Реter Konow:

Specifically, the task is to make a function that determines the start of any timeframe bar, made without OOP?

What do you mean by "Not the function itself, but based on it"?

I see. I've got the wrong guy... You know how to pass a variable by reference, no doubt.

Now, for simplicity of writing in the code, if you need to specify the specified period and the current period. It turns out that you have to create variables for the current period as well, right?