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 tkaboris, Today, 06:27 AM
|
0 responses
4 views
0 likes
|
Last Post
by tkaboris
Today, 06:27 AM
|
||
Started by kevinenergy, Yesterday, 12:01 PM
|
4 responses
15 views
0 likes
|
Last Post Today, 06:17 AM | ||
Started by DawnTreader, 05-08-2024, 05:58 PM
|
7 responses
29 views
0 likes
|
Last Post Today, 05:30 AM | ||
Started by sgordet, Today, 05:24 AM
|
0 responses
9 views
0 likes
|
Last Post
by sgordet
Today, 05:24 AM
|
||
Started by haas88, 03-21-2024, 02:22 AM
|
18 responses
212 views
0 likes
|
Last Post
by haas88
Today, 02:37 AM
|
Comment