• 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

Draw.Region Behavior

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

    Draw.Region Behavior

    Dear Support,

    I need to know if is there a method to fix Draw.Region function like I need.
    In the attached screenshot, you can see that Draw.Region always draw region between the two iSeries Y values, and this is correctly expected.

    But if I want draw only the area under or up my custom level (such as 15 or 85 in my case) what is the best way to do ?

    I mean inside the same candle I would like to see one part of area not colored, and one part colored when indicator pass my extreme value.

    OnRender function can help me in this case?

    thank you, best regards

    Andrea



    Attached Files

    #2
    Hello Andrea,

    You could choose to start the region on the bar after and not draw the region on the bar you are not wanting it to appear on.
    For example you could draw the region between two series as long as the value on the previous bar of the first series is greater than the value of the previous bar on the second series.

    Or you could custom render in OnRender() using geometry.
    https://ninjatrader.com/support/help...ometrysink.htm
    https://ninjatrader.com/support/help...thgeometry.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello Chelsea,

      thank you for your reply!

      I already use the first solution, I will try using geometry, I think this is what I was looking for!!

      have you some esample for this case?



      Comment


        #4
        Hello Andrea,

        A great example of using pathgeometry is in the @Shapes.cs file in the DrawingTools folder.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thank you, it is perfect!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by waldoalvarez, Today, 04:59 PM
          0 responses
          2 views
          0 likes
          Last Post waldoalvarez  
          Started by habibalex, Today, 09:45 AM
          2 responses
          14 views
          0 likes
          Last Post habibalex  
          Started by junkone, Today, 03:42 PM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by peterslane1, Today, 09:47 AM
          2 responses
          17 views
          0 likes
          Last Post aviat72
          by aviat72
           
          Started by SlickRick, Today, 02:47 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_Zachary  
          Working...
          X