How can we apply it to OHLC bars?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ChartStyle From Candlestick Bars to OHLC Bars
Collapse
X
-
ChartStyle From Candlestick Bars to OHLC Bars
I have got this ChartStyle in attachment which works for Candlestick Bars (it allows for custom coloring of wicks)
How can we apply it to OHLC bars? -
Hello Chris and thanks for the suggestion.
I found that the CandleStyle ChartStyle (built in NT8) uses
in OnStateChangeCode:ChartStyleType = ChartStyleType.CandleStick;
Code:protected override void OnStateChange() { if (State == State.SetDefaults) { Name = Custom.Resource.NinjaScriptChartStyleCandlestick; ChartStyleType = ChartStyleType.CandleStick;
The bbb ChartStyle shared in previous post uses
custom codeCode:ChartStyleType = (ChartStyleType) 122345;
Code:protected override void OnStateChange() { if (State == State.SetDefaults) { Name = @"bbb"; Description = "Plots customizable outline, wicks and bar opacity Candlesticks"; ChartStyleType = (ChartStyleType) 122345;
And the OhlcStyle ChartStyle (built in NT8) uses
in OnStateChangeCode:ChartStyleType = ChartStyleType.OHLC
Code:protected override void OnStateChange() { if (State == State.SetDefaults) { Name = Custom.Resource.NinjaScriptChartStyleOHLC; ChartStyleType = ChartStyleType.OHLC
What would you recommend to get the OhlcStyle applied to the bbb ChartStyle?
I though of
custom codeCode:ChartStyleType = (ChartStyleType.OHLC) 122345;
Is this correct? If not, what else would you recommend?Code:protected override void OnStateChange() { if (State == State.SetDefaults) { Name = @"bbb"; Description = "Plots customizable outline, wicks and bar opacity Candlesticks"; ChartStyleType = (ChartStyleType.OHLC) 122345;
Comment
-
Hi Paul, thanks for your reply.
The ChartStyleType is used to uniquely identify a chart style, it does not apply other properties from other chart style types. See the documentation here:
You would need similar logic from the CandleStick chart style type within your custom chart style to replicate its visual style. I recommended a way to make a copy of the script in my other post.
Best regards,
-ChrisL
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
43 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
20 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
29 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
46 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
38 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment