Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How can I set an indicators scale resolution (number of digits)

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

    How can I set an indicators scale resolution (number of digits)

    Hi, see picture below.


    Click image for larger version

Name:	2020-10-09_18-25-43.png
Views:	358
Size:	155.1 KB
ID:	1121980

    #2
    Hello wjadevries, thanks for your post.

    We have the FormatPriceMarket override where you can format the price marker of the indicator:



    Unfortunately, there is no supported way to format the price scale, It would need to be overlayed onto the primary panel to get the same price formatting.

    Best regards.

    Comment


      #3
      It seems like this function isn't called in my indicator.
      I've put a Print(price) in it, but it doesn't'show up in the output.

      Comment


        #4
        Hello wjadevries, thanks for your reply.

        Did you add the method override at the class level? This method should go outside of OnBarUpdate at the class level:

        protected override void OnBarUpdate()
        {
        //...
        }

        public override string FormatPriceMarker(double price)
        {
        // Formats price marker values to 4 decimal places
        return price.ToString("N4");
        }

        Comment


          #5
          yep, it's where you say.
          But it doesn't get called..

          PS: my indicator is in a separate panel, not in the price chart.

          Comment


            #6
            Ah, now I understand why it's not called.
            I've set DisplayPriceMarkers = false, because I don't want the price marker to show up.
            But I DO want the prices in the scale to be formatted differently.

            Maybe I wasn't clear enough.
            Is it possible to change the formatting of the prices in the (left or right) scale area?

            Comment


              #7
              Hello wjadevries, thanks for your reply.

              Unfortunately not, I found no supported way of formatting the price scale, just the price marker.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by charlesugo_1, 05-26-2026, 05:03 PM
              0 responses
              68 views
              0 likes
              Last Post charlesugo_1  
              Started by DannyP96, 05-18-2026, 02:38 PM
              1 response
              151 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 05-11-2026, 05:56 AM
              0 responses
              162 views
              0 likes
              Last Post CarlTrading  
              Started by CarlTrading, 05-10-2026, 08:12 PM
              0 responses
              100 views
              0 likes
              Last Post CarlTrading  
              Started by Hwop38, 05-04-2026, 07:02 PM
              0 responses
              288 views
              0 likes
              Last Post Hwop38
              by Hwop38
               
              Working...
              X