Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Caching chart data

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

    Caching chart data

    Hi,

    in my indicator if (State == State.Configure) I do AddDataSeries(Instrument.FullName, new BarsPeriod { BarsPeriodType = BarsPeriodType.Tick, Value = 1 }); beacuse I need Tick Data.
    That data loading part takes really really a lot of time. So my questions are:
    1) Is there anything I can do to reduce this time?
    2) I load my indicator on the chart. It takes say 2 minutes. Then, without changing anything, I do reload Ninjascript. At this stage the chart data (associated with the AddDataSeries method) even though is the same as before it is reloaded from scratch every time. As far as I know asthere should be a db where this data is stored how come every time the data loading is taking so long?

    Thank you

    #2
    Hello VFI26,

    If your script requires that data there is not a way to get around loading it, you will need to load it.

    Loading tick data does take more time because there is a lot of data to process, unfortunately there is not a way to cache the data if you are requesting it in code. The F5 reload would only be quick if the chart series was the tick series and the chart was not being reloaded.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    127 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    73 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    115 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    109 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    88 views
    0 likes
    Last Post CarlTrading  
    Working...
    X