Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

No Plot

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

    No Plot

    Thanks for all your help. I had plot type set to "bar".
    Last edited by EthanHunt; 11-15-2015, 05:29 PM.

    #2
    What is the error in your output window or in the control center LOG?

    Comment


      #3
      Originally posted by sledge View Post
      What is the error in your output window or in the control center LOG?
      There just isn't any plot line. The Control Center Log has:

      Failed to restore Indicator 'Unknown'. Most likely (a) the implementation changed or (b) one or more properties have been renamed or removed or (c) the custom assembly which implements this Indicator no longer is there.

      Comment


        #4
        Originally posted by EthanHunt View Post
        There just isn't any plot line. The Control Center Log has:

        Failed to restore Indicator 'Unknown'. Most likely (a) the implementation changed or (b) one or more properties have been renamed or removed or (c) the custom assembly which implements this Indicator no longer is there.
        Which would be a good reason to not have a plot. Runtime errors cause issues.

        Comment


          #5
          Originally posted by EthanHunt View Post
          There just isn't any plot line. The Control Center Log has:

          Failed to restore Indicator 'Unknown'. Most likely (a) the implementation changed or (b) one or more properties have been renamed or removed or (c) the custom assembly which implements this Indicator no longer is there.
          I found this in my output window:

          Indicator 'EMA_EMA': Error on calling 'OnBarUpdate' method on bar 0: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.

          Comment


            #6
            Originally posted by EthanHunt View Post
            The following code doesn't plot. If I comment out everything in OnBarUpdate() and just put the following line in that section I do get a lime green line. Trying to color code a line when rising, falling, neutral. Thanks.


            Code:
            		protected override void OnBarUpdate()
            		{
            			if (EMA(EMA(Period), Period)[0] > EMA(EMA(Period), Period)[1])
            			{
            Add this check:

            Code:
            protected override void OnBarUpdate()
            {
            	
            [COLOR="Blue"]if (CurrentBars[0] <= BarsRequiredToPlot)
            return;[/COLOR]
            	
            if (EMA(EMA(Period), Period)[0] > EMA(EMA(Period), Period)[1])
            {

            Comment


              #7
              Originally posted by sledge View Post
              I found this in my output window:

              Indicator 'EMA_EMA': Error on calling 'OnBarUpdate' method on bar 0: You are accessing an index with a value that is invalid since it is out-of-range. I.E. accessing a series [barsAgo] with a value of 5 when there are only 4 bars on the chart.
              Similar question, similar answer. You are probably looking for "2" to be your escape value.

              ref: http://ninjatrader.com/support/forum...14&postcount=4

              Comment


                #8
                Originally posted by sledge View Post
                Add this check:

                Code:
                protected override void OnBarUpdate()
                {
                	
                [COLOR="Blue"]if (CurrentBars[0] <= BarsRequiredToPlot)
                return;[/COLOR]
                	
                if (EMA(EMA(Period), Period)[0] > EMA(EMA(Period), Period)[1])
                {
                I added this code but still no plot.

                if (CurrentBars[0] <= BarsRequiredToPlot)
                return;

                Comment


                  #9
                  Originally posted by koganam View Post
                  Similar question, similar answer. You are probably looking for "2" to be your escape value.

                  ref: http://ninjatrader.com/support/forum...14&postcount=4
                  I added this code but still no plot...

                  if (CurrentBars[1] < Period || CurrentBars[0] < Period) return;

                  Comment


                    #10
                    Originally posted by EthanHunt View Post
                    I added this code but still no plot.

                    if (CurrentBars[0] <= BarsRequiredToPlot)
                    return;
                    Works great here?
                    Attached Files

                    Comment


                      #11
                      Originally posted by sledge View Post
                      Works great here?
                      Thanks. What did you change in the code? I need it to be a line (it is a smoothing) on top of the price/index (overlay on price), not a separate indicator. It is an EMA so it should smooth over price.

                      Comment


                        #12
                        Originally posted by EthanHunt View Post
                        Thanks. What did you change in the code? I need it to be a line (it is a smoothing) on top of the price/index (overlay on price), not a separate indicator. It is an EMA so it should smooth over price.
                        I just added that line I told you about.

                        I even posted the code.

                        I had to put it in another panel as it over took my chart (I could no longer see my candles with all those lines).

                        Comment


                          #13
                          Some changes to indicators--such as reordering the plots in State.SetDefaults--require that any indicators on charts (even if only in templates and not live) must be removed and reinstalled.

                          Comment


                            #14
                            Originally posted by EthanHunt View Post
                            I added this code but still no plot...

                            if (CurrentBars[1] < Period || CurrentBars[0] < Period) return;
                            You have 3 plots: you need to check CurrentBars[2] also.

                            Comment


                              #15
                              Originally posted by EthanHunt
                              ...
                              I have this in OnStateChange(), shouldn't that tell it to plot in the first panel? IsOverlay = true;
                              It should. Remove the indicator and reload it on the chart.
                              Last edited by koganam; 11-15-2015, 06:37 PM. Reason: Clarified grammar.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by kevinenergy, 02-17-2023, 12:42 PM
                              118 responses
                              2,778 views
                              1 like
                              Last Post kevinenergy  
                              Started by briansaul, Today, 05:31 AM
                              0 responses
                              9 views
                              0 likes
                              Last Post briansaul  
                              Started by traderqz, Yesterday, 12:06 AM
                              11 responses
                              28 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by PaulMohn, Today, 03:49 AM
                              0 responses
                              8 views
                              0 likes
                              Last Post PaulMohn  
                              Started by inanazsocial, Today, 01:15 AM
                              1 response
                              10 views
                              0 likes
                              Last Post NinjaTrader_Jason  
                              Working...
                              X