How do I move the global variable structure in the indicator when moving to another timeframe? - page 3

 
Mikhail Nazarenko:

Take a broader view. In addition to the calculation of indicator data, there are also set alerts, other user actions that should not change with timeframe changes. How to deal with them?

Write in global variables of the terminal, read objects from the chart.

Startup alerts can't (shouldn't) happen, i.e. unambiguously wait for a new one.

ps. double-variable is 64 bits = 64 button-switches can be stored in one global variable.

 
Taras Slobodyanik:

Write to the global variables of the terminal, read objects from the chart.

Startup alerts can't (shouldn't) happen, so definitely wait for new one.

Better yet, write to globals and back them up to objects because sometimes globals crash on unexpected events (terminal crash, power outage)

 
Taras Slobodyanik:

Write to the global variables of the terminal, read objects from the chart.

Startup alerts can't (shouldn't) happen, i.e. unambiguously wait for a new one.

you're on a quest to "backup/restore or transfer to another terminal without once mashing":-)

 
Maxim Kuznetsov:

You will be on a quest to "backup/restore or transfer to another terminal without ever swearing":-)

Not at all, practically no one needs it.

 
transcendreamer:

Better yet, write to globals and back them up to objects because sometimes globals get knocked out by unexpected events (terminal crash, power outage)

restart from scratch, no big deal

 
Taras Slobodyanik:

Write to the global variables of the terminal, read objects from the chart.

Startup alerts can't (shouldn't) happen, i.e. unambiguously wait for a new one.

ps. double-variable is 64 bits = 64 button-switches can be stored in one global variable.

That's how we're discussing the topic because without crutches there's no fucking solution. I already have all sorts of crap to get around the paucity of a programming language. And I wanted an evolution.

 
Mikhail Nazarenko:

This is why we're discussing the topic, because without crutches, we can't solve shit. I already have a lot of crap to get around the paucity of the programming language. And I wanted evolution.

In the very beginning it was about writing structures - eitherFileWriteStruct or through a union like any file.

 
Taras Slobodyanik:

restart from scratch, no big deal

Then we should add: restart from scratch and manually reset all values to restore the whole context 😊

 
transcendreamer:

Then I should add: restarted from scratch and manually re-keyed all values to restore the whole context 😊

well... if it's such a complex calculator, then yes, you have to save the file, but somehow I'm sure a few clicks will be enough.
(or a few global variables to save what the user clicked)

 
Personally, I use resources via union.
Even arrays of structures are easily transferred between TFs without writing to a file.
Reason: