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

Questions with different data series with different time frames

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

    Questions with different data series with different time frames

    Hi,

    I'm working with 3 data series (1', 5', 10') with an indicator.

    The primary data series could be another different time frame.

    I've read your post:


    but I think I cannot understand everything.....

    While using my indicator, when I'm drawing the plots, I'm on CurrentBars[0].
    In order to be sure the other BarsArray are complete loaded, when I'm drawing plots from data series 1, 2 & 3, I have to use the bar [1] instead the last bar [0].
    When doing tests, if I use for these other BarsArray the bar [0], sometimes the value I get is 0.
    Also it is even worse, because I'm using an EMA with the data from every BarsArray, so, I'm adding more delay....

    How should I do it?
    Do you have an example?
    If possible use please also an EMA with every data series....

    Thanks!

    #2
    Ok,

    I was working on it and I think I 've solved it.
    I was doing some calculations from secondary Data Series under primary serie (CurrentBars[0]).

    Thanks in any case!

    Comment


      #3
      Hello artson,

      Thanks for your post.

      If you are wanting to calculate values based on the added secondary series, you would need to specify the BarsInProgress or BarsArray value of that added series and create your calculations. Note that you could access prices from the added series by calling Closes[1][0], Opens[1][0], Highs[1][0], Lows[1][0], etc.

      Please review this help guide page for information about working with Multi-Timeframe/Multi-Instrument NinjaScripts: https://ninjatrader.com/support/help...nstruments.htm

      And see this help guide page: https://ninjatrader.com/support/help...riceseries.htm

      Let me know if you have further questions.
      Last edited by NinjaTrader_BrandonH; 10-10-2022, 07:38 AM.
      Brandon H.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Haiasi, 04-25-2024, 06:53 PM
      2 responses
      17 views
      0 likes
      Last Post Massinisa  
      Started by Creamers, Today, 05:32 AM
      0 responses
      5 views
      0 likes
      Last Post Creamers  
      Started by Segwin, 05-07-2018, 02:15 PM
      12 responses
      1,786 views
      0 likes
      Last Post Leafcutter  
      Started by poplagelu, Today, 05:00 AM
      0 responses
      3 views
      0 likes
      Last Post poplagelu  
      Started by fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,408 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Working...
      X