• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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].
    JoshNinjaTrader 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 jertrade, Today, 02:50 PM
                        0 responses
                        2 views
                        0 likes
                        Last Post jertrade  
                        Started by Emma1, Today, 02:42 PM
                        0 responses
                        4 views
                        0 likes
                        Last Post Emma1
                        by Emma1
                         
                        Started by RedDuke, Today, 01:59 PM
                        1 response
                        14 views
                        0 likes
                        Last Post NinjaTrader_Kate  
                        Started by MarianApalaghiei, Today, 01:18 PM
                        1 response
                        13 views
                        0 likes
                        Last Post NinjaTrader_PatrickG  
                        Started by williamzz, Today, 01:00 PM
                        1 response
                        6 views
                        0 likes
                        Last Post NinjaTrader_Jim  
                        Working...
                        X