Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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:	428
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:	367
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, 11: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 Pattontje, Yesterday, 02:10 PM
        2 responses
        15 views
        0 likes
        Last Post Pattontje  
        Started by flybuzz, 04-21-2024, 04:07 PM
        17 responses
        229 views
        0 likes
        Last Post TradingLoss  
        Started by agclub, 04-21-2024, 08:57 PM
        3 responses
        17 views
        0 likes
        Last Post TradingLoss  
        Started by TradingLoss, 04-21-2024, 04:32 PM
        4 responses
        44 views
        2 likes
        Last Post TradingLoss  
        Started by cre8able, 04-17-2024, 04:16 PM
        6 responses
        57 views
        0 likes
        Last Post cre8able  
        Working...
        X