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 kinfxhk, 07-14-2026, 09:39 AM
    0 responses
    84 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 10:18 AM
    0 responses
    90 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 09:50 AM
    0 responses
    70 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-13-2026, 07:21 AM
    0 responses
    86 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 07-11-2026, 02:11 AM
    0 responses
    63 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X