Announcement

Collapse
No announcement yet.

Secondary symbol data

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

  • Secondary symbol data

    I have an efs script that plots some indicators in a study. These indicators are calculated off of things like the TRIN and the VIX. I'm accomplishing this with code like this:

    trin = close(0,1,"$TRIN");
    vix = close(0,1,"$VIX");

    The problem I'm having is these don't appear to be returning the values of those other symbols at the proper relative time in the chart. What I mean is, If I look at my indicator (or print out the values from within my script with debug statements) it looks shows the trin/vix with one value. But, if I pull up an actual chart and align it with the chart my study is applied to (same day/time) I can see that the values of the TRIN and VIX are actually quite different than what those calls are returning.

    Am I mis-understanding how accessing secondary symbols from within EFS should work? I'm assuming if my main() function is being executed against a 3m bar at 10:27 on 10/01/2003 for say "ES" then the above calls will give me the values of TRIN and VIX at 10:27 (or at least 10:29:59) on 10/01/2003. But this is definitely NOT what I'm getting according to the charts of those actual symbols.

    P.S. - I did spend some time searching to see if this had been covered as I'm new out here but I could not find any discussion on this topic. If its here and I just didn't find it, please point me in the right direction. Thx.

  • #2
    While we wait for other more experienced members to assist, I thought I'd post an idea... It's a good idea to do a null check before relying that the data will be there. In other words...

    if ( myDataRecord == null ) return;
    Regards,
    Jay F.
    Product Manager
    _____________________________________
    Have a suggestion to improve our products?
    Click Support --> Request a Feature in eSignal 11

    Comment


    • #3
      Thanks for the input. I'm not getting nulls from these calls, I'm getting values. They just don't seem to be the right ones. And not just by a little bit. I'll get a value of 1.4 for the trin when, at that time it was actually .69.

      I hope someone has some ideas on why this might be the case. Can you at least confirm that I am not mis-using the "other symbol" functionality somehow?

      Comment


      • #4
        ebr
        What Time Template are you using when running that efs?
        Alex

        Comment


        • #5
          It doesn't seem to matter.

          I first discovered the problem when attempting to backtest with a 3 month time template. But the values don't appear to be correct in any timeframe - except real time.

          Comment


          • #6
            ebr
            I meant what Start/End times do you have in the Time Template.
            Try using the Start/End times for the $VIX or $TRIN (ie 9:30-16:00 ET or equivalent if in different time zone) and see if that makes a difference
            Alex

            Comment


            • #7
              Sorry. All my time template defaults have 0930/1600 defined.

              Any other ideas?

              Comment


              • #8
                ebr
                A possible reason for the issue may be found in the following quote taken from a thread of a while back.

                Originally posted by JayF

                Essentially, the data set for both symbols need to be identical in the time series for the overlay to stay in synch. Let me try to give a visual to demonstrate why.

                1-min bar (each letter is a different 1 minute bar)

                (ES #F=2 w/ 2 minute simulated Globex outage at N and O)
                ABCDEFGHIJKLMPQRSTU
                ABCDEFGHIJKLMNOPQRSTU
                (TRIN with complete data)

                Please notice how when the ES had the 2 minute outage that the TRIN data kept humming on along, and that the data records became unsync'd with the rest of the data.

                One reason for this is due to the way Advanced Charts handle time segments that contain no volume; they don't leave a gap (sometimes called no volume bars) in the chart when this condition occurs.
                If you were using ES H4 as the symbol in the price window then that could create a situation similar to the above as it was trading yesterday morning (on Globex) whereas the $TRIN and $VIX were not.
                One possible workaround could be to use ES H4=2 which does not chart Globex sessions.
                Alex

                Comment


                • #9
                  Aaaaahh. So, if understand the implication there, when eSignal is looking to get data for a 3m bar of a different symbol in my efs, it doesn't go get the bar from the same date/time, it goes and gets the bar with the same relative bar number as the one I'm on?

                  Maybe that is done for performance reasons, but it seems frought with peril as it is a rather large assumption to make that the data will be lined up exactly the same.

                  I tried the "=2" trick and that did not seem to help. Plus, my indicator completely quits printing just a couple days back.

                  Thanks for your help on this. Do you have any other suggestions on how I can retrieve the values of symbols like Trin and vix at specific points in time and be sure that they are from those exact times?

                  Comment

                  Working...
                  X