Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Bar Width
Collapse
X
-
Hello pman777,
Thank you for the post.
I could not find any available property to set this up. You could perform the same logic with the BarWidth property that Chart Control has.
After you get that value, you can set the Width of any plot in the Plots array.
Please let me know If I can assist further.
-
Hi ChrisL,Originally posted by NinjaTrader_ChrisL View PostHello pman777,
Thank you for the post.
I could not find any available property to set this up. You could perform the same logic with the BarWidth property that Chart Control has.
After you get that value, you can set the Width of any plot in the Plots array.
Please let me know If I can assist further.
There is a built-in feature for that in NT 8.0.16.3.
If you use "Bar" for Plot style in any indicator properties, the NT8 will insert a check box under the indicators properties which you can click to "Match data series width".
Cheers!
- Likes 2
Comment
-
i'm wondering if Pman777's original intent was to set this within the indicator coding itself so that it comes as default when loaded...
that's my question - can i do something in the indicator code when i'm coding a new indicator that uses a bar histogram to check that box as a default ?
thanks,
wes
i just looked at BarWidth but i'm not sure how i would use this to do the same as the checkbox "Match Data Series Width" ?Last edited by stafe; 03-02-2019, 07:23 PM.
Comment
-
Hello stafe,
Thanks for the follow-up.
I found this property hiding under a different moniker: "AutoWidth", setting AutoWidth = true; in State.SetDefaults after your plots are added will enable the "Match bar width" property even though it might not set it within the UI property grid.
Please let me know if I can assist further.
- Likes 1
Comment
-
For those who come across this thread, ChrisL is referring to a property of the Plot class. It has a property Plot.AutoWidth = true. You have to find the Plot you wish to change in the Plots array of the Indicator and change that to true. I suspect plots are added to the array in the order for which you call AddPlot so you should be able to modify the last Plot in the array it immediately after AddPlot.
As of NinjaTrader 8.0.24.1, if you set this flag in SetDefaults after you call AddPlot, it will check the item in the UI.
Please put a feature request to have AddPlot() return the Plot it just created. This would make for easier time in adjusting this flag and knowing which plot you are adjusting.
Last edited by ntbone; 06-15-2021, 09:31 PM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
602 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
347 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 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
560 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
559 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment