Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

how to increase the decimal ?

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

    how to increase the decimal ?

    hello.

    how I can increase the decimal if I got 2.65 and I want it to be 2.6534 shown in the chart?

    thanks avi.

    #2
    Avi,

    Thank you for contacting us regarding your inquiry.

    Without more information on what you are actually trying to format, I can provide some general suggestions on formatting the strategy or indicator you are working with.

    (This example deals with showing the SMA with a decimal value of 4 places.)


    protectedoverridevoid OnBarUpdate()
    {
    Value.Set(SMA(20)[0]);
    }

    publicoverridestring FormatPriceMarker(double price)

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

    I have enclosed a link for your review that discusses this.


    Please let us know if we can assist you further.
    Matt L.NinjaTrader Customer Service

    Comment


      #3
      please see this image

      I hope this is more clear.
      Attached Files

      Comment


        #4
        40096,


        Thank you for contacting us.


        The only type of instrument which can be formatted on the Y-Axis is Forex. This can be done in the control center by clicking Tools=>Options=>Data=> and selecting "tenthPip."

        Other instruments can not be adjusted. If you would like me to submit this feature as a request, I can forward it on to the development team.


        Please let us know if we can be of further assistance.
        Matt L.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by 400396 View Post
          I hope this is more clear.
          Code:
          public override string FormatPriceMarker(double price)
          {
              // Formats price values to 4 decimal places
              return price.ToString("N4");
          }
          ref: http://ninjatrader.com/support/helpG...ricemarker.htm

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Waxavi, Today, 02:00 AM
          0 responses
          2 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Started by elirion, Today, 01:36 AM
          0 responses
          4 views
          0 likes
          Last Post elirion
          by elirion
           
          Started by gentlebenthebear, Today, 01:30 AM
          0 responses
          4 views
          0 likes
          Last Post gentlebenthebear  
          Started by samish18, Yesterday, 08:31 AM
          2 responses
          9 views
          0 likes
          Last Post elirion
          by elirion
           
          Started by Mestor, 03-10-2023, 01:50 AM
          16 responses
          391 views
          0 likes
          Last Post z.franck  
          Working...
          X