thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Custom Candle Paint Bar
Collapse
X
-
Custom Candle Paint Bar
Hi, I’d like to make a custom paint bar indicator that uses only the body of the candle (no wick), super thin and can be placed either on the left, right, or middle of the bar. Some indicators like for footprint allow you to use what’s called paint bars which do just that. Does anyone know of any indicators like this or can point me in the right direction?
thanksTags: None
-
Hello the_soloist,
Thank you for your post.
Can you clarify, are you trying to change the color of the bar, or draw an object to the left/right/middle of the bar?
BarBrush will allow you to change the color of a price bar's body. CandleOutlineBrush will change the color of the outline of a candlestick.
BarBrush - https://ninjatrader.com/support/help...8/barbrush.htm
CandleOutlineBrush - https://ninjatrader.com/support/help...tlinebrush.htm
Below is a list of all the Drawing methods you can use to draw different objects on the chart.
If you want to draw to the left or the right of the bars, you will need to use custom rendering.
Using SharpDX for Custom Chart Rendering - https://ninjatrader.com/support/help..._rendering.htm
Please let me know if I can assist further.
-
Thank you, Yeah I'm trying to do both but also make them thinner. So they look like this:Originally posted by NinjaTrader_Gaby View PostHello the_soloist,
Thank you for your post.
Can you clarify, are you trying to change the color of the bar, or draw an object to the left/right/middle of the bar?
BarBrush will allow you to change the color of a price bar's body. CandleOutlineBrush will change the color of the outline of a candlestick.
BarBrush - https://ninjatrader.com/support/help...8/barbrush.htm
CandleOutlineBrush - https://ninjatrader.com/support/help...tlinebrush.htm
Below is a list of all the Drawing methods you can use to draw different objects on the chart.
If you want to draw to the left or the right of the bars, you will need to use custom rendering.
Using SharpDX for Custom Chart Rendering - https://ninjatrader.com/support/help..._rendering.htm
Please let me know if I can assist further.
1 Photo
Comment
-
Hello,
You can change the bar width by right-clicking within the chart > Data Series > change the 'Bar width' property.
You can also access it programmatically within an indicator using ChartBars.Properties.ChartStyle.BarWidth:
ChartBars - https://ninjatrader.com/support/help.../chartbars.htm
Properties - https://ninjatrader.com/support/help...properties.htm
Please let us know if you have any other questions.
Comment
-
Ok got it. In regards to SharpDX, would you have any suggestions on how to implement it in the code below:
Code:#region Using declarations using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System.Windows.Input; using System.Windows.Media; using System.Xml.Serialization; using NinjaTrader.Cbi; using NinjaTrader.Gui; using NinjaTrader.Gui.Chart; using NinjaTrader.Gui.SuperDom; using NinjaTrader.Gui.Tools; using NinjaTrader.Data; using NinjaTrader.NinjaScript; using NinjaTrader.Core.FloatingPoint; using NinjaTrader.NinjaScript.DrawingTools; using SharpDX; #endregion //This namespace holds Indicators in this folder and is required. Do not change it. namespace NinjaTrader.NinjaScript.Indicators { public class BarBrushTest : Indicator { protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Enter the description for your new custom Indicator here."; Name = "BarBrushTest"; Calculate = Calculate.OnPriceChange; 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() { if (CurrentBar < 10) return; if (Close[0] > Open[0]) BarBrush = Brushes.DodgerBlue; CandleOutlineBrush = Brushes.Transparent; if (Close[0] < Open[0]) BarBrush = Brushes.Red; CandleOutlineBrush = Brushes.Transparent; } } }
Comment
-
Hello,
It depends on what you would like to render using SharpDX. Are you trying to render a line, shapes, text?
Take a look at the 'SampleCustomRender' indicator in the platform which demonstrates using SharpDX. You can look at the code for it in the NinjaScript Editor.
Please let us know if you have any other questions.
Comment
-
Ok cool thanks for your help. Yeah I’m just trying to simply move the candles to the right side of the bar.
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
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
553 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment