• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    Patrick H.NinjaTrader Customer Service

    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 odvsndvs, Today, 03:20 AM
        0 responses
        1 view
        0 likes
        Last Post odvsndvs  
        Started by manueldecastro, Today, 12:57 AM
        0 responses
        5 views
        0 likes
        Last Post manueldecastro  
        Started by JulieG, Today, 12:40 AM
        0 responses
        5 views
        0 likes
        Last Post JulieG
        by JulieG
         
        Started by jimjoe123, Yesterday, 09:28 PM
        2 responses
        14 views
        0 likes
        Last Post NinjaTrader_ChrisSch  
        Started by 12VMan, 08-20-2019, 09:29 AM
        2 responses
        27 views
        0 likes
        Last Post Lancer
        by Lancer
         
        Working...
        X