Announcement

Collapse
No announcement yet.

Daily interval formulas dropping off in intraday charts

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

  • Daily interval formulas dropping off in intraday charts

    I subscribe to the extended intraday data. When I build any formula with the inv("D") element, it drops off when viewing any intraday chart. For example, try pasting in the simple code below (5 day prior high) with QQQQ or any issue on a 60 min interval and the line will drop off back around 1/4/10 (usually about 14 months prior).

    Since the code is fine with no syntax errors, I wonder if this is bug in the data feed? Any advice would be greatly appreciated, thanks.

    This will happen with other formulas too, such as macd(12,25,9,inv("D")).

    Pasted in code below---------------------------->

    function preMain() {

    setPriceStudy(true);
    setStudyTitle("5 Day High");
    setCursorLabelName("Prior 5H", 0);
    setDefaultBarStyle(PS_SOLID, 0);
    setDefaultBarFgColor(Color.black, 0);
    setDefaultBarThickness(1, 0);
    setPlotType(PLOTTYPE_LINE, 0);
    setShowCursorLabel(true);


    }

    function main() {


    var fivedayhigh = Math.max(high(-1, inv("D")), high(-2, inv("D")), high(-3, inv("D")), high(-4, inv("D")), high(-5, inv("D")));


    return (fivedayhigh);

    }
    Last edited by JeffL; 03-10-2011, 12:00 PM.

  • #2
    Re: Daily interval formulas dropping off in intraday charts

    JeffL
    That is more than likely happening because you have the Time Template set to Dynamic which means that it will initially download enough bars to fill the chart (300 is the default minimum) and request an equal amount of data for the external symbol (in fact 300 bars would take you back to just about 1/4/2010)
    If you then scroll back the chart it will request additional data for the symbol in the chart but it does not generate a request of additional data for the external intervals called by the efs hence the efs does not return a plot prior to a certain bar
    The solution is to set the Time Template to load a predefined number of days or bars for each of the required intervals. For information on how to use Time Templates see this article in the eSignal KnowledgeBase
    As an aside you can simplify your entire equation that calculates the highest of the previous 5 days by using the highest() or hhv() or upperDonchian() functions [see the corresponding articles in the EFS KnowledgeBase for the description and syntax of these functions]
    Alex


    Originally posted by JeffL
    I subscribe to the extended intraday data. When I build any formula with the inv("D") element, it drops off when viewing any intraday chart. For example, try pasting in the simple code below (5 day prior high) with QQQQ or any issue on a 60 min interval and the line will drop off back around 1/4/10 (usually about 14 months prior).

    Since the code is fine with no syntax errors, I wonder if this is bug in the data feed? Any advice would be greatly appreciated, thanks.

    This will happen with other formulas too, such as macd(12,25,9,inv("D")).

    Pasted in code below---------------------------->

    function preMain() {

    setPriceStudy(true);
    setStudyTitle("5 Day High");
    setCursorLabelName("Prior 5H", 0);
    setDefaultBarStyle(PS_SOLID, 0);
    setDefaultBarFgColor(Color.black, 0);
    setDefaultBarThickness(1, 0);
    setPlotType(PLOTTYPE_LINE, 0);
    setShowCursorLabel(true);


    }

    function main() {


    var fivedayhigh = Math.max(high(-1, inv("D")), high(-2, inv("D")), high(-3, inv("D")), high(-4, inv("D")), high(-5, inv("D")));


    return (fivedayhigh);

    }

    Comment


    • #3
      Alex,

      Thanks. I had/have a time template set and it still does this. My parameters are as follows:

      Type: User Defined
      Interval: 60
      # Days: 3500
      Radio button set to Days
      Start Time: 10:00 (I eliminate the first 30 mins of each trading day from view)
      End Time: 16:00

      My theory now is that while it loads 3500 days of intraday data it does not load the end of day OHLC data so therefore it does not have this going back loaded in memory to calculate the inv("D") values. Please let me know if you get the same result with the user defined time template and what you think. You are correct, I could also use the other functions. I had this as one of my old examples prior to discovering those.

      Jeff

      Comment


      • #4
        Jeff
        As I explained in my previous reply you need to set the Time Template to load a predefined number of days or bars for each of the required intervals. See also my reply in this thread on a similar topic
        Alex


        Originally posted by JeffL
        Alex,

        Thanks. I had/have a time template set and it still does this. My parameters are as follows:

        Type: User Defined
        Interval: 60
        # Days: 3500
        Radio button set to Days
        Start Time: 10:00 (I eliminate the first 30 mins of each trading day from view)
        End Time: 16:00

        My theory now is that while it loads 3500 days of intraday data it does not load the end of day OHLC data so therefore it does not have this going back loaded in memory to calculate the inv("D") values. Please let me know if you get the same result with the user defined time template and what you think. You are correct, I could also use the other functions. I had this as one of my old examples prior to discovering those.

        Jeff

        Comment


        • #5
          Alex, got it -- it worked. I did not realize you could have multiple entries under one time template. Many thanks!

          Comment


          • #6
            Jeff
            You are welcome
            Alex


            Originally posted by JeffL
            Alex, got it -- it worked. I did not realize you could have multiple entries under one time template. Many thanks!

            Comment

            Working...
            X