Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Loading data series larger than chart time frame

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

    Loading data series larger than chart time frame

    Hi,

    I'm developing an indicator for a chart shows minute bar of an instrument. This indicator requires OHLC data of previous 30 trading days.

    Since the AddDataSeries method only loads as much data as the chart time frame. For example, if create a chart which "Load data based" on days, and set "Days to load" to 5. Then by using AddDataSeries we can only get OHLC for the last 5 days.

    By modifying "Days to load" would work though it makes browsing the chart really inconvenient.

    Is there a way for an indicator to get the last 30 day OHLC data regardless the chart settings?

    Thanks

    #2
    Hello lkuo.me,

    It is possible to do an out of sync data request using BarsRequest(), it is not possible to feed that data to an indicator as an input series.


    Because of this, any data you get through a BarsRequest() you will have to process in your script directly. This means you can get the OHLC of a daily bar series for 30 days, but you would not be able to supply this to an indicator call.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    52 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    71 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    38 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    99 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    60 views
    0 likes
    Last Post PaulMohn  
    Working...
    X