Announcement

Collapse
No announcement yet.

Script Initialization (v11.2)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script Initialization (v11.2)

    I thought that all scripts would initialize when you opened eSignal. I have something like the following:

    function preMain() {
    ...
    }

    var a = 0;
    var bInit = false;

    function main() {
    ...
    }

    The variable "a" just accumulates data thoughout the day. When I opened eSignal this morning, I noticed that it was not zero and that it had yesterday's ending value.

    I know that reloading is not supposed to change the variable.

    If "a" doesn't change at startup, that would mean that bInit would also not change? That might be a problem.

  • #2
    Never mind. It seems that yesterday's "0" bar isn't closed until the first tick of the new day arrives. So, my script thought it was today when it was still yesterday in eSignal.

    All is well now. Sorry. Still learning.

    Comment


    • #3
      Never mind. It seems that yesterday's "0" bar isn't closed until the first tick of the new day arrives. So, my script thought it was today when it was still yesterday in eSignal.

      All is well now. Sorry. Still learning.

      Comment

      Working...
      X