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

ChartControl.BarMarginRight

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

    ChartControl.BarMarginRight

    Hi
    Right side margin is set in my Indicator,How can I make the change in the margin and also how can I remove this margin ?

    The indicator codes are as below

    HTML Code:
    if(ChartControl.BarMarginRight < (ChartControl.BarWidth + (int)spacesize.Width))
    ChartControl.BarMarginRight = ChartControl.BarWidth + (int)spacesize.Width;

    #2
    Hello,

    Thank you for the question.

    I am not sure I fully understand what you are trying to do, are you asking how to remove the margin so the indicator no longer sets this or are you asking how to set the margin from an indicator?

    If you are setting it and then asking how to change it after setting it from the indicator, the indicator would take priority so it would override what settings you have in the chart. There is no way around this and is also unsupported.

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

    Comment


      #3
      Thganks Jesse for the reply
      check the pic below I am talking about this margin ,how can I remove or reduce it

      Comment


        #4
        If you don't want it, just simply remove these lines from your code

        If you want some fixed margin, say 50px, please set it:
        Code:
        ChartControl.BarMarginRight = 50;
        You can also control the margin in the Chart Properties window (Ctrl + T), under the Window tab: Right side margin.

        Thanks.
        Pi
        Last edited by ninZa; 12-18-2014, 03:08 AM.
        ninZa
        NinjaTrader Ecosystem Vendor - ninZa.co

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by gentlebenthebear, Today, 01:30 AM
        2 responses
        13 views
        0 likes
        Last Post gentlebenthebear  
        Started by Kaledus, Today, 01:29 PM
        2 responses
        7 views
        0 likes
        Last Post Kaledus
        by Kaledus
         
        Started by frankthearm, Yesterday, 09:08 AM
        13 responses
        45 views
        0 likes
        Last Post frankthearm  
        Started by PaulMohn, Today, 12:36 PM
        2 responses
        16 views
        0 likes
        Last Post PaulMohn  
        Started by Conceptzx, 10-11-2022, 06:38 AM
        2 responses
        56 views
        0 likes
        Last Post PhillT
        by PhillT
         
        Working...
        X