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 Skifree, Today, 03:41 AM
                1 response
                2 views
                0 likes
                Last Post Skifree
                by Skifree
                 
                Started by usazencort, Today, 01:16 AM
                0 responses
                1 view
                0 likes
                Last Post usazencort  
                Started by kaywai, 09-01-2023, 08:44 PM
                5 responses
                603 views
                0 likes
                Last Post NinjaTrader_Jason  
                Started by xiinteractive, 04-09-2024, 08:08 AM
                6 responses
                23 views
                0 likes
                Last Post xiinteractive  
                Started by Pattontje, Yesterday, 02:10 PM
                2 responses
                23 views
                0 likes
                Last Post Pattontje  
                Working...
                X