Announcement

Collapse
No announcement yet.

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 cmoran13, 04-16-2026, 01:02 PM
          0 responses
          43 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          26 views
          0 likes
          Last Post PaulMohn  
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          163 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          98 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          158 views
          2 likes
          Last Post CaptainJack  
          Working...
          X