Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

column shows wrong value

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

    column shows wrong value

    I have an indicator with only one plot. It is not a plot but used to pass values to the market analyzer so I can display things in a certain color using color conditions. It is always set to a literal value. It is set to Exceed.Set(0) in the first statement of OnBarUpdate();

    Why does the market analyzer show this column as the last price when I never set it to a price value but a literal hard coded value of 1 to 12?

    I have Analyzer lookback set to 501, (the indicator is set to 500).

    Cliff
    Last edited by ct; 12-22-2009, 07:24 AM.

    #2
    Cliff,

    When you don't set a value it takes on a default value as a place holder and that value is Close[0].
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh
      Thanks for the reply and info. Shouldn't this code take care of it? Exceed being the plot. I am using Jurik's as well just in case there is an issue there.

      protected override void OnBarUpdate()
      {
      Exceed.Set(0);
      .
      .
      .
      .

      Cliff

      Comment


        #4
        Thinking about it. Does it need to be set to a value pointer and not a literal?

        Comment


          #5
          Nope tried it. Didn't help.

          private int Zero = 0;
          Exceed.Set(Zero);

          Cliff

          Comment


            #6
            ct, if a plot isn't set every single bar, NinjaTrader will substitute in the close price instead of just leaving the value at 0. Would you mind posting the code for us to look at to see if anything else looks amiss?
            AustinNinjaTrader Customer Service

            Comment


              #7
              Austin

              can I email it?

              Cliff

              Comment


                #8
                Cliff, you sure can email it. [email protected] attention 'austin - thread 23989'. Thank you.
                AustinNinjaTrader Customer Service

                Comment


                  #9
                  Austin

                  Is a value of zero considered "not set"? I do set it to a value but zero.

                  Cliff

                  Comment


                    #10
                    Cliff, I just whipped up a script to test whether or not 0 is "set", and my findings are that the plots can indeed be set to 0.

                    Are you sure that your script assigns a value to the plot for every single bar? If not, NT will just fill in the close price.
                    AustinNinjaTrader Customer Service

                    Comment


                      #11
                      It is the first statement of th OnBarUpdate() section,. It is not conditioned so I would think it gets executed.

                      Cliff

                      Comment


                        #12
                        Cliff, that sure is how it looks. I'd love to test this out and see for myself but I don't have the Jurik indicator set. Is there any way you could strip it down some without the Jurik stuff while retaining the same behavior?
                        AustinNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by funk10101, Today, 12:02 AM
                        1 response
                        10 views
                        0 likes
                        Last Post NinjaTrader_LuisH  
                        Started by GLFX005, Today, 03:23 AM
                        1 response
                        6 views
                        0 likes
                        Last Post NinjaTrader_Erick  
                        Started by nandhumca, Yesterday, 03:41 PM
                        1 response
                        12 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Started by The_Sec, Yesterday, 03:37 PM
                        1 response
                        11 views
                        0 likes
                        Last Post NinjaTrader_Gaby  
                        Started by vecnopus, Today, 06:15 AM
                        0 responses
                        1 view
                        0 likes
                        Last Post vecnopus  
                        Working...
                        X