Changing the TF is a problem - page 2

 
Victor Nikolaev:

I do not use alerts in indicators. I provide for full recalculation if the history is loaded. This is easy to control.

Please reveal this secret.
 
Vasyl Nosal:
Please reveal the mystery.

Where did you find the mystery? Almost everything has been said and laid out. Well, almost everything.

 
Victor Nikolaev:

Where did you find the mystery? Almost everything has been said and laid out. Well, almost everything.

So you won't share the code?

Why write that you know how?

 
Vasyl Nosal:

So you won't share the code?

Why write that you know how?

Two lines of code are embarrassing to write.

There's rates_total. There is prev_calculated.

One stores the number of available bars, the second stores the number of bars processed.

If the difference is more than one, history is being loaded.

How do you implement this control? Allah only knows (maybe God knows). It is up to you to decide.

But there are other pitfalls with indicators. If you learned how to write EAs, it does not mean that you can write indicators. And vice versa. The logic of work is different

 
Victor Nikolaev:

Two lines of code are embarrassing to write.

There is rates_total. There is prev_calculated.

One stores number of available bars, second stores number of processed bars.

If the difference is more than one, history is loaded.

How do you implement this control? Allah only knows (maybe God knows). It is up to you to decide.

But there are other pitfalls with indicators. If you learned how to write EAs, it does not mean that you can write indicators. And vice versa. The logic of work is different

So every time they are not equal, the entire history will be recalculated.
 
 
Vasyl Nosal:
Yeah. So every time they're not equal, we have to recalculate the whole story.
Do you have any other options?
 
Victor Nikolaev:
Do you have any other options?
I have a suggestion to somehow make the recalculation of the whole story up to the point when it is already loaded. After that only 0 bar (or as many as you want) should be recalculated.
 

I have an idea. I'll write later.

the idea is dead.

I'll ask developers to make something like HistoryUpdated() system check whether all history was updated or not.

 
Vasyl Nosal:

I have an idea. I'll write later.

the idea is dead.

I'll ask developers to make something like HistoryUpdated() system check whether all history was updated or not.

Developers will not help you because they won't.

I already told you: if the difference between rates_total and prev_calculated is greater than 1, then this is HistoryUpdated.