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

      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:



        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.

          Comment


            #6
            Thank you, Brett.

            Comment


              #7
              Hello,

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



              Let me know if any questions.

              Comment


                #8
                Excellent! Thank you very much, Brett.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by gm7_forum, Today, 05:51 PM
                0 responses
                2 views
                0 likes
                Last Post gm7_forum  
                Started by cre8able, Today, 03:20 PM
                1 response
                9 views
                0 likes
                Last Post cre8able  
                Started by fiddich, Today, 05:25 PM
                0 responses
                3 views
                0 likes
                Last Post fiddich
                by fiddich
                 
                Started by gemify, 11-11-2022, 11:52 AM
                6 responses
                804 views
                2 likes
                Last Post ultls
                by ultls
                 
                Started by ScottWalsh, Today, 04:52 PM
                0 responses
                4 views
                0 likes
                Last Post ScottWalsh  
                Working...
                X