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:	69
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:	51
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.
    JimNinjaTrader Customer Service

    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, 10:39 AM.
      JimNinjaTrader Customer Service

      Comment


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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hyper, Yesterday, 11:10 PM
        1 response
        11 views
        0 likes
        Last Post timko
        by timko
         
        Started by Ousher, Today, 04:01 AM
        0 responses
        6 views
        0 likes
        Last Post Ousher
        by Ousher
         
        Started by kuxosude, Today, 02:17 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by PanicTrades, 05-10-2020, 08:45 AM
        6 responses
        72 views
        0 likes
        Last Post damon_achey  
        Started by soon123, Yesterday, 11:44 PM
        0 responses
        10 views
        0 likes
        Last Post soon123
        by soon123
         
        Working...
        X