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

Using Indicator's Historical Values In Market Analyzer

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

    Using Indicator's Historical Values In Market Analyzer

    Dear Support,

    Is it possible to have several Market Analyzer columns to show historical values for the same indicator (i.e. 5 columns that would show Value[0], Value[1], Value[2], Value[3], Value[4] for RSI)?

    If so, how that is possible? Any example?

    Alternatively, a new feature option to add a mini-chart of an indicator to a MA column.

    Many thanks.

    #2
    Hello aligator,

    The market analyzer only shows the current value of a plot, to do that you would need to make an indicator that plots each of those values as its current value. For example

    Code:
    Value[0] = RSI(12, 6)[5];
    JesseNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jesse View Post
      Hello aligator,

      The market analyzer only shows the current value of a plot, to do that you would need to make an indicator that plots each of those values as its current value. For example

      Code:
      Value[0] = RSI(12, 6)[5];
      Thanks Jesse,

      So, instead of creating 4 additional indicators I just added 4 additional plots to RSI per your example as following:

      Plot 0 = RSI[0]
      Plot 1 = RSI[1] = Value1[0]
      Plot 2 = RSI[2] = Value2[0]
      Plot 3 = RSI[3] = Value3[0]
      Plot 4 = RSI[4] = Value4[0]

      It seems to work on daily data. However when applied to a watchlist of stocks (Dow 30) in 5 columns of the Market Analyzer only about half of the rows are filled with the 4 added plot values and the rest of the rows for some stocks remain blank. I am using TDA data and loading only 250 days of data. I have tested calculating on bar close, each tick, and price change with no difference. Any idea what might be the reason that the added 4 plot values are not caculated forsome of the stocks?

      Many thanks,​

      Comment


        #4
        Hello aligator,

        Are you seeing any errors in the log/output window? In addition to the code I recommended you would need a CurrentBar check when using BarsAgo

        Code:
        if(CurrentBar < 5) return;
        Value[0] = RSI(12, 6)[5];
        You would otherwise likely need to add a Print so that when you apply it you can see why its not plotting a value. For example you can check how much data is being loaded for each instrument to make sure that's not the issue:

        Print(Instrument.FullName + " - bar count: " + Count);
        JesseNinjaTrader Customer Service

        Comment


          #5
          Originally posted by NinjaTrader_Jesse View Post
          Hello aligator,

          Are you seeing any errors in the log/output window? In addition to the code I recommended you would need a CurrentBar check when using BarsAgo

          Code:
          if(CurrentBar < 5) return;
          Value[0] = RSI(12, 6)[5];
          You would otherwise likely need to add a Print so that when you apply it you can see why its not plotting a value. For example you can check how much data is being loaded for each instrument to make sure that's not the issue:

          Print(Instrument.FullName + " - bar count: " + Count);
          Thanks Jesse,

          Issue resolved. I removed a BackBrushes.Freeze() statement for colums which was not needed and prevented printing values. Need to be careful in using Freeze() statements.

          Thanks so much,

          Cheers!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by pibrew, Today, 06:37 AM
          0 responses
          0 views
          0 likes
          Last Post pibrew
          by pibrew
           
          Started by rbeckmann05, Yesterday, 06:48 PM
          1 response
          12 views
          0 likes
          Last Post bltdavid  
          Started by llanqui, Today, 03:53 AM
          0 responses
          6 views
          0 likes
          Last Post llanqui
          by llanqui
           
          Started by burtoninlondon, Today, 12:38 AM
          0 responses
          11 views
          0 likes
          Last Post burtoninlondon  
          Started by AaronKoRn, Yesterday, 09:49 PM
          0 responses
          15 views
          0 likes
          Last Post AaronKoRn  
          Working...
          X