Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Using BarBrushes[] hides plots on top of bar

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

    Using BarBrushes[] hides plots on top of bar

    Hi,

    I want to mark the middle of the bar with a plot dot, or even a Draw object, however, I use BarBrushes[] to also paint the bar... It seems that when I use BarBrushes, it will cover any plot dot or draw object placed on the bar. How do I make it so that the plot dot or draw object is on top of the BarBrushes, so I can see them?

    Thanks in advance.

    #2
    Hello KhaosTrader,

    Thanks for your post.

    Are you using bar brushes and the draw object in the same indicator? If so you might want to review:
    http://ninjatrader.com/support/helpG...?setzorder.htm
    http://ninjatrader.com/support/helpG...ratezorder.htm
    http://ninjatrader.com/support/helpG...art_zorder.htm

    Alternatively you can add a simple SMA to the chart, set the period to 1, plotstyle to dot and then set the price series to "median" to place a dot in the center of a given candle.

    Another alternative to consider might be the indicator "Candle quarters" in the NT8 indicators file sharing area. The indicator will place a cross at the bar center, other points can be turned off by setting the plots transparent. Here is a link: http://ninjatrader.com/support/forum...p?7&linkid=692
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hi,

      Yes BarBrushes and drawing a dot, (actually I rather plot a dot) is on the same indicator. I am doing the dots on particular bars where a situation occurs... so its not every bar... I would like very much to have it in the same indicator. Is there a way to make a seperate z order for a plot to be on top of a barbrush?

      Comment


        #4
        Hello KhaosTrader,

        Thanks for your reply.

        Yes, please review the helpguide links in my first reply.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          I understand, I have many plots in my indicator, some are moving averages that i wish to be behind the pricebars, and others are markers which i want to be on top of the bars. So is there a way to make the z-order for one plot different than that of another plot, in the same study?

          Comment


            #6
            Hello KhaosTrader,

            Thanks for your reply.

            With reference to the helpguide links in my first post, zorder are by default set as:
            Chart Bars 1
            NinjaScript Objects 10001 (this would be plots)
            Global Draw Objects 20001
            Draw Objects 30001

            The higher number would be on top.

            You would not be able to specify a separate z order for an individual plot. You can set a particular draw object to be a different z-order than the indicator.
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              So you are saying i can make all draw objects a z-order (which all draw objects share) that are higher than the plot value z-order... , therefore I can make it so that my indicator plots are behind my bars, yet my draw objects will be on top of the bars.....

              Comment


                #8
                Hello KhaosTrader,

                Thanks for your reply.

                The ZOrder can be used to set all of the objects within your indicator above or below the bars. Within the indicator the objects are sequenced as advised in the links in the first post.

                The property IsSeparateZOrder in the helpguide advises " Determines the ZOrder of the drawing object will be different than the NinjaScript object that drew it." I am seeking further clarity what this means and how it applies to your needs of "...make it so that my indicator plots are behind my bars, yet my draw objects will be on top of the bars....."
                Paul H.NinjaTrader Customer Service

                Comment


                  #9
                  ok yes, I would like to know the clarification, also how i can change the z-order of draw objects such as diamonds, text, etc, and if a z-order for one object or object type is the same or are they independently set from each other when you set them.

                  Comment


                    #10
                    Hello,

                    Thanks for your post.

                    Yes, they can be set separately and I've attached an example picture and the code below. In the picture the plots lines are behind the candle, the dot is on top of the line but behind the candle, the up and down triangle are both on top of the line, the dot and the candle.

                    Dot myDot = Draw.Dot( this, "test"+CurrentBar, true, 2, Middle[2], Brushes.Fuchsia);
                    myDot.IsSeparateZOrder = true;
                    myDot.ZOrder = 10000;

                    TriangleUp myUpt = Draw.TriangleUp( this, "test1"+CurrentBar, true, 1, Middle[1], Brushes.Blue);
                    myUpt.IsSeparateZOrder = true;
                    myUpt.ZOrder = 20000;

                    TriangleDown myDt = Draw.TriangleDown ( this, "test2"+CurrentBar, true, 0, Middle[0], Brushes.Gold);
                    myDt.IsSeparateZOrder = true;
                    myDt.ZOrder = 30000;

                    With this you should be able to develop your own tests.
                    Attached Files
                    Paul H.NinjaTrader Customer Service

                    Comment


                      #11
                      Thank you, that's what I needed.

                      By the way that is a cool effect you made with those objects..

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by AttiM, 02-14-2024, 05:20 PM
                      11 responses
                      184 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by fernandobr, Today, 09:11 AM
                      1 response
                      3 views
                      0 likes
                      Last Post NinjaTrader_Erick  
                      Started by timmbbo, Today, 08:59 AM
                      1 response
                      3 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by KennyK, 05-29-2017, 02:02 AM
                      2 responses
                      1,281 views
                      0 likes
                      Last Post marcus2300  
                      Started by itrader46, Today, 09:04 AM
                      1 response
                      6 views
                      0 likes
                      Last Post NinjaTrader_Clayton  
                      Working...
                      X