How can we apply it to OHLC bars?
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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
Code: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
Code: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
Code: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
Code:ChartStyleType = (ChartStyleType.OHLC) 122345;
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
Chris L.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Max238, Today, 01:28 AM
|
2 responses
26 views
0 likes
|
Last Post Today, 07:04 AM | ||
Started by Shansen, 08-30-2019, 10:18 PM
|
25 responses
949 views
0 likes
|
Last Post Today, 07:01 AM | ||
Started by JonesJoker, 04-22-2024, 12:23 PM
|
8 responses
41 views
0 likes
|
Last Post
by JonesJoker
Today, 06:47 AM
|
||
Started by timko, Today, 06:45 AM
|
0 responses
5 views
0 likes
|
Last Post
by timko
Today, 06:45 AM
|
||
Started by Waxavi, 04-19-2024, 02:10 AM
|
2 responses
40 views
0 likes
|
Last Post
by poeds
Today, 06:37 AM
|
Comment