Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bug in @VolumeUpdown indicator

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

    Bug in @VolumeUpdown indicator

    The version of the @VolumeUpdown indicator currently shipping with NT7b22 incorrectly colours doji bars where close=open. In NT charts, bars with close=open are coloured "UP" bars by default, whereas volume bars for the same bar will be coloured as "DOWN" volume bars by the indicator, erroneously.

    Please, correct this bug in the indicator.

    Line 41 currently reads:
    if (Close[0] > Open[0])

    Line 41 should correctly be:
    if (Close[0] >= Open[0])


    Thank you.

    Geo

    #2
    Hello Geo,

    Thank you for your post.

    I will forward this to our development team for review.

    Please let me know if I may be of further assistance.
    Christopher J.NinjaTrader Customer Service

    Comment


      #3
      When I try to make the change to the indicator I get a message stating "Changes will be lost, since you can not save a system indicator." I entered the change describe in this thread, compiled the script, and reopened the script. As expected - no change. How do I change a system indicator?

      Thanks

      Comment


        #4
        ramckay,

        You cannot change a system indicator. What you would want to do is create yourself a duplicate indicator named something else and then you can change that instead. Right click > Save As > type in a new name and then you can make amends to that one.

        geoninja,

        A bar with open=close has no visible colors besides the outline color (black). Can you please clarify what your requirement is for having such a bar be green as opposed to red?
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thanks Josh,

          That works. My objecctive here is to change the color of the volume histogram bar to some color other than red/green for bars that have the close equal to the open. I assumed that I need to create a new pen like the red and green you created and assign it to the Values[x]

          if (Close[0] == Open[0])
          {
          Take Action
          }

          I don't see where that assignment is made in the code. Would you mind giving me some direction. Thanks

          Comment


            #6
            ramckay,

            You can change it in the Initialize() method where the Plots were created. Just change the Color.LimeGreen or Color.Red to different colors and then they will be of those new colors.

            Code:
            Add(new Plot(new Pen(Color.Lime, 2), PlotStyle.Bar, "UpVolume"));
            Add(new Plot(new Pen(Color.Red, 2), PlotStyle.Bar, "DownVolume"));
            Maybe change it to blue and orange
            Code:
            Add(new Plot(new Pen(Color.Blue, 2), PlotStyle.Bar, "UpVolume"));
            Add(new Plot(new Pen(Color.Orange, 2), PlotStyle.Bar, "DownVolume"));
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Josh View Post
              ramckay,
              A bar with open=close has no visible colors besides the outline color (black). Can you please clarify what your requirement is for having such a bar be green as opposed to red?
              Josh, to see that effect please change the bar type to OHLC and you will see all doji bars are green.

              Dan
              Last edited by eDanny; 11-09-2010, 03:16 PM. Reason: grammar, grrr
              eDanny
              NinjaTrader Ecosystem Vendor - Integrity Traders

              Comment


                #8
                Originally posted by eDanny View Post
                Josh, to see that effect please change the bar type to OHLC and you will all doji bars are green.

                Dan

                Hello Dan,

                Thank you for the additional information and reporting this behavior. I will forward your note to our development team.
                Christopher J.NinjaTrader Customer Service

                Comment


                  #9
                  Hello Josh,

                  I guess I didn't explain well enough what I'm trying to change. I want to see the up "Volume" bars (not price bars) as green, down Volume bars as red, and the doji Volume bars as a third color. Is that a difficult change?

                  Also, the color of the price bars are set by chart properties settings are they not. Mine change to whatever color I set the up/down bars color to.

                  Thanks

                  Comment


                    #10
                    Originally posted by ramckay View Post
                    Hello Josh,

                    I guess I didn't explain well enough what I'm trying to change. I want to see the up "Volume" bars (not price bars) as green, down Volume bars as red, and the doji Volume bars as a third color. Is that a difficult change?

                    Also, the color of the price bars are set by chart properties settings are they not. Mine change to whatever color I set the up/down bars color to.

                    Thanks

                    Try this..
                    Attached Files
                    RJay
                    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

                    Comment


                      #11
                      Originally posted by NinjaTrader_Josh View Post
                      geoninja,

                      A bar with open=close has no visible colors besides the outline color (black). Can you please clarify what your requirement is for having such a bar be green as opposed to red?
                      Josh,

                      Please, open up a 5m OHLC bar chart of ES, add the @VolumeUpdown indicator, then look for a doji bar with close = open. You will find that the doji price bar is coloured as an UP bar (green, or in my case, black), but the respective volume bar will be coloured DOWN, red. Quite disconcerting, frankly. A simple logical bug.

                      Thank you.

                      Geo

                      Comment


                        #12
                        Originally posted by ramckay View Post
                        When I try to make the change to the indicator I get a message stating "Changes will be lost, since you can not save a system indicator." I entered the change describe in this thread, compiled the script, and reopened the script. As expected - no change. How do I change a system indicator?

                        Thanks
                        ramckay,

                        It is simple, but please, be cautious with changing system indicators.

                        1, Exit NT.
                        2, Edit text of indicator file (under My Documents\NT7\bin\Custom\Indicator), use a good editor like PsPad, but Notepad works for quick hacks
                        3, Restart NT
                        4, open the - now changed - indicator in the NScript editor, and hit "Compile"....

                        Your system indicator has been changed.

                        Geo

                        Comment


                          #13
                          Hello geoninja & rt6716,

                          Thanks to both of you. Exactly the answers I was looking for.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by helpwanted, Today, 03:06 AM
                          0 responses
                          3 views
                          0 likes
                          Last Post helpwanted  
                          Started by Brevo, Today, 01:45 AM
                          0 responses
                          7 views
                          0 likes
                          Last Post Brevo
                          by Brevo
                           
                          Started by aussugardefender, Today, 01:07 AM
                          0 responses
                          5 views
                          0 likes
                          Last Post aussugardefender  
                          Started by pvincent, 06-23-2022, 12:53 PM
                          14 responses
                          242 views
                          0 likes
                          Last Post Nyman
                          by Nyman
                           
                          Started by TraderG23, 12-08-2023, 07:56 AM
                          9 responses
                          384 views
                          1 like
                          Last Post Gavini
                          by Gavini
                           
                          Working...
                          X