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

control y axis value decimals

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

    control y axis value decimals

    I trade the 6E that has a tick size of 0.0001 (4 decimals) but the y axis of a sub panel display only 2 decimals ( 0.00 ) value in the axis. There are multiple indicators in this panel. I have written these indicators. The Price Value for a specific indicator will list with 4 decimals, it's just the y axis label values that defaults to 2 . Furthermore, the main chart displays 4 decimals, only the sub panel displays 2. How do I force the y axis to have 4 decimals in the label area.

    #2
    Hello tulanch,

    You may override the FormatPriceMarker() method inside of the indicator to be able to control this inside of the Indicator. For an example of this you may view our Help guide at the following link.



    Happy to be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Does this control the axis label values or just the price value (price marker value) for the indicator(s) in the respective panel? I thought this API controlled the price value for/per indicator. Currently the price value for the indicator is showing 4 decimals. It is just the axis labels that are 2 decimals, the values that corresponds to the horizontal grid lines for the panel. But in the main chart panel 0, the axis labels as well as the price values for an indicator are showing 4 decimals.

      Comment


        #4
        Hello tulanch,

        It will change the Y-Axis price values to show 4 decimal places on the right so when you have a double with 4 decimal places you will be able to see them all.

        Let us know if we can be of further assistance.
        JCNinjaTrader Customer Service

        Comment


          #5
          I have added the override code as you indicated:

          publicoverridestring FormatPriceMarker(double price)
          {

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

          It complied cleanly so it must have been in the correct location.

          It is doing just as I expected. The value for the specific indicator has 4 digits. That is not what I am after.

          In Panel 1, I want to change the Y-Axis tic-mark values, which are still 2 digits. It is rounding the values up. For example values 1.3660-1.369 get round to 1.37

          The main panel ( Panel 0) has 4 digits tic-marks for the Y-Axis

          Here is a screen capture http://screencast.com/t/w04amYE4v6

          This would seem to be related to a grid/panel property than an indicator property

          Comment


            #6
            Hello tulanch,

            Thanks for the screenshot and the clarification.

            This is due to a limitation of the Chart and its scaling abilities on other Panels besides one that an Instrument is placed on. You may expand it out to see more decimals but it will not be displayed like your Panel0 unless it is applied to Panel0.

            It is on our feedback list for the next major release of NinjaTrader to be able to control this on other Panels.

            Let us know if we can be of any assistance.
            JCNinjaTrader Customer Service

            Comment


              #7
              I want to vote for this too!

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by jaybedreamin, Today, 05:56 PM
              0 responses
              3 views
              0 likes
              Last Post jaybedreamin  
              Started by DJ888, 04-16-2024, 06:09 PM
              6 responses
              18 views
              0 likes
              Last Post DJ888
              by DJ888
               
              Started by Jon17, Today, 04:33 PM
              0 responses
              1 view
              0 likes
              Last Post Jon17
              by Jon17
               
              Started by Javierw.ok, Today, 04:12 PM
              0 responses
              6 views
              0 likes
              Last Post Javierw.ok  
              Started by timmbbo, Today, 08:59 AM
              2 responses
              10 views
              0 likes
              Last Post bltdavid  
              Working...
              X