Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Hide drawing but not value in data box

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

    Hide drawing but not value in data box

    Hi,
    I wrote indicator that shows bar value in $ (very useful to determinate risk), I click on mouse wheel and it shows value. Works good on ES tick chart until I switch to daily ES. I see this line. Is any way to hide it but not value on mouse wheel data box? I tried transparent color, uncheck visible box but it hides value in box.

    namespace NinjaTrader.NinjaScript.Indicators
    {
    public class ATR3 : Indicator
    {
    protected override void OnStateChange()
    {
    if (State == State.SetDefaults)
    {
    Description = @"Enter the description for your new custom Indicator here.";
    Name = "ATR3";
    Calculate = Calculate.OnBarClose;
    IsOverlay = false;
    DisplayInDataBox = true;
    DrawOnPricePanel = true;
    DrawHorizontalGridLines = true;
    DrawVerticalGridLines = true;
    PaintPriceMarkers = false;
    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;
    AddPlot(Brushes.DodgerBlue, "$");
    }
    else if (State == State.Configure)
    {
    }
    }

    protected override void OnBarUpdate()
    {
    if (CurrentBar < 1) return;
    Value[0] = (High[0]-Low[0])*Instrument.MasterInstrument.PointValue;
    //Add your custom indicator logic here.
    }
    }
    }

    Attached Files
    Last edited by Leeroy_Jenkins; 12-19-2019, 12:21 PM. Reason: wrong screenshot

    #2
    Hello Leeroy_Jenkins,

    I believe the most simple way to hide the plot while still keeping its color and in the data box would be to override the OnRender method and not call base:

    Code:
    protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
    {
    //base.OnRender(chartControl, chartScale); // commented out so we don't call base
    }
    This will hide the plots having this syntax in your script.


    I look forward to being of further assistance.

    Comment


      #3
      NinjaTrader_Jesse, Thanks!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      648 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X