Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot only on current Candle

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

    Plot only on current Candle

    Hello All,

    I have made a very simple indicator called the Renko candle close line. It plots an object on the chart where the candle would close in both directions. The problem is that it plots on all the candles and I would love it to only plot on the current candle.

    Is there a way to remove plots that are not on the current candle?
    or perhaps code it to only plot on the current candle.

    Thanks in advance!

    AtemiWaza


    Code:
                          if (State == State.SetDefaults)
                          {
    				Bricksize			         		= 2;
    				Highcolour					= Brushes.DarkGreen;
    				Lowcolour					= Brushes.DarkRed;
                                    AddPlot(new Stroke(Highcolour, 2), PlotStyle.Hash, "Upplot");
    				AddPlot(new Stroke(Lowcolour, 2), PlotStyle.Hash, "Dnplot");
    			}
    			else if (State == State.Configure)
    			{
    			}
    		}
    
    		protected override void OnBarUpdate()
    		{
    			//Add your custom indicator logic here.
    			Upplot[0] = (Open[0] + (Bricksize * TickSize)) ;
    			Dnplot[0] = (Open[0] + (-Bricksize * TickSize));
    		}

    #2
    Hello AtemiWaza,

    Thank you for your note.

    Yes, you could remove or reset previous plot values to Transparent so that only the current plot values are visible. The following forum post provides an example of how this can be done,



    I would also suggest seeing the pivot indicator preloaded with NinjaTrader, which only shows current plot values.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    574 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    333 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