Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom ChartStyle: Is variable bar spacing along the time axis not possible?

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

    Custom ChartStyle: Is variable bar spacing along the time axis not possible?

    Hello

    I have been trying to make a custom ChartStyle which is essentially the Equivolume bars with all the space between the bars removed like BoxStyle bars. (So I guess they would be Vary-Volume bars )

    BoxStyle.cs seems to set the bars X position using the following code:

    Click image for larger version

Name:	__BoxStyle.cs.PNG
Views:	517
Size:	30.0 KB
ID:	1123465
    The plan was to keep track of the previous bars x co-ordinate and volume variable bar width. Then add those to set the following bars x co-ordinate. While I can render horizontal lines starting and finishing at any variable x co-ordinate. The vertical Bars point.x values get ignored altogether.

    So after a bit of frustration I just tried scaling the "boxStartPosition" value (to 20 instead of 2*x) in the above BoxStyle.cs to see if I could add space between the Boxes... It has no impact on the rendered box bars?

    Should what I am trying to do be possible? Or are bars x co-ordinates ignored because the time line spacing is fixed?

    Equivolume Bars with the collapsed variable spacing similar to this chart:

    Click image for larger version

Name:	__VariableXscale.PNG
Views:	452
Size:	77.1 KB
ID:	1123466
    Thanks

    #2
    Hello SmartArtsStudio,

    Thanks for your post.

    I do not yet want to say this is not possible, and I am consulting with my colleagues to see if something like this can be accomplished with a ChartStyle.

    I will keep you posted on our findings, thanks in advance for your patience.

    Comment


      #3
      Ok, so I have gotten some clarity from a developer here as these topics were discussed when we added the Equivolume ChartStyle.

      This would not be possible as it comes down to bar spacing on the timescale. While we can enable/disable Equidistant Bar Spacing on the chart to have bars spaced specifically by time, or to allow equal distance from other bar, these bar spacing types do not compensate for spacing by volume.

      We could draw bars of a desired width with the Equivolume ChartStyle, but we could not modify the spacing between them on the timescale to give the same space between bars.

      If you have any additional questions, please don't hesitate to ask.
      Last edited by NinjaTrader_Jim; 10-20-2020, 11:39 AM.

      Comment


        #4
        This puts my mind at ease
        Thanks for the clarification.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        84 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        143 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        83 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        256 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        334 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X