Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How come a simple volume[0] > 20000 doesnt work?

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

    How come a simple volume[0] > 20000 doesnt work?

    Here is my script, i want to draw diamond when the volume is higher than 20K

    if (Volume[0] >= 20000)
    DrawDiamond("Volume Spike" + CurrentBar, 0, Low[0] - TickSize, Color.Red);

    As the picture show, it plots when there is under 20K in the overnight and regular session. What is wrong with the statement if (Volume[0] >= 20000)? Do i need to add something in front of the 20000? Please help. Thank you

    #2
    Here is the picture
    Attached Files

    Comment


      #3
      You will have to debug.

      Try something like:

      if (Volume[0] >= 20000)
      {
      Print(Time[0].ToString() + " " + Volume[0]);
      DrawDiamond("Volume Spike" + CurrentBar, 0, Low[0] - TickSize, Color.Red);
      }

      and take a look at the output window to see what is happening.
      RayNinjaTrader Customer Service

      Comment


        #4
        What do u mean output window? I typed your statement and i click the output window, it is blank. What should i do?

        Also, if i want a sound alert, do i replace the
        DrawDiamond("Volume Spike" + CurrentBar, 0, Low[0] - TickSize, Color.Red);
        with
        PlaySound("Alert1.wav");
        ?

        Comment


          #5
          Open the output window (Tools > Ouput window) then apply your indicator on a chart, you will see statements that shows the bar time and volume. You should NOT see a statement where volume is less than 20,000. Correct on the alert.
          RayNinjaTrader Customer Service

          Comment


            #6
            Ok. Thanks a lot. It works

            Comment


              #7
              am i using the wrong volume indicator ... for the volume spike to work ....??? (i'm using the "buysell volume top" indicator on a 1min chart ..... & the volume spike ... does not alert me.....

              thx

              Comment


                #8
                The previous comments and code were valid for the normal VOL indicator, please check with this one.

                The BuySellVolume from our Power Volume indicators would only work in realtime going forward -

                Comment


                  #9
                  Bertrand....

                  thanks for the response.... loaded the buysellvolume indicator as advised..... still no luck with the alerts .... i looked at the code, and could not find anywhere in there ... where the code tells it to play an audio alert when conditions are met......

                  thx...

                  Comment


                    #10
                    my mistake ..... i'm referring to the volume spike indicator not giving me alerts ...

                    thx

                    Comment


                      #11
                      I'm sorry not sure I follow you here - which indicator did you load now? Were you adding the custom code change to it to provide the alerts? If yes, please post the code you used so we can take a look.

                      Thanks

                      Comment


                        #12
                        what i'm looking for is ..... an indicator that measures the increase in volume (percentage wise on the current bar being printed) ... to the previous closed volume bar. with an audio alert ....

                        thanks...

                        t

                        Comment


                          #13
                          You would need to custom code this as per the previous posts here in the thread - an intro into indicator coding can reviewed here -



                          As a start you can check the Volume Bar Color MA shared here - http://www.ninjatrader.com/support/f...1&pp=15&page=4

                          Comment


                            #14
                            ok .... thanks....

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                            0 responses
                            571 views
                            0 likes
                            Last Post Geovanny Suaza  
                            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                            0 responses
                            330 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
                            548 views
                            1 like
                            Last Post Geovanny Suaza  
                            Started by RFrosty, 01-28-2026, 06:49 PM
                            0 responses
                            549 views
                            1 like
                            Last Post RFrosty
                            by RFrosty
                             
                            Working...
                            X