Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Parabolic Sar with Day Bar

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

    Parabolic Sar with Day Bar

    Hello,

    I have a strategy which works with minute bars, but I also need the value of the previous day parabolic SAR and VIX calculated with day Bars

    How I could charge this parametres?

    I obtain the VIX value from a data provider, but I don`t know how to charge it
    Last edited by etruria; 07-14-2018, 10:32 AM.

    #2
    Hello etruria,

    Thank you for your note.

    I’ve attached a sample which will add a secondary data series with a period of day, which is then passed to the Parabolic Sar method and prints to the output window the value on the current bar. For the previous days value you would change,

    Code:
    ParabolicSAR(BarsArray[1], 0.02, 0.2, 0.02)[0];
    To,

    Code:
    ParabolicSAR(BarsArray[1], 0.02, 0.2, 0.02)[B][1];[/B]
    For 1 bar ago.

    Parabllic Sar section of our helpguide.


    For the value of the VIX, you would want to add the Vix data series to your strategy,

    Code:
    Add(^VIX, PeriodType.Day,1);
    And then pass BarsArray[2] to the Parabolic Sar method just like in the example, but BarsArray[2] rather than BarsArray[1].

    Adding another series to the attached script would require you to also add another current bar check, which might look like,

    Code:
    if(CurrentBars[2] < 10) return;
    See the link below on CurrentBar checks,


    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      So, I supose that the name with I call the vix would be

      CloseVix = VIX(BarsArray[2])[1]

      Thanks for your help

      Comment


        #4
        Hello, I have tried the code you have told me for the VIX and I can´t compile the strategy because the program said me that it doesn´t recognize the following character ^

        Thanks for your help

        Comment


          #5
          Hello etruria,

          Use quotes for the symbol name.

          Add("^VIX", PeriodType.Day,1);

          See Add section of our helpguide,


          Please let us know if you need further assistance.
          Alan P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          559 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          546 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X