When does it make sense to keep part of the robot code in an indicator? - page 32

 
Andrei01:
Where does this postulate come from? There is one and the same certain calculation that can be done either in an indicator or in an Expert Advisor, is it really necessary to explain such elementary things?


It is not so. In indicators all calculations related to the chart data can be performed in an easier and faster way.
 
Integer:

This is not true. In indicators all calculations related to the chart data can be done in an easier and faster way.
And you can't do the same calculations in the Expert Advisor?
 
Andrei01:
Can't the same calculations be done in Expert Advisor?

You can, but in a different way, because:

1. IndicatorCounted()

2. work with arrays.

Is it finally starting to come to your senses?

 
TheXpert:

You can, but in a different way, because:

1. IndicatorCounted()

2. Array handling.

Are you finally starting to get the hang of it?

1. IndicatorCounted() can also be implemented in ekspert.

2. arrays are also available.

There's no logic to it.

 
Andrei01:
Can't the same calculations be done in an expert?


You can't do the same calculations.
 
Andrei01:

1. IndicatorCounted() can also be implemented in ekspert.

You'll have a hard time
 

This thread is great. Quite worthy of the "fastest flubber" award.

_____________________________________

For those who don't understand why the code suggested by hrenfx in the first half of the discussion will not correctly handle skips, here's what I'm talking about.

When communication is restored, events in the terminal occur in the following order. The tick event passes first, and since the incoming tick has a new bar time, it will be referred to exactly the last, zero bar. The indicator/expert will calculate its algorithm thinking that the last tick is the zero bar, and the last bar before the passing is bar number 1, though in fact a lot of time could have passed between them. And only then will the terminal insert the pumped up missing piece of history. Thus, at the time of the actual update of the history the zero bar has already been calculated and it is its time that is contained in the PrevTime variable, which means that the swapped bars will be skipped.

Just in case, I'm asking those who know but are silent - am I getting it right?

 
alsu:
You'll be tortured
If you know the algorithm, you always know the number of bars you need to calculate at a given moment.
 
Integer:

The same ones won't work.
what's the problem with the calculations?
 
Andrei01:
If you know the algorithm, you always know the number of bars you need to calculate at a given moment. it will be faster and easier.

You're hopeless :)

alsu:

Just in case, I ask those who know but are silent - Am I stating it right?

Yes, I've already explained it twice.

alsu:

This thread is great. Quite worthy of the prize for "fastest flooding".

It's just that I'm really fed up with the topicstarter's ramblings. Dimitri can see that too.

It's not the first time this has happened.