Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Hide drawing objects?

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

    Hide drawing objects?

    This may be a silly question...

    I have some instruments that have quite a few drawing objects (like manually drawn support/resistance horizontal lines). As long as i am looking on short term charts (say, 1min charts) It's fine - most of them are out of view and only the relevant ones show on the chart.

    But when I go to a longer term chart (daily or even 10min), then the chart becomes very cluttered with all these lines crossing over it.

    I don't want to delete the drawing objects (even old ones) - but at times i just want to hide them on a specific chart. Looking around the UI I could not find a way to do this. Does anyone know of a way to temporarily hide drawing objects?

    #2
    Hello,

    Thanks for the note.

    Unfortunately there is not a check box you can use to hide it, only thing you could do is change the color to transparent or very light in color so you cannot see it.

    What I will do is send this request into development.

    -Brett

    Comment


      #3
      That would would be a really helpful feature. Brett, could you please let me have the reference number so I can refer to it if I chase this up with development.

      Thanks in advance

      Comment


        #4
        Hello,

        Sure this is ID 1111.

        Thanks and wish you a great rest of the day.

        Comment


          #5
          You implied that a programmer can change the color of a marker after it is put on a chart? If I have the tag to the marker, how can I get access to that marker to change its color? There seems to be the possibility to change (as you mentioned below) the color to transparent then when you want those makers back you could change the color back to its original color. Does this sound plausible?
          Thanks for your response!

          Comment


            #6
            Here's a brief example of how you'd accomplish this. Note that I'm working only with the IHorzontalLines, but you can change this to whatever you want.

            This also assumes you're manually naming the object tag "MyTag".

            I'm also working in OnBarUpdate, so these changes will not apply until there has been a tick received. You're free to work in another other event should you feel inclined, keeping performance in mind.

            Code:
            				// loops through each draw object on the chart
            				foreach(IDrawObject o in DrawObjects)
            				{
            			
            					// checks that they are HorizontalLine (can be changed to any drawtype you're working with)
            					if(o.DrawType == DrawType.HorizontalLine)
            					{
            						IHorizontalLine hLine;
            						
            						hLine = (IHorizontalLine)o;
            						
            						// ensures the object exists
            						if(hLine == null) return;
            							
            						//checks for object named "MyTag"
            						if(hLine.Tag == "MyTag")
            						{
            							// if the bars period is greater or equal to 10 minutes...
            							if(BarsPeriod.BasePeriodType == PeriodType.Minute && BarsPeriod.Value >= 10)
            							{
            								//set the line color to transparent...
            								hLine.Pen.Color = Color.Transparent;
            							}
            						    //otherwise set the color to red
            							else hLine.Pen.Color = Color.Red;
            						}
            												
            					}			
            				}
            MatthewNinjaTrader Product Management

            Comment


              #7
              Thanks for the response. I'm finding this not to function say for Arrows (ArrowDown / ArrowUp). Since markers other than lines have an outline as well as the fill color would we still pattern the code after your example?. I've tried to change an arrow color to Color.Transparent yet with no visible change. Also when I traverse through the DrawObjects, how would I determine what type the object is? (arrow, triangle, etc)
              Again, your help is always appreciated.

              Comment


                #8
                Yes, looks like some of the objects are still going to have an outline. I do not have a supported way to redraw these, but you might want to consider switching to the DrawText() method and using Windings for special shapes.
                MatthewNinjaTrader Product Management

                Comment


                  #9
                  I actually thought about something like the following...
                  Since as each marker is drawn, I'm putting its properties into array of records. When I want to remove the markers then ...

                  foreach (MarkerObjects myMarker in MyMarkers)
                  {
                  RemoveDrawObject(myMarker.Tag);
                  }

                  Then to repopulate them back...

                  foreach (MarkerObjects myMarker in MyMarkers)
                  {
                  ShowMarker(myMarker.Marker, myMarker.IsHi, myMarker.Tag, myMarker.BarsAgo, myMarker.Y, myMarker.Clr);
                  }

                  opinions? comments please?

                  Comment


                    #10
                    Hide / show drawn objects

                    I have some instruments that have quite a few drawing support/resistance horizontal lines. As long as i am looking on short term charts (say, 1min charts) It's fine - most of them are out of view and only the relevant ones show on the chart.

                    But when I go to a longer term chart (daily or even 10min), then the chart becomes very cluttered with all these lines crossing over it.

                    I don't want to delete the drawing objects (even old ones) - but at times I just want to hide them on a specific chart. Does anyone know of a way to temporarily hide drawing objects?

                    thanks
                    Last edited by PEPBOSCH; 09-28-2014, 10:52 AM. Reason: TITLE

                    Comment


                      #11
                      Hello PEPBOSCH,

                      Thank you for writing in.

                      This item is being implemented in our next major release, NinjaTrader 8. You can see other confirmed enhancements at the following link.



                      Please let me know if I can be of any further assistance.
                      Zach S.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Brevo, Today, 01:45 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post Brevo
                      by Brevo
                       
                      Started by aussugardefender, Today, 01:07 AM
                      0 responses
                      3 views
                      0 likes
                      Last Post aussugardefender  
                      Started by pvincent, 06-23-2022, 12:53 PM
                      14 responses
                      241 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
                       
                      Started by oviejo, Today, 12:28 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post oviejo
                      by oviejo
                       
                      Working...
                      X