Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator to change all chart's Drawing Objects to visible

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

    Indicator to change all chart's Drawing Objects to visible

    I confirmed there is an issue with 8.0.32.2 where drawing objects are set to invisible when changing instrument and not set back to visible when returning to that instrument (more info).

    Is it possible, through an indicator, to loop through all the drawing objects on a chart (that matches the current symbol) and sets them to visible? Perhaps with a button on the chart?

    The primary way that I do analysis is to have a Market Analyzer list that is linked to a chart, and I click on symbol after symbol and look at my previous analysis and notes (all drawing objects). At the moment, this bug is really affecting my analysis and I'm looking for an alternative solution to this bug.

    Thank you!

    #2
    Hello neoikon,

    Thank you for your post.

    You can certainly loop through the drawing tools on the chart and set them all visible via an indicator. Here's a very simple example:

    Code:
     public class ExampleMakeVisible : Indicator
    {
    
    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {
    Description = @"Enter the description for your new custom Indicator here.";
    Name = "ExampleMakeVisible";
    Calculate = Calculate.OnEachTick;
    IsOverlay = true;
    DisplayInDataBox = true;
    DrawOnPricePanel = true;
    DrawHorizontalGridLines = true;
    DrawVerticalGridLines = true;
    PaintPriceMarkers = true;
    ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
    //Disable this property if your indicator requires custom values that cumulate with each new market data event.
    //See Help Guide for additional information.
    IsSuspendedWhileInactive = true;
    }
    else if (State == State.Configure)
    {
    }
    }
    
    protected override void OnBarUpdate()
    {
    foreach (DrawingTool draw in DrawObjects.ToList())
    {
    draw.IsVisible = true;
    }
    
    }
    }
    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    576 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    334 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    553 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    551 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X