Announcement

Collapse
No announcement yet.

Is there any way

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

  • Is there any way

    Hi, I suspect i know the answer ...
    but is there any way to pull more than open,close,high and low and the hour from candles when loading a chart and displaying the past four months or so of historical data? For example, is it possible to get the price on a 60 min chart at 9:15 in the morning from say 3 days ago?

    I suspect the answer is no but thought it merited asking ...

    Thanks in advance,
    Chris
    Last edited by Chris747; 01-21-2010, 12:22 PM.

  • #2
    Re: Is there any way

    Hi Chris,

    Sure, just set up an internal function to save and return only the specific information needed (open,close,high and low from 9:15 three days ago), use efsInternal() function to establish the timeframe and symbol and this information will be available as your chart starts to load.

    Originally posted by Chris747
    Hi, I suspect i know the answer ...
    but is there any way to pull more than open,close,high and low and the hour from candles when loading a chart and displaying the past four months or so of historical data? For example, is it possible to get the price on a 60 min chart at 9:15 in the morning from say 3 days ago?

    I suspect the answer is no but thought it merited asking ...

    Thanks in advance,
    Chris

    Comment


    • #3
      Hi Steve,
      Thanks for getting back to me so quick, as always! If you have a minute... what i'm trying to do in particular is determine if historically a price crossed an upper value and then the lower or did it drop below a lower value first and then the upper, all historically of course. In the past i've done this doing playbacks but i need more data, as only i can get loading the charts historically. If you have any ideas, they would be greatly appreciated .. still a Newbie as to this type of object programming. I've attached an image ...

      Thanks,
      Chris
      Attached Files

      Comment


      • #4
        efsInternal Reverse Lookup.efs

        Hi Chris,

        I've created an efs that retrieves the data you wanted (I believe). It grabs price data and more from the 915 bar on a 15 minute chart. Specifically the 15 minute bar values are accessed from within a 60 minute chart and saves the 9:15 bar data for the last 3 days. Here are the values I setup ...

        "day","hms","open","close","high","low","volume"," rawtime"

        Then it returns the high and low from 2 and 3 days ago to the chart. I assume this is the technique you wanted. Let me know.

        The efs is attached below the screen shot below.

        Originally posted by Chris747
        Hi Steve,
        Thanks for getting back to me so quick, as always! If you have a minute... what i'm trying to do in particular is determine if historically a price crossed an upper value and then the lower or did it drop below a lower value first and then the upper, all historically of course. In the past i've done this doing playbacks but i need more data, as only i can get loading the charts historically. If you have any ideas, they would be greatly appreciated .. still a Newbie as to this type of object programming. I've attached an image ...

        Thanks,
        Chris




        Here is the efs.
        Attached Files

        Comment


        • #5
          Hi Steve .... and Thank You.
          It looks like the historical information i was looking for is in fact available judging from this efs you attached !!

          Chris

          Comment


          • #6
            How to access smaller interval Series values while loading historical data to chart

            Hi Chris,

            My pleasure, good to hear this was helpful.

            Steve

            Originally posted by Chris747
            Hi Steve .... and Thank You.
            It looks like the historical information i was looking for is in fact available judging from this efs you attached !!

            Chris

            Comment


            • #7
              Hi Steve,
              I'm not real familiar with series and this script you posted is teaching me a lot, i've been experimenting with it since you posted it looking to get it to give me the first breach, either a breach north or a breach south, of a pair of prices, whichever occured first at some point during a 60 minute candle historically for the 120 days of history that loads.
              To that end i was seeing some anomolies and so put in a candle counter on a suspicion the script was loading twice for some reason and it is counting pretty much double the candles.
              Am i nuts ? I've attached a script ... prints to output window. It's my close15 being equal to null that sent me down this road.

              Any ideas ?
              Chris
              Attached Files

              Comment


              • #8
                Hi Steve,
                The script is loading twice for some reason and it has to do with the following.....

                if (!bInit) {
                if (!testSeries15) {
                testSeries15 = efsInternal("test15", inv("15"));
                }
                daySeries15 = getSeries(testSeries15, 0);
                hmsSeries15 = getSeries(testSeries15, 1);
                openSeries15 = getSeries(testSeries15, 2);
                closeSeries15 = getSeries(testSeries15, 3);
                highSeries15 = getSeries(testSeries15, 4);
                lowSeries15 = getSeries(testSeries15, 5);
                volumeSeries15 = getSeries(testSeries15, 6);
                rawtimeSeries15 = getSeries(testSeries15, 7);

                bInit = true;
                }

                although i can't see anything in here that would cause the script to reload .... any ideas ?
                However, if i have two instances of the script loaded and reload one of them, there is no doubling up.
                Chris
                Last edited by Chris747; 01-29-2010, 05:19 PM.

                Comment


                • #9
                  Hi Chris,

                  When you create another series object in an efs that is of a different interval, all of those data points will be pre-loaded in your efs before the chart historical data is loaded. This can give the impression that the efs is loading multiple times.

                  However, this is not the reason you are seeing null values. There are a several problems with the code that you inserted into the efs where you copied a part of my while loop.

                  some tips,
                  Do not use Series objects without using the associated getValue(#) method to access a value from the Series. While it can work, it introduces significant inefficiencies because it was not intended to be used in this manner (that is why it has a getValue(#) method).

                  e.g.
                  closeSeries15.getValue(0); //~most recent close value
                  closeSeries15.getValue(-1); //~ previous close value
                  closeSeries15.getValue(-2); //~close value 15 minutes prior to (-1)
                  closeSeries15.getValue(-3); //~close value 30 minutes prior to (-1)
                  closeSeries15.getValue(-4); //~close value 45 minutes prior to (-1),
                  etc, etc...

                  On the other hand, returning the Series to a chart in a return statement (as you have seen elsewhere in the forum ) works fine as that is by design.


                  check out this link http://forum.esignalcentral.com/show...511#post130511 which has a number of debug outputs. I wrote this efs and spent a lot of time fine tuning it and the debugPrintln() lines to demonstrate the sequence of how efs's load using a series object created with the efsInternal() function.

                  Remember, to look at the debug output from top down sequence, open the eSignal\formulaoutput.log text file in notepad



                  Originally posted by Chris747
                  Hi Steve,
                  The script is loading twice for some reason and it has to do with the following.....

                  if (!bInit) {
                  if (!testSeries15) {
                  testSeries15 = efsInternal("test15", inv("15"));
                  }
                  daySeries15 = getSeries(testSeries15, 0);
                  hmsSeries15 = getSeries(testSeries15, 1);
                  openSeries15 = getSeries(testSeries15, 2);
                  closeSeries15 = getSeries(testSeries15, 3);
                  highSeries15 = getSeries(testSeries15, 4);
                  lowSeries15 = getSeries(testSeries15, 5);
                  volumeSeries15 = getSeries(testSeries15, 6);
                  rawtimeSeries15 = getSeries(testSeries15, 7);

                  bInit = true;
                  }

                  although i can't see anything in here that would cause the script to reload .... any ideas ?
                  However, if i have two instances of the script loaded and reload one of them, there is no doubling up.
                  Chris

                  Comment


                  • #10
                    Hi Steve and thanks for helping me out on this ...
                    First off ... WOW ... your barCount_of_external_Interval_Example_1_10_2010 should be a mandatory lesson for anyone trying to learn how efsInterval works. An incredible teaching aid, I started clueing in doing a playback as you'd suggested. Thank you !

                    I knew there were several problems with my code ... I wasn't familiar with series and efsinterval and was just checking to see what was returned at that point.

                    However, i still don't understand why I am getting twice the barCount. Your efs_Interval_Example_1_10_2010 script returns the same correct number of bars as my own script ... but efsInternal_reverse_lookup.efs reports the incorrect number (see attached script) and i think i need to understand why in order to move on.
                    Any thoughts would be greatly appreciated.

                    Chris

                    Comment


                    • #11
                      Hi Chris,

                      You're welcome. What version of eSignal are you using? I am using 10.5.1721.1140 and am not seeing what you described.

                      While I'm not sure why you have a doubled barCount, I do see that your barCount variable does not agree with the barCount in the cursor window.

                      Place this line in the efs you posted below at line 69.

                      debugPrintln("69: chrisBC " + barCount+", correct barCount using getCurrentbarCount() = "+getCurrentbarCount() );

                      I use getCurrentbarCount() to obtain the correct barCount instead of incrementing a global variable, it's foolproof and you may find it helpful.

                      Steve

                      Originally posted by Chris747
                      Hi Steve and thanks for helping me out on this ...
                      First off ... WOW ... your barCount_of_external_Interval_Example_1_10_2010 should be a mandatory lesson for anyone trying to learn how efsInterval works. An incredible teaching aid, I started clueing in doing a playback as you'd suggested. Thank you !

                      I knew there were several problems with my code ... I wasn't familiar with series and efsinterval and was just checking to see what was returned at that point.

                      However, i still don't understand why I am getting twice the barCount. Your efs_Interval_Example_1_10_2010 script returns the same correct number of bars as my own script ... but efsInternal_reverse_lookup.efs reports the incorrect number (see attached script) and i think i need to understand why in order to move on.
                      Any thoughts would be greatly appreciated.

                      Chris

                      Comment


                      • #12
                        Steve,
                        I bow yet again in humble appreciation..... you hit it right on the money. I was on a much older version of ESignal ... the efsInterval call on the old version of esig was messing up all sorts of stuff in my script and i'd not noticed..... I'm working on a computer i don't generally use.

                        Thanks again,

                        Chris

                        Comment

                        Working...
                        X