• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Right Scale Chart Properties

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

    Right Scale Chart Properties

    Hi,

    I have two questions:

    1. Is there a way to access the Right Scale settings for a chart?
    2. If Horizontal Grid Lines are set to automatic, how does NT decide where to draw the horizontal line. I would like to find out how far apart the lines on the chart are.

    Thanks for your help.

    #2
    1. Right-click directly on the vertical/price scale to access the scale/panel settings.
    2. You can define how far apart the horizontal grid lines are if you change the 'horizontal grid lines' property to 'fixed'. Then, adjust the 'horizontal grid lines type' and 'horizontal grid lines value' as you desire.
    Patrick G.NinjaTrader Customer Service

    Comment


      #3
      Thanks, PatrickG.
      I should have said that I want to access these programatically. My apologies. I know that I can get these via ChartScale.Properties but I am having a bit of an issue creating an instance of ChartScale outside of OnRender() so I can get access.

      Comment


        #4
        Hello Zeos6,

        Thank you for the post.

        The suggested way to access the ChartScale object is generally by setting a class level variable to the ChartScale instance that is passed in to OnRender. Can you tell me, are you currently using an Indicator or another type as this is posted in the Addon development forum?

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          Hi Jesse,


          I am trying to access the various members of ChartScale.Properties programatically from inside indicator so that I can use them for calculations done in the indicator. I am not using OnRender(). Ideally I'd like to get the values of these during OnStateChange() if possible.

          Comment


            #6
            Hello Zeos6,

            Thank you for the reply.

            Because you are using an Indicator, you could either pass a variable from OnRender depending on the use case or you can take a look at the following example:

            https://ninjatrader.com/support/help...sub=chartscale

            The ChartPanel object has a Scales collection which you can iterate over. Depending on what you are trying to affect, you may or may not see an update in the chart when setting the values of UI objects programmatically. You will need to test your idea to see if this object gives that ability.


            I look forward to being of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Thanks Jesse.

              This is actually quite helpful. I thought about the OnRender approach but the Scales approach might actually work better for me. I will give it a try. Thanks for pointing it out.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by aligator, Today, 12:29 PM
              0 responses
              6 views
              0 likes
              Last Post aligator  
              Started by bob77713, Today, 11:30 AM
              0 responses
              0 views
              0 likes
              Last Post bob77713  
              Started by FMtrader, 03-15-2019, 02:30 AM
              6 responses
              38 views
              0 likes
              Last Post James108  
              Started by timko, Today, 08:18 AM
              0 responses
              2 views
              0 likes
              Last Post timko
              by timko
               
              Started by victorsmith, Today, 06:00 AM
              0 responses
              6 views
              0 likes
              Last Post victorsmith  
              Working...
              X