Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add ^VIX in script

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

    Add ^VIX in script

    Hello,

    I can´t find in forum or helpguide how to add the ^VIX in a script-strategy as dataseries.


    Thank you
    Tony

    #2
    Hello tonynt,


    Here is an example of how to accomplish this.

    Code:
    [LEFT] [FONT=Courier New][SIZE=2][COLOR=#0000FF]protected[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#0000FF]override[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#0000FF]void[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2]Initialize()[/SIZE][/FONT]
    [FONT=Courier New][SIZE=2]        {[/SIZE][/FONT]
    [FONT=Courier New][SIZE=2]            CalculateOnBarClose =[/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#0000FF]true[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2];[/SIZE][/FONT]
    [FONT=Courier New][SIZE=2]                  Add([/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#800000]"^VIX"[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2], PeriodType.Tick,[/SIZE][/FONT] [FONT=Courier New][SIZE=2][COLOR=#800080]100[/COLOR][/SIZE][/FONT] [FONT=Courier New][SIZE=2]);[/SIZE][/FONT]
    [FONT=Courier New][SIZE=2]        }[/SIZE][/FONT]
    [/LEFT]

    Here is the Add() Help Guide to assist you further.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    144 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    71 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    79 views
    0 likes
    Last Post PaulMohn  
    Working...
    X