Announcement

Collapse
No announcement yet.

EFS Study does not update of CurrentBar

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

  • EFS Study does not update of CurrentBar

    Hi all...

    I have created my own study and it somewhat matches the Basic Study - CCi, but I noticed that while the eSignal CCi updates on the forming bar before the close my study does not, it waits for the close of the bar and then display obviously 1 bar late. Is there a way I can match the eSignals indicator?

    Please help this newbie ;-)

    Thanks..
    Hem

  • #2
    Hem
    Post your study to the board else it will not be easy finding out what is causing this to happen.
    Alex

    Comment


    • #3
      Hi Alexis,

      Sorry,

      Here is what I am testing with :
      ---------------------------------------------------------

      //Global Variables
      var grID = 0;
      var study1 = null;
      var sStudyString= null;
      var bInitStudy = false;
      var vInit = false;
      var c = 0;

      //== PreMain function required by eSignal to set things up
      function preMain() {

      setPriceStudy(false);
      grID = 0;

      }

      //== Main processing function
      function main( frPeriod, nBack, nBarBack,Test) {
      var x;
      var nStudyValue;
      var nOffset;

      var x = 0;
      var y = 0;
      var a = 0;


      //period to use for our study, default is 14
      if (frPeriod==null) {
      frPeriod = 14;
      }
      if (nBack==null) {
      nBack = 5;
      }
      if (nBarBack==null) {
      nBarBack = 50;
      }
      if (Test==null) {
      Test = 0;
      }




      if (getBarState() == BARSTATE_ALLBARS) {

      //Change these lines if you want to use a different

      setStudyTitle( "Divergence (CCi)" );
      study1 = new CCIStudy(frPeriod, "HLC/3");
      sStudyString = CCIStudy.CCI;
      setCursorLabelName("CCI("+frPeriod+")");
      addBand(100, PS_DASHDOTDOT, 1, Color.black, gID());
      addBand(-100, PS_DASHDOTDOT, 1, Color.black, gID());

      return null;
      }

      //get current value of our study which we will return to the study pane
      //regardless of what else happens
      nStudyValue = study1.getValue(sStudyString);


      if(Test==0){
      clearLines();
      clearText();
      }





      return (nStudyValue);

      }


      //== gID function assigns unique identifier to graphic/text routines
      function gID() {
      grID ++;
      return( grID );
      }
      ----------------------------------------------------------------

      I have other code that I want to build with this, but I cannot get past this first stage. I see this cci is the same as the "Basic Study" from eSignal except of the last bar that is currently forming. So am I missing something?

      Thanks,
      hem

      Comment


      • #4
        Hem
        As far as I can see it is running on par with the Basic Study (see image below).
        You may want to look at your EFS Settings (under Tools in the main menu) and see if you have "Make all formulas compute on close (rather than...)" unchecked.
        Alex

        Comment


        • #5
          Super, thought it was something simple...thanks alot Alexis - that did the trick...

          much appreciated. ;-)

          regards
          Hem

          Comment

          Working...
          X