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 JGriff5646, Today, 10:02 PM
          0 responses
          8 views
          0 likes
          Last Post JGriff5646  
          Started by AdamDJ8, Today, 09:18 PM
          0 responses
          3 views
          0 likes
          Last Post AdamDJ8
          by AdamDJ8
           
          Started by knowmad, Today, 03:52 AM
          2 responses
          29 views
          0 likes
          Last Post knowmad
          by knowmad
           
          Started by ETFVoyageur, Today, 07:05 PM
          0 responses
          11 views
          0 likes
          Last Post ETFVoyageur  
          Started by Orion815, 05-02-2024, 08:39 AM
          2 responses
          18 views
          0 likes
          Last Post Orion815  
          Working...
          X