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

Smaller time frame data within larger time frame

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

    Smaller time frame data within larger time frame

    Hi,

    I am having a bit of trouble with the AddDataSeries function.

    I would like to be able to call smaller OHLC data within the each Bar. For example. I show a 20 minute chart and would like to get the minute opens within that bar and do some data computations.

    so i start out with using the AddDataSeries(BarsperiodType.Minute,1);

    When I try to run my code, where I try and call the Open[0], and print the result, it will show the 1 minute open of each minute bar instead of the higher time frame, 20 minute bar open. And I realise i'm having a hard time understanding how to implement what i want to do with this.

    When I remove the addDataSeries the Open[0] works as it should, it shows the 20 current time frame's open instead of the minute bar opens. Can you help point me in the direction to how to accomplish my goals of getting the smaller time frame data within each bar.

    Specifically I want the ability to pick each minute OHLC data within a single higher time frame bar (example 15 minute bar) and then reference the data to either other minute data or the higher time frame data (example. compare it to the previous bar open, or compare the second minute to the third minute of the completed bar).

    Note I'm looking only at the most current completed bar, not a realtime bar. Thanks.

    #2
    Hello Big_leon,

    You should use Opens[0][0] if you’d like to get the open of the primary data series and Opens[1][0] if you’d like the open of the secondary data series.

    See Opens section of our helpguide,


    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Waxavi, Today, 02:10 AM
    1 response
    17 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by Kaledus, Today, 01:29 PM
    5 responses
    13 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Waxavi, Today, 02:00 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by alifarahani, Today, 09:40 AM
    5 responses
    23 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by gentlebenthebear, Today, 01:30 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X