A variable that have the same value even when course is changing. Saving value to next counting.

 

I want save results of counting to use them when next tick induce reaction in EA and there will be next counting.

A Variable that will still have a value from last counting to the next counting even when meantime course will change. Even better if it will still have this value when i shut down computer and turn it on again, but this is not required. 

 Can you help me?

 
BorysekPL:

I want save results of counting to use them when next tick induce reaction in EA and there will be next counting.

A Variable that will still have a value from last counting to the next counting even when meantime course will change. Even better if it will still have this value when i shut down computer and turn it on again, but this is not required. 

 Can you help me?

Read the documentation about Global Variables
 
RaptorUK:
Read the documentation about Global Variables

Thanks

 
BorysekPL:

A Variable that will still have a value from last counting to the next counting even when meantime course will change.

Even better if it will still have this value when i shut down computer and turn it on again, but this is not required.

  1. A static or globally declared (common) variables retain their values between calls to start(). They are lost when the EA is removed (chart closed, terminal close, OS reboot, etc.)
  2. Global Variables retain their values when the terminal is properly closed. They will NOT be saved to disk if the terminal is killed, OS reboot, etc.
  3. Only persistent storage (writing to a file on any modification) insures that the values will be there on restart.
Reason: