Announcement

Collapse
No announcement yet.

daily data problem

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

  • daily data problem

    the following code accesses daily data from a 60min chart.

    [CODE]
    function preMain() {
    setPriceStudy(true);
    setShowTitleParameters(true);
    setShowCursorLabel(true);
    }

    var bInitialized = false;
    var xS1;

    function main() {

    if (!bInitialized) {
    bInitialized = true;
    xS1 = sma(3, ohlc4(inv("D")));
    }

    return xS1.getValue(0);
    }
    [\CODE]

    when I compare this to a daily chart with a basic study (sma length 3, source ohlc/4) this is the same value until 4:30pm EST when the actual daily chart updates and the 60min chart doesn't until several hours later.

    any ideas?
    Paul Williams
    Strategy & Applications
    www.futurenets.co.uk

  • #2
    Possibly different time templates between the 60 minute and the daily charts are the cause??

    Wayne

    Comment


    • #3
      ok thanks Wayne, will test tomorrow but that's a good point. can I ask ...

      if I use a daily moving average on a say a 60min chart

      xS1 = sma(3, ohlc4(inv("D")));

      and the 60min chart has a 24 hour time template starting at 00:30 and ending at 00:30 (I need bars to start 30min past the hour), then it won't be the same as an actual daily chart moving average until 00:30 ?
      Paul Williams
      Strategy & Applications
      www.futurenets.co.uk

      Comment


      • #4
        Check out the issues with external intervals and granularity explained in the following two posts:





        Wayne

        Comment


        • #5
          ok thanks, will take a look.

          myself and a US colleage have just identified a period on Sunday when 60min intraday chart retrieving weekly ma is different for a period of time from actual weekly chart ma. also identified a period after 4:30pm est when 60min intraday chart retrieving daily ma is different for a period of time from actual daily ma.

          this eventually resolves itself but will try and be more exact.

          just wondered where our 60min chart is getting its daily data from and can it (for a period of time) be out-of-sync with actual daily data?
          Paul Williams
          Strategy & Applications
          www.futurenets.co.uk

          Comment


          • #6
            Great question but I don't know.

            Ref:
            just wondered where our 60min chart is getting its daily data from and can it (for a period of time) be out-of-sync with actual daily data?

            Comment


            • #7
              all was ok here until the session closed today and then I saw a difference between the 60min chart generated daily value and the actual daily chart value.

              Code:
              function preMain() {
                  setPriceStudy(true);
                  setCursorLabelName("Daily", 0);
                  setCursorLabelName("Weekly", 1);
                  setShowTitleParameters(true);
                  setShowCursorLabel(true);
              }
              
              var bInitialized = false;
              var xS1;
              var xS2;
              
              function main() {
              
              	if (!bInitialized) {
              		bInitialized = true;		
              		xS1 = sma(3, ohlc4(inv("D")));
              		xS2 = sma(3, ohlc4(inv("W")));
              	}
              
              	return new Array(xS1.getValue(0),xS2.getValue(0));
              }
              Attached Files
              Paul Williams
              Strategy & Applications
              www.futurenets.co.uk

              Comment


              • #8
                this problem will rectify itself after several hours (probably early tomorrow morning) and then repeat again tomorrow when the session closes.

                is present in both delayed and non-delayed charts.
                Paul Williams
                Strategy & Applications
                www.futurenets.co.uk

                Comment


                • #9
                  futurenets
                  There are two [related] reasons for what you are seeing.
                  One is that you are returning a value hence the behavior that I have explained in this thread
                  The other is that in eSignal 10.6 [and earlier] the efs2 functions maintain the synchronization between intervals by date and time and the daily [and higher] intervals are time stamped 00:00 which means that the alignement with those intervals will occur on that time.
                  If you want a different alignement with those intervals you will need to create your own multiple time frame routines that do not make use of eSignal's efs2 functions
                  Alex

                  Comment


                  • #10
                    ok Alex thanks. don't fully understand yet but want to try ...

                    if at 15:30 est the 60min is accurately plotting the daily ma

                    but at 16:30 est it isn't, does your rationale still cover this.

                    just want to make sure before I go figure.
                    Paul Williams
                    Strategy & Applications
                    www.futurenets.co.uk

                    Comment


                    • #11
                      sorry to persist but ...

                      if at 15:30 est the 60min is accurately plotting the daily ma

                      but at 16:30 est it isn't, does your rationale still cover this.

                      just want to make sure before I go figure.
                      Paul Williams
                      Strategy & Applications
                      www.futurenets.co.uk

                      Comment


                      • #12
                        futurenets
                        As I explained in my previous reply the alignment with daily [and higher] intervals occurs at 00:00 ie at the time stamp of those intervals
                        FWIW this is not "my rationale" but the nature of synchronization of the efs2 functions in eSignal 10.6 [and earlier]
                        Alex


                        Originally posted by futurenets
                        sorry to persist but ...

                        if at 15:30 est the 60min is accurately plotting the daily ma

                        but at 16:30 est it isn't, does your rationale still cover this.

                        just want to make sure before I go figure.

                        Comment


                        • #13
                          ok Alexis and sorry if I'm a bit slow here but

                          if alignment takes place at 00:00

                          wouldn't that mean it would be out-of-alignment at both 15:30 and 16:30 ?

                          but

                          at 15:30 est the 60min is accurately plotting the daily ma

                          at 16:30 est it isn't

                          I can't appear to relate 00:00 to 15:30 or 16:30
                          Paul Williams
                          Strategy & Applications
                          www.futurenets.co.uk

                          Comment


                          • #14
                            I think what's happening is ...

                            accessing daily data from an intraday chart works fine until the close of the session 4pm EST. then it stops updating until 00:00 EST.

                            I've only tested this using ES.
                            Paul Williams
                            Strategy & Applications
                            www.futurenets.co.uk

                            Comment


                            • #15
                              Alexis has provided the correct diagnosis of the issue.

                              You can work around the EFS2 functions if you do not wish to see this behaviour by calculating your own Mov Avg functions.

                              We will treat this thread as a request for providing more customisation on EFS2 built in functions.
                              Ashish Mathur    |   &#32 ;QA & Corp. Solutions Specialist    |     www.esignal.com

                                     eSignal, a division of Interactive Data Corporation (NYSE: IDC)

                              Comment

                              Working...
                              X