Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar spacing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Bar spacing

    Hi,
    Please see below. This is a range chart with native Ninjatrader candles. All 100% standard NT8
    Click image for larger version

Name:	image.png
Views:	119
Size:	21.5 KB
ID:	1253837
    In the examples I circled, you can see the bar spacing is uneven. This happens a lot on smaller bars. This is I am sure likely due to rounding and the inability to evenly divide the screen width by the number of bars. Would this be a correct assumption?​ I'd like to fix this in my own bars as I find it somewhat annoying! Did anyone try to do this? Any hints? Am guessing that you cannot have fractional pixel widths for rectangles (even though they are RectangleF and fractions, it rounds?) ?

    Thanks for any hints.

    #2
    Hello pjsmith,

    The code for that bars type is available in the NinjaScript editor. I wouldn't know offhand what would cause that but if you wanted to make your own type that would be a good starting point. You can add prints to the code to get a better idea of what's happening when running in that specific use case.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    633 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    364 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    567 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X