• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Rectangle NOT Plotting

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

    Rectangle NOT Plotting

    Hey guys, question. any idea why this Rectangle is NOT plotting? I placed it on Panel 1, and tried it on it's own Panel. just stays blank.

    I want rectangle to Plot at every new bar. in a Renko bar chart!
    Attached Files

    #2
    Hello,

    It looks like the values you are using would not be valid,

    Looking at the line of code:

    Code:
    DrawRectangle("Test", false, 1, 0, 0, 1, Color.Blue, Color.Black, 3);

    This is currently set to draw 1 bar ago at value between 1 and 0, was this intended?

    If so you would need to turn on the autoscale by changing the false to true and then chart will scale to show this.

    Otherwise you would need to put in a price value for the two y values it asks for and you should see it drawn.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks, it did draw something. but It drew Rectangles in Main Data Series.

      This is what I get: http://screencast.com/t/NRAQoh3M0e


      THis is my goal. to draw it like this: http://screencast.com/t/lFJRiZJ4A


      Also how do I change the color of it depending if lets say Close[0] > EMA(10)....etc

      Comment


        #4
        Hello,

        Based on the image, there is an easier approach using the BackColor property.

        There is a example that actually looks almost identical to what you are after here: http://www.ninjatrader.com/support/h...tsub=BackColor

        The BackColor property would in turn be much more efficient than drawing a rectangle for every bar.
        If you did want to instead use a rectangle, you need to use the DrawOnPricePanel property http://www.ninjatrader.com/support/h...awonpricepanel

        For the color change, please see the first link there is a good example on how the color is changed based on a condition.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          that BackColor is literally Exactly what I was looking for. Thanks so much!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by marwanco, Today, 10:54 AM
          1 response
          3 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Started by daqu40, Today, 11:01 AM
          0 responses
          0 views
          0 likes
          Last Post daqu40
          by daqu40
           
          Started by n8dogg59, Today, 09:55 AM
          2 responses
          3 views
          0 likes
          Last Post n8dogg59  
          Started by ren37, Today, 09:42 AM
          2 responses
          4 views
          0 likes
          Last Post ren37
          by ren37
           
          Started by Austiner87, Today, 08:16 AM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_ChrisL  
          Working...
          X