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 cmoran13, 04-16-2026, 01:02 PM
        0 responses
        36 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        23 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        162 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        96 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        152 views
        2 likes
        Last Post CaptainJack  
        Working...
        X