Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT7 indicator not showing

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

    NT7 indicator not showing

    Hi,

    I have the following codes compiled ok but the plots are not showing on the chart. Please help.

    Thanks in advance.

    T2010a

    Code:
     
    protected override void Initialize()
    {
    Add(new Plot(new Pen(Color.RoyalBlue, 2), PlotStyle.Bar, "UpVolume"));
    Add(new Plot(new Pen(Color.Red, 2), PlotStyle.Bar, "DownVolume"));
    Add(new Line(Color.DarkGray, 0, "Zero line"));
    }
    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {
    if (Volume[0] > Volume[1])
    {
    Values[0].Set(Volume[0]);
    Values[1].Reset();
    }
    else if (Volume[0] < Volume[1])
    {
    Values[1].Set(Volume[0]);
    Values[0].Reset();
    }
    else
    {
    Values[1].Reset();
    Values[0].Reset();
    }
    }

    #2
    Trader2010a, you likely only miss this quick check at the start of your indicator's OnBarUpdate() -

    Comment


      #3
      Hi Bertrand,

      Thanks for the link. I know I miss something

      T2010a

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      152 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      89 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      131 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      127 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      107 views
      0 likes
      Last Post CarlTrading  
      Working...
      X