Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

indicator not showing up in certain timeframes

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

    indicator not showing up in certain timeframes

    https://gyazo.com/25607dc83e1296f085e5461842b62e2d

    The indicator reads trend from the 15M chart. However, it only shows up on certain timeframes (all 15M or lower for testing). Also, if I change the days to load on the chart it may appear randomly - so if I switch to 90 days then to 30 then 90 it shows up...

    #2
    Hello,

    Thank you for the post.

    I wanted to check, are you getting errors when it does not show up in either the log or Tools -> OutputWindow?

    I would be unsure based on just this information what may be happening but if you are getting errors or have debugged the script already and have a general idea of the syntax in question I could look further into this.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Actually yes it appears so
      https://gyazo.com/c19a9520f11ac204e4d7da8bc72bc472

      Comment


        #4
        Hello,

        Thank you for the image.

        It appears the script is checking an index that does not exist, this is very common for checking Bars ago which are not valid, for example on bar 7 you are checking a value of 10 bars ago which does not exist yet.

        If this is a script you are creating, you would need to look in the code to see what indexes are being used or BarsAgo values to determine what may be happening. Otherwise if this is something you have imported, I would suggest contacting the developer for debugging.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          The only index is the bars array
          if (x(2, 10, 30)[0] > y(55)[0]
          && Rising(TMA(BarsArray[1],20))
          && z(20, 3).Avg[0] >= 55)

          Comment


            #6
            Originally posted by brucelevy View Post
            The only index is the bars array
            Do you have a check for the validity of CurrentBars[1], which corresponds to BarsArray[1]?

            Comment


              #7
              I just added this line and it seemed to clear it up now

              HTML Code:
              if (CurrentBars[0] <= BarsRequired || CurrentBars[1] <= BarsRequired)
                      return;

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Futurestrader00, Yesterday, 06:14 PM
              1 response
              17 views
              0 likes
              Last Post cincai
              by cincai
               
              Started by ballston, Today, 06:32 AM
              0 responses
              4 views
              0 likes
              Last Post ballston  
              Started by Danila, Today, 04:38 AM
              2 responses
              7 views
              0 likes
              Last Post Danila
              by Danila
               
              Started by sinpeople, Today, 04:38 AM
              0 responses
              9 views
              0 likes
              Last Post sinpeople  
              Started by kiffgj, Today, 04:23 AM
              0 responses
              8 views
              0 likes
              Last Post kiffgj
              by kiffgj
               
              Working...
              X