[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 364

 
AndEv:

And how to make this sub-window autoscale depending on the maximum/minimum values of the graphical objects created by this script?

Declare the indicator buffer. Make it invisible. Read extreme values from graphical objects. Assign maximum and minimum values through one cell. It will extend the scale vertically.

 
Zhunko:

Declare the indicator buffer. Make it invisible. Read extreme values from graphical objects. Assign maximum and minimum values through one cell. It will extend the scale vertically.



It doesn't work from the script.
 
AndEv:

It doesn't work from the script.
The script only loads the indicator and, if necessary, draws objects. The indicator does the rest.
 
Zhunko:
The script only loads the indicator and, if necessary, draws objects. The indicator does the rest.

Can you give an example of how to run the indicator from the script?
 
AndEv:

Can you give an example of running an indicator from a script?
Library. There is a test script with examples there.
 
Zhunko:
Library. There is a test script with examples there.

Thanks. Another question: I have done looped scripts many times (using cycle While(!IsStopped())), everything worked. Now I need to do the same in indicator (to avoid waiting for the next tick), but it hangs. What do I need to do?
 
AndEv:

Thank you. Another question: I've done looped scripts many times (using cycle While(!IsStopped())), everything worked. Now I need to do the same in indicator (not to wait for the next tick), but it hangs. What do I do?
You cannot loop an indicator. They work in the interface thread. It is written in the documentation.
 
Zhunko:
Indicators cannot be looped in. They work in the interface thread. It is written in the documentation.

In that case, how can the indicator be re-initialised from the indicator ?
 
AndEv:

In that case, how can this indicator be re-initialised from the indicator?
By tick or tick emulation. The library has it all.
 
Zhunko:
By tick or tick emulation. The library has it all.

Thank you.
Reason: