Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Vwap?

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

    Vwap?

    Can anyone please point me to where I can find accurate VWAP indicator, I don't seem to find any, Thank you in advance

    #2
    Hello,

    We don't have the VWAP available on our forums however you can find a popular version of the indicator here: https://www.bigmiketrading.com/downl...load.html?view

    We have several 3rd party indicator providers and others may have there own versions as well available here: http://www.ninjatrader.com/Ecosystem/NonBroker.php#78

    Let me know if I can further assist.
    LanceNinjaTrader Customer Service

    Comment


      #3
      Ok I just coded it, can you please tell me how to make the indicator stop drawing during after-market and pre-market hours (first statement after OnBarUpdate), Thank you

      protected override void OnBarUpdate()
      {

      // Stop drawing during after-market and pre-market hours
      if(ToTime(Time[0]) >= 160000 && ToTime(Time[0]) <= 093000 ){ }

      // Calculate TypVical Price * V
      TypV += ((Close[0]+High[0]+Low[0])/3 )*Volume[0];

      //Calcualte the cumulative volume
      cumulativeVolume += Volume[0];
      Plot0.Set(TypV/cumulativeVolume);

      // If at 9:30 or 16:00 then reset TypV
      if( ToTime(Time[0]) == 93000 || ToTime(Time[0]) == 160000 ){
      TypV=0;cumulativeVolume=0; }
      }

      Comment


        #4
        Looks like you have the filter setup you just need to return if it's true

        if(ToTime(Time[0]) >= 160000 && ToTime(Time[0]) <= 093000 )
        return;

        Also because you are setting things at 9:30 you'll want to change the condition to

        if(ToTime(Time[0]) > 160000 && ToTime(Time[0]) < 093000 )
        LanceNinjaTrader Customer Service

        Comment


          #5
          Thank you for your reply, actually I don't want the indicator to plot anything during this time. any thoughts

          Comment


            #6
            Perhaps I'm misunderstanding.

            Not setting the Plots would prevent it from plotting. This is prevented by returning before calling Plot0.Set(TypV/cumulativeVolume);

            Let me know how I can further assist.
            LanceNinjaTrader Customer Service

            Comment


              #7
              I did it but it still plotting in the pre-market and after hours

              protected override void OnBarUpdate()
              {
              // Use this method for calculating your indicator values. Assign a value to each
              // plot below by replacing 'Close[0]' with your own formula.

              // Stop drawing during after-market and pre-market hours
              if(ToTime(Time[0]) > 160000 && ToTime(Time[0]) < 093000 ){
              return;
              }



              // Calculate TypVical Price * V
              TypV += ((Close[0]+High[0]+Low[0])/3 )*Volume[0];

              //Calcualte the cumulative volume
              cumulativeVolume += Volume[0];

              // Plot the VWAP indicator
              Plot0.Set(TypV/cumulativeVolume);

              // If at 9:30 or 16:00 then reset TypV
              if( ToTime(Time[0]) == 93000 || ToTime(Time[0]) == 160000 ){
              TypV=0;cumulativeVolume=0; }

              }

              Comment


                #8
                Didn't see this sooner but

                if(ToTime(Time[0]) > 160000 && ToTime(Time[0]) < 093000 )

                should be

                if(ToTime(Time[0]) > 160000 || ToTime(Time[0]) < 093000 )

                Let me know if I can further assist.
                LanceNinjaTrader Customer Service

                Comment


                  #9
                  What a mistake, Thank you.
                  OK if anyone is visiting this page searching for the simple VWAP here it is attached
                  Attached Files

                  Comment


                    #10
                    Daily (weekly and monthly) VWAP with standard deviation bands and yesterday's (prior week's and prior month's) value area. Calculated from 1-minute data or tick data.
                    Attached Files

                    Comment


                      #11
                      Thanks for your work. I will use your code and tweak it into my strategy. Much appreciated.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by RookieTrader, Today, 09:37 AM
                      3 responses
                      15 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by kulwinder73, Today, 10:31 AM
                      0 responses
                      5 views
                      0 likes
                      Last Post kulwinder73  
                      Started by terofs, Yesterday, 04:18 PM
                      1 response
                      23 views
                      0 likes
                      Last Post terofs
                      by terofs
                       
                      Started by CommonWhale, Today, 09:55 AM
                      1 response
                      4 views
                      0 likes
                      Last Post NinjaTrader_Erick  
                      Started by Gerik, Today, 09:40 AM
                      2 responses
                      7 views
                      0 likes
                      Last Post Gerik
                      by Gerik
                       
                      Working...
                      X