I was wondering if someone could show me a way to create a variable in a signal or indicator and have it load initially the first time then maintain that value until it is changed within the script and not on every bar close.
Global Variable ??
Questions about MultiCharts and user contributed studies.
4 posts • Page 1 of 1
No, initial value is set only once and variable values set by the script are persistent across multiple executions - if code is executed only once per bar (update on every tick is off). If code is 'update on every tick' then the intra-bar values are screwy (IMO) but MC is implementing the EL language, they don't get to make decisions about how the language is designed. See this thread: