
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
In principle, you could do with a single line.
Where is it unambiguous?
Try this primitive example. You will understand the "uniqueness" when switching the TF.
In this example, an object with coordinates of current time and price is created in OnInit. In OnCalculate this object moves together with the price.
In OnDeinit it is simply (logically) removed.
When you switch the TF, it turns out that the object appears and then disappears.
Why does this happen?
Because sometimes OnDeinit of the old TF deletes what has already been created in OnInit of the new TF. It is not a bug! What should the programmer who created this example think and did not read this branch?
What is the point of using a primitive example of a two-timers?
Use an example of the VERY correct code instead.
Better use an example of Virtually correct code.
It's the same. The object can be deleted via Deinit of the irrelevant indicator copy. And OnInit of the actual one is performed BEFORE this event.
But it is much better to show the transfer of any information from OnDeinit of the old copy to OnInit of the new one. Actually, this is the point.
This is the same. The object can be deleted via Deinit of the irrelevant indicator copy. And OnInit of the actual one is performed BEFORE this event.
In all other cases, except for pulling the computer's power plug, the object will be deleted.
But it's much better to show passing any information from OnDeinit of the old copy to OnInit of the new one. This is actually the point.
In all other cases, except for pulling the computer's power plug, the object will be deleted.
Reliablypass any information from OnDeinit of the old copy to OnInit of the new copy.
Which, consequently, requires a clear OnDeinit/OnInit execution sequence. I've never needed this, but I've implemented the solution idea without any problems.
You have demonstrated the solution to a private discussion problem. A general one may be formulated as follows
Which, consequently, requires a clear OnDeinit/OnInit execution sequence. I never needed this, but I implemented the solution idea without any problems.
Well, I am not against it. But scratching my right ear with my left little finger is not for me. Instead of such a simple test to write"it" ... I don't even know what to call it. Let it be for the amateur, because masochism has a right to exist. With all due respect to your professionalism in programming.
Instead of such a simple check, write"it" ...
So you did not understand the essence of the problem discussed in this thread.
I understand, but you have transferred discussion of the problem to your abilities (not small).
And after all my answer was to a specific example of a code of a colt, and not in response to your abilities and an example of data transfer with regulation of sequence of execution On_Init and On_Deinit.
What is the purpose of continuing the dialogue? Are you trying to convince me that scratching the right ear with left little finger is very pleasant? Or another purpose?
Or is it a different target?