Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Bar Spacing Property
Collapse
X
-
Hello cutzpr,
Thanks for your post.
You can read the bar spacing type here: https://ninjatrader.com/support/help...pacingtype.htm
Other properties of interest might be:
https://ninjatrader.com/support/help...properties.htm
Note: see BarDistance in ChartControl properties.Paul H.NinjaTrader Customer Service
-
Paul,
Thank you. I thought it was ChartProperties.BarDistance but it didn't add up but now I see why. BarDistance is calculated from the center of the candle to the center of another candle. Not the from the outer body of the candle which is why the numbers did not add up.
Just posting this "fyi" for others. To get the colors to perfectly line up when rendering you dont need to incorporate the bar-width/outer body.
Code:barSpace = chartProperties.BarDistance; barWidth = (float)chartControl.BarWidth; barStartX = chartControl.GetXByBarIndex(ChartBars, index); barStartX = barStartX - barSpace/2; barEndX = chartControl.GetXByBarIndex(ChartBars, index) + barSpace/2;
Last edited by cutzpr; 07-28-2020, 08:22 AM.
- Likes 1
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by trilliantrader, 04-18-2024, 08:16 AM
|
5 responses
22 views
0 likes
|
Last Post Today, 12:32 AM | ||
Started by Davidtowleii, Today, 12:15 AM
|
0 responses
3 views
0 likes
|
Last Post
by Davidtowleii
Today, 12:15 AM
|
||
Started by guillembm, Yesterday, 11:25 AM
|
2 responses
9 views
0 likes
|
Last Post
by guillembm
Yesterday, 11:58 PM
|
||
Started by junkone, 04-21-2024, 07:17 AM
|
9 responses
70 views
0 likes
|
Last Post
by jeronymite
Yesterday, 11:51 PM
|
||
Started by mgco4you, Yesterday, 09:46 PM
|
1 response
14 views
0 likes
|
Last Post Yesterday, 09:56 PM |
Comment