Announcement

Collapse
No announcement yet.

TICK/VIX data alignment

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

  • TICK/VIX data alignment

    I have an issue/question concerning TICK/VIX data in a study not lining up properly. The time template I'm using is 25 days (for backtesting) 9:30-16:00. So I think the timeframe for the symbols is ok.

    What I'm seeing is this:

    - Load a 2m chart w/ES #F as your symbol

    - Run a study returning close("$TICK")

    Look at first day you get your ES symbol bars -- the TICK data is about a half a day off.

    Any thoughts??

    Thanks!

    >>>Gregg

  • #2
    Hello Gregg,

    You might want to review this thread. Or is the issue you're describing here a different problem?
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      Gregg
      In addition to Jason's suggestion see also this thread for a possible solution
      Alex

      Comment


      • #4
        Thanks Alex -- that took care of the tick data perfectly (labor day ...)

        However, I still have an issue I'd like to understand better. What is the recommended (and most efficient) way to insure requested symbol data is in sync with the main chart timeframe/bar??

        For example, lets say I open a 2m ES #F=2 Chart. If I attach a study that returns close("$VIX), as you know, this deceptively will not work. Can you provide a study/example that addresses this specific problem??

        Thanks!!

        >>>G

        Comment


        • #5
          As an exersice left to the student, I decided to provide an example... Tested TICK/VIX/TRIN on a 2m ES #F chart.

          >>>G

          function preMain() {
          setDefaultBarFgColor(Color.blue, 0);
          setDefaultBarThickness(1, 0);
          }

          var BarRawTime, SymRawTime;
          var Symbol = "$TRIN";
          var SymVal = 0;

          function main() {
          BarRawTime = getValue("rawtime");
          SymRawTime = getValue("rawtime",0,Symbol);

          if (SymRawTime < BarRawTime)
          SymVal = getDataRec(BarRawTime, SymRawTime, Symbol, SymVal);
          else
          SymVal = close(Symbol);

          return SymVal;
          }

          function getDataRec(nBarRawTime, nSymRawTime, sSymbol, nSymVal) {
          var RecRawTime = nSymRawTime;
          var BarOffset = 0;

          while (RecRawTime < nBarRawTime)
          RecRawTime = getValue("rawtime",++BarOffset,sSymbol);

          if (RecRawTime == nBarRawTime)
          return close(BarOffset, sSymbol);
          else
          return nSymVal;
          }
          Attached Files

          Comment


          • #6
            Gregg
            FWIW I am unable to run the efs that you posted.
            Irrespective you may want to see this thread in which JasonK posted an efs that aligns the data of two symbols and use that as a blueprint for what you are trying to accomplish
            Alex

            Comment

            Working...
            X