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

Problem with an array on current bar

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

    Problem with an array on current bar

    I have a function which uses daily bars in an array and I'm having a problem accessing the first element using an intraday strategy and intraday print log.

    The most unusual part of the problem is that I use NT7 on 2 PCs, one for development (PC#1) and one for live trading (PC#2). Using the exact same code, the problem only exists on PC#2.

    Here's the detail:
    BarsArray[1] = daily bars
    BarsArray[0] = tick bars
    function name = Moveup

    I'm trying to call the first element in the array, Moveup(BarsArray[1],0)[0] into an intraday strategy but the intraday print log output I'm getting = 0.

    Close 7/27 Moveup = +505 as of close
    On 7/28 Moveup(BarsArray[1],0)[0] = +505 in the intraday print log as expected

    Close 7/29 Moveup = +178 as of close
    On 7/30 Moveup(BarsArray[1],0)[0] = 0 (This is wrong, we should have the +178 info in element[0] since element[0] should be the data from yesterday's close.

    I'd be willing to send the file to you directly if you think it would help.

    Thx,
    Lou

    #2
    Hello Lou,

    Thanks for the report. Please include the file you're using as well as steps to reproduce and a description of the behavior you're expecting.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Ryan,
      I just sent the files to your attention at [email protected]. Please let me know ASAP if you have any questions.

      Comment


        #4
        Ryan,
        You can ignore this issue. The problem was a mistake on my part. I was running the backtests through 7/29 and the residual output for 7/30 was displaying a 0 value. If I set the backtest through today, 7/30, then I get the correct values for 7/30 as expected.

        Thx for your help,
        Lou

        Comment


          #5
          Thanks for the update, lou! Glad to hear you got it sorted.
          Ryan M.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by MacDad, 02-25-2024, 11:48 PM
          7 responses
          158 views
          0 likes
          Last Post loganjarosz123  
          Started by Belfortbucks, Today, 09:29 PM
          0 responses
          7 views
          0 likes
          Last Post Belfortbucks  
          Started by zstheorist, Today, 07:52 PM
          0 responses
          7 views
          0 likes
          Last Post zstheorist  
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          151 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Started by mattbsea, Today, 05:44 PM
          0 responses
          6 views
          0 likes
          Last Post mattbsea  
          Working...
          X