• 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

DataSeries and significant digits

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

    DataSeries and significant digits

    Greetings

    I have an indicator that only outputs a component of an instrument's price. That is, conditionally, the output is either high or low of the instrument. If we consider EUR (6E) as an example, the output of this indicator will be something like 1.3132, 1.3246, etc.

    The problem that I have encountered is that the Dataseries seems to be round the decimal portion to two significant digits. The values from the above example are plotted as 1.31 and 1.32 respectively which renders the indicator completely useless.

    Is there away to correct this?

    Thank you very much in advance.
    Last edited by svrz; 02-03-2012, 12:33 PM.

    #2
    Originally posted by svrz View Post
    Greetings

    I have an indicator that only outputs a component of an instrument's price. That is, conditionally, the output is either high or low of the instrument. If we consider EUR (6E) as an example, the output of this indicator will be something like 1.3132, 1.3246, etc.

    The problem that I have encountered is that the Dataseries seems to be round the decimal portion to two significant digits. The values from the above example are plotted as 1.31 and 1.32 respectively which renders the indicator completely useless.

    Is there away to correct this?

    Thank you very much in advance.
    Round2TickSize. ref: http://www.ninjatrader.com/support/h...trument_ro.htm

    Comment


      #3
      Hello,

      Thanks for the forum post.

      You should have the number of decimals available of the master instrument you are running on.

      If you run on 6E as the master you should have X.XXX granularity are you not seeing that?

      -Brett
      BrettNinjaTrader Product Management

      Comment


        #4
        @koganam: Thank you for the suggestion but unfortunately once DataSeries receives the value, it will round it so Round2TickSize will not work.

        @Brett: Thank you for the prompt reply. Here is what I'm seeing:

        http://tinypic.com/r/pk0m/5

        The last value should have been 1.3155 but it was rounded to 1.32.

        Comment


          #5
          Hello,

          I see thanks for the clarification.

          The only way to get around this unfortunately would mean adding

          Overlay = true;

          In the Initalize() method.

          Then remove and re add the indicator it will appear on the price bars, now move the indicator down to panel 2 you can do this by selecting it and dragging it to the bottom of the chart.

          As far as why it does this straight out of the box I believe what is going on here is the chart rendering engine is trying to figure out what numbers are relevant for display. I will see if development has any feedback on this.

          -Brett
          Last edited by NinjaTrader_Brett; 02-03-2012, 02:01 PM.
          BrettNinjaTrader Product Management

          Comment


            #6
            Thank you, Brett.

            Comment


              #7
              Hello,

              Looks like you can use this supported NinjaScript to get the output you need.

              http://www.ninjatrader.com/support/h...ricemarker.htm

              Let me know if any questions.
              BrettNinjaTrader Product Management

              Comment


                #8
                Excellent! Thank you very much, Brett.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Mykro, 05-30-2020, 09:48 AM
                2 responses
                11 views
                0 likes
                Last Post NinjaTrader_Jim  
                Started by weav74, Today, 07:36 AM
                1 response
                3 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by tgordon78, Today, 07:09 AM
                1 response
                7 views
                0 likes
                Last Post NinjaTrader_PatrickG  
                Started by xasser, 05-29-2020, 02:17 PM
                6 responses
                57 views
                0 likes
                Last Post NinjaTrader_Jim  
                Started by billythekid72, Today, 07:10 AM
                2 responses
                7 views
                0 likes
                Last Post billythekid72  
                Working...
                X