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 Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    556 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X