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

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 DJ888, 04-16-2024, 06:09 PM
        4 responses
        11 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by terofs, Today, 04:18 PM
        0 responses
        5 views
        0 likes
        Last Post terofs
        by terofs
         
        Started by nandhumca, Today, 03:41 PM
        0 responses
        5 views
        0 likes
        Last Post nandhumca  
        Started by The_Sec, Today, 03:37 PM
        0 responses
        3 views
        0 likes
        Last Post The_Sec
        by The_Sec
         
        Started by GwFutures1988, Today, 02:48 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Working...
        X