• 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

Increasing the margin values on an indicator panel (NT7)

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

    Increasing the margin values on an indicator panel (NT7)

    Hello:

    I submitted this question to NTTS and although I did get a response and was directed to a Forum page it was a bit over my head. The code would not be difficult but when using the necessary components it would fall into the undocumented/unsupported category. Even if it doesn't work after trying something I can't even get to the point of coding it.

    What I would like to accomplish is to pro grammatically increase the lower margin in an indicator panel to allow more space for a message which is getting overlaid by the indicator's output. This can very easily be done manually by changing the chart's properties. Because the messages are optional I would like to be able to increase the lower margin when the option is true.

    There is a property for setting the margins via UI and is someplace in Chartcontrol which if set by NS code to a value it MAY work. That is about as far as I can get.

    The documentation seems to indicate that something like the code below might work, however, I don't know how exactly how to use it. Putting it into the indicator as is returns a compile error complaining about a possible missing directive.

    Code:
    protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
    {         
    	if ( test-if-a-message-is-to-be-displayed )
    		chartScale.Properties.AutoScaleMarginLower = 9.0;
    }
    If anyone can shed some light on this it would be appreciated.
    Last edited by Cheech; 07-28-2018, 08:50 PM.

    #2
    Hello Cheech,

    Thank you for your note.

    This is not documented or supported and I'm unaware of any samples which demonstrate how or if this can be done programmatically. I will submit a feature request for this.

    Hopefully someone from the forum can be of assistance.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_AlanP View Post
      Hello Cheech,

      Thank you for your note.

      This is not documented or supported and I'm unaware of any samples which demonstrate how or if this can be done programmatically. I will submit a feature request for this.

      Hopefully someone from the forum can be of assistance.

      Please let us know if you need further assistance.
      Hi Alan:

      Thank you for your response.

      I knew it was undocumented and unsupported and the document even states that it may not work. I was just looking for someone that may have tried it and it did get it to work. If it did work at all this may be the way to do it, but I don't know how to put it into the indicator to at least get it to compile so I could test it.

      Thanks for you offer to submit a request but given the state of NT7 I don't expect that it will go anywhere (understandably so) so don't bother submitting it. If someone has managed to get it to work and replies then I will give it a shot, and if not it will need to be done manually.

      Comment


        #4
        Originally posted by Cheech View Post
        The documentation seems to indicate ...
        Sorry, what documentation?

        Originally posted by Cheech View Post
        Code:
        protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
        {         
            if ( test-if-a-message-is-to-be-displayed )
                chartScale.Properties.AutoScaleMarginLower = 9.0;
        }
        If anyone can shed some light on this it would be appreciated.
        Is this an NT7 or NT8 question?

        OnRender is not NT7.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Longhornmark, Today, 08:25 AM
        3 responses
        10 views
        0 likes
        Last Post bltdavid  
        Started by mohdhm, Today, 04:09 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Started by BGWTEX, Today, 03:30 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by marekflys, Today, 03:07 PM
        0 responses
        10 views
        0 likes
        Last Post marekflys  
        Started by GregoryBaskin, Today, 02:51 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Tyler  
        Working...
        X