Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

5minVWAP for 30min FDAX

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

    5minVWAP for 30min FDAX

    Hallo,

    i want to implement the value of the 5min VWAP in my 30min strategy
    i try this:

    protected override void Initialize()
    ....
    Add(PeriodType.Minute, 5);


    protected override void OnBarUpdate()
    ....
    if (BarsInProgress != 0)
    return;

    if (ToTime(Time[0]) >= 90000 && ToTime(Time[0]) <= 190000
    && Close [0] > VWAP().VWAPLine (BarsArray [1] ) [0]

    I get an error. what am I doing wrong?

    Blackburn

    #2
    Hello,

    Thanks for the note.

    Try it this way:

    VWAP(BarsArray[1]).VWAPLine[0]

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Hallo Brett,

      thanks for your assistance. It´s works fine :-)
      But how can i incert the 5min vwap indicator in my strategy:

      protected override void Initialize()
      {
      ....
      Add(SMA(5)); /// as an example for 5min SMA

      i try for VWAP:
      Add (VWAP(5).VWAPLine[0]); but it does not works (i mean the 5min vwap indicator).

      Thanks Blackburn

      Comment


        #4
        Hello,

        Is this on a 5 min chart?

        Also SMA(5) is for a 5 period SMA not a 5 minute chart SMA.

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment


          #5
          Hallo,

          you're right.
          I meaning a 5 period SMA, not 5 min SMA.
          How can I programm the 5 period VWAP ? The SMA was only an example.

          Blackburn

          Comment


            #6
            Hello,

            Since VWAP is not a standard indicator that comes with NinjaTrader by default I'm really not exactly clear how you would add the parameters in.

            Try typing in the code editor VWAP( then as soon as you put the ( it should pop up with intellisense to show you what the parameters are. Then you just fill them in as you see them.

            Let me know if I can be of further assistance.
            BrettNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            647 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            369 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            108 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            572 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            573 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X