Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Indicator ploted a BAR and generating extra rectangle below of the bar.

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

    Indicator ploted a BAR and generating extra rectangle below of the bar.

    Hello!

    I have the indicator as Bar on the chart. This indicator creates extra rectangle going from below the bar until the bottom part of the screen.

    Is there a function in Ninjatrader to avoid this extra rectangle?

    Thanks in advance!

    #2
    Hello Stanfillirenfro,

    If you are using the Bar plotting style that makes a bar chart, that would generally need to be used in a separate panel because that will start at a 0 value and go up from there based on the value you plot.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Many thanks NinjaTrader_Jesse for your reply.

      I want the bar to overlay on the chart. With the separate panel, there would be NO PROBLEM with the indicator. The idea is to color the bars ploted on the char. I have the bars colored, but the extra rectangles created by the indicator are going until the bottom of the screen, what I do not want.

      Any advice, please?

      Thanks in advance!

      Comment


        #4
        Hello Stanfillirenfro,

        If you want to draw rectangles instead of bars you would need to use OnRender and custom rendering for that instead of using bar style plots. Alternatively you can use a different plot style that is not bar so the indicator stops plotting bars.

        JesseNinjaTrader Customer Service

        Comment


          #5
          NinjaTrader_Jesse I want bars. Since I consider the bars as rectangles, it is why I am colling them rectangles.
          Could you please have a look on the attached pictures? The indicator plots the histograms on the bars, but the extra rectangles are all red, and it is not what I want.

          In OnRender? Is there a way to overcome this problem without OnRender?

          Thanks in advance!

          Comment


            #6
            Hello Stanfillirenfro,

            There was no image attached
            JesseNinjaTrader Customer Service

            Comment


              #7
              Hello NinjaTrader_Jesse,

              The image is attached.
              Attached Files

              Comment


                #8
                Hello Stanfillirenfro,

                Yes that would be expected for a bar chart. A bar chart is intended to show some value that starts at 0 and then goes to a higher price. Bar charts are generally used to represent accumulated data like volume. When you combine that with price bars which do not start at 0 that is the result that you would get.

                To draw rectangles that end somewhere above 0 you would need to use OnRender to draw rectangles that have a high and low price. You can use OnRender for that purpose. There is a sample indicator called SampleCustomRender that comes with the platform which shows how to draw rectangles. You could combine that with the sample on the following linked page that shows how you can use a plots data for the purpose of rendering. That allows you to loop over the currently visible bar set to access plot values and then do rendering based on those values.

                JesseNinjaTrader Customer Service

                Comment


                  #9
                  Many thanks NinjaTrader_Jesse for your help!

                  I will go through the link.

                  I will revert to you very soon.

                  Thanks again!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by fx.practic, 10-15-2013, 12:53 AM
                  5 responses
                  5,404 views
                  0 likes
                  Last Post Bidder
                  by Bidder
                   
                  Started by Shai Samuel, 07-02-2022, 02:46 PM
                  4 responses
                  95 views
                  0 likes
                  Last Post Bidder
                  by Bidder
                   
                  Started by DJ888, Yesterday, 10:57 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by MacDad, 02-25-2024, 11:48 PM
                  7 responses
                  159 views
                  0 likes
                  Last Post loganjarosz123  
                  Started by Belfortbucks, Yesterday, 09:29 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post Belfortbucks  
                  Working...
                  X