Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to code to refresh a tick chart to a new tick bar size?

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

    How to code to refresh a tick chart to a new tick bar size?

    I am looking to:

    1. find the total number of ticks/trades in the last day on a 1000-tick chart
    2. divide by 60,
    3. then refresh the tick chart to the new tick value, so the tick chart shows exactly 60 bars per day

    How do I start on #1?

    For #3, writing BarsPeriod.Value=2000 in OnStateChange on a 1000 tick chart doesn't do anything - the chart is still 1000 tick.

    Thank you for any help!

    #2
    Hello xxzbill,

    It is not supported to directly change the data series information of a chart.

    An undocumented approach would be to send keys using Keyboard.FocusedElement.RaiseEvent. The RolloverIndications indicator has an demonstration of this in a button click.
    Shows a button on the chart to roll the expiry to the next available contract month. Option to hide button until a number of days before or on roll date. Another option to confirm by opening the instrument overlay selector or automatically rollover without confirmation. (Update June 27th, 2019 – Added an option to show […]
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    67 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    150 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    162 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 05-10-2026, 08:12 PM
    0 responses
    99 views
    0 likes
    Last Post CarlTrading  
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    287 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Working...
    X