Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MA rounding numbers

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

    MA rounding numbers

    I've noticed that if an indicator outputs a large integer number it gets rounded up in MA (say, 12345678 would be displayed as "12M"). While it's nice for most users, in my case all decimal places are meaningful and I'd like to see a complete number like it was in NT 6.5. Can I adjust this setting somewhere? Thanks!

    #2
    Hello,

    I will check into this with development.

    Thanks for your patience.

    Comment


      #3
      Hello,

      Please add this to your code above or below OnBarUpdate()

      public override string FormatPriceMarker(double price)
      {
      return price.ToString();
      }

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

      Let me know if I can be of further assistance.

      Comment


        #4
        Hello Brett,
        Thanks for the link provided by you, which facilitates selection of number of decimals. I was looking out for this facility for Market Analyser window and got it now.

        Now I am able to set Bliinger Band Position (0 to 100% Range) to zero decimals.

        I have a two questions on this.

        1) I have an indicator using the 'public enum Selector'. I prefer to select a different value for the number of decimals for each enum selectior option. If I put the same code in each of the option with a different value for each enum selector option, I am getting error.

        // Original code
        // Please add this to your code above or below OnBarUpdate()

        // FormatPriceMarker method of a custom indicator
        public override string FormatPriceMarker(double price)
        {

        // Formats price values to 4 decimal places
        return price.ToString("N4");
        }

        Can I write something like:

        // Formats price values to 'int variable' decimal places
        int decimals;
        decimals = 0; // choose the number of decimals for that enum selector option.
        return price.ToString("N"+str(decimals);

        2) This method can be used for third party Indicators only. Editing of Indicators supplied with NT7 is not possible and making another with each of the supplied / used indicators cannot be done by ordinary users and very difficult for others with coding skills.

        Is it not possible to supply each system indicator, where the number of decimals can be chosen by user with the properties?

        Thanks for your time & prompt responses as always.

        murthymsr

        Comment


          #5
          Hello,

          Yes this should be possible.

          Also, I will send this recomendation to development.

          Let me know if I can be of further assistance.

          Comment


            #6
            Thanks Brett, this does show all the digits. As a remark, it's not backwards compatible and breaks the code in NT6.5, but that's small potatoes.

            Comment


              #7
              Hello,

              Yes this is correct as this is new to NinjaTrader 7 from 6.5 and would be a code breaking change. Glad you got your Ninja7 up and running however.

              Let me know if I can be of further assistance.

              Comment


                #8
                Originally posted by NinjaTrader_Brett View Post
                Hello,

                Yes this should be possible.

                Also, I will send this recomendation to development.

                Let me know if I can be of further assistance.
                hello Brett,

                Thanks, it was possible. i have defined a int variable which decides the number of decimals. In each enum selection option, I could have a different number of decimals in MA display.

                murthymsr

                Comment


                  #9
                  Excellent! Thanks for posting back for others to benefit!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by PaulMohn, Today, 05:00 AM
                  0 responses
                  8 views
                  0 likes
                  Last Post PaulMohn  
                  Started by ZenCortexAuCost, Today, 04:24 AM
                  0 responses
                  6 views
                  0 likes
                  Last Post ZenCortexAuCost  
                  Started by ZenCortexAuCost, Today, 04:22 AM
                  0 responses
                  3 views
                  0 likes
                  Last Post ZenCortexAuCost  
                  Started by SantoshXX, Today, 03:09 AM
                  0 responses
                  16 views
                  0 likes
                  Last Post SantoshXX  
                  Started by DanielTynera, Today, 01:14 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post DanielTynera  
                  Working...
                  X