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

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 arvidvanstaey, Today, 02:19 PM
    0 responses
    2 views
    0 likes
    Last Post arvidvanstaey  
    Started by mmckinnm, Today, 01:34 PM
    3 responses
    5 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by f.saeidi, Today, 01:32 PM
    2 responses
    5 views
    0 likes
    Last Post f.saeidi  
    Started by alifarahani, 04-19-2024, 09:40 AM
    9 responses
    55 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Conceptzx, 10-11-2022, 06:38 AM
    3 responses
    60 views
    0 likes
    Last Post NinjaTrader_SeanH  
    Working...
    X