Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Use of te VIX close in a script

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

    Use of te VIX close in a script

    I want to use the VIX close within a script. I was told to use the Add() indicator to bring it in (initialize it).

    I have a several question on how to do this:
    1. I wrote: Add("VIX 12-13", PeriodType.Day, MarketDataType.current.Close);
    However, this does not look write to me.
    2. How will the script differentiate between this close and the Market "close" I am in?
    Looks to me I ought to define the VIX close uniquely somehow.
    3. the calculation I want to do is as follows (not correct per C#):
    round((((settle-(((VIX*currentClose)*SQRT((1/252)))*0.382)))/0.25),0)*0.25
    Where "VIX" is the VIX Close and the "currentClose" is the current Market I am doing the calculation for (ES in this case).

    I could not find anything about "currentClose" in the Ninja User Manual.
    Any help is appreciated.

    #2
    Hello randl,

    Thank you for your post.

    The Add() would actually look like the following:
    Code:
    Add("VIX 12-13", PeriodType.Day, 1);
    You will need to use Closes to differentiate between the two bar series closes:
    I recommend reviewing the material covered at the following link for multiple time frame and instruments at the following link: http://www.ninjatrader.com/support/h...nstruments.htm

    I am not sure what settle is but the rest of the calculation would look like this:
    Code:
    double randl = Math.Round(((((Closes[1][0]*Closes[0][0])*Math.Sqrt(1/252))*0.382)/0.25)*0.25);
    Please let me know if I may be of further assistance.

    Comment


      #3
      Originally posted by randl View Post
      I want to use the VIX close within a script. I was told to use the Add() indicator to bring it in (initialize it).

      I have a several question on how to do this:
      1. I wrote: Add("VIX 12-13", PeriodType.Day, MarketDataType.current.Close);
      However, this does not look write to me.

      Any help is appreciated.
      Where are you subscribed to VIX futures?! My broker won't offer it with ZenFire. Very hard to come by.

      Mine is identified as an index in NT, ^VIX ... mapped to TDA $VIX.X..

      So I simply use:
      Code:
      	Add("^VIX",    PeriodType.Minute, 1);

      Comment


        #4
        Sledge, Thanks for the reply. I get the IQfeed. It brings all the sentiment indexes with the basic feed.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        663 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        376 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        110 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        580 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X