Announcement

Collapse
No announcement yet.

setComputeOnClose() and getCurrentBarIndex()

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

  • setComputeOnClose() and getCurrentBarIndex()

    Hello,

    When setComputeOnClose(), on daily chart, the last bar index is 0 while on intraday chart, the last bar index is -1. Does it mean in EFS, on daily chart, it would process the last daily bar without waiting it being finished?

    - Clearpicks


    function preMain()
    {
    setPriceStudy(true);
    setStudyTitle("TestDailyComputeOnClose");
    setComputeOnClose();

    }

    function main()
    {
    debugPrintln(getCurrentBarIndex());

    }

  • #2
    Re: setComputeOnClose() and getCurrentBarIndex()

    clearpicks

    When setComputeOnClose(), on daily chart, the last bar index is 0 while on intraday chart, the last bar index is -1.
    FWIW that behavior is true only for versions prior to 10.3 . In version 10.3 a fix was implemented to a long standing bug which caused setComputeOnClose() to be disabled when an efs was running on daily or higher intervals.
    Alex


    Originally posted by clearpicks
    Hello,

    When setComputeOnClose(), on daily chart, the last bar index is 0 while on intraday chart, the last bar index is -1. Does it mean in EFS, on daily chart, it would process the last daily bar without waiting it being finished?

    - Clearpicks


    function preMain()
    {
    setPriceStudy(true);
    setStudyTitle("TestDailyComputeOnClose");
    setComputeOnClose();

    }

    function main()
    {
    debugPrintln(getCurrentBarIndex());

    }

    Comment


    • #3
      Re: Re: setComputeOnClose() and getCurrentBarIndex()

      Alex,

      Thank you for the answer.


      - Clearpicks



      Originally posted by Alexis C. Montenegro
      clearpicks



      FWIW that behavior is true only for versions prior to 10.3 . In version 10.3 a fix was implemented to a long standing bug which caused setComputeOnClose() to be disabled when an efs was running on daily or higher intervals.
      Alex

      Comment

      Working...
      X