Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator reverts to defaults when reopening NT. Also, no AutoScale.

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

    Indicator reverts to defaults when reopening NT. Also, no AutoScale.

    This indicator was made from a sample file from "SampleOnRenderCandlesticks" from https://ninjatraderecosystem.com/use...cators-sample/
    It pulls O,H,L,C from a .dll that measures liquidity being added and subtracted to the market and creates candlesticks. (line 80)

    1. Indicator reverts back to boolean default (Cumulate = true) when reopening NinjaTrader. (line 61)
    Why won't it stay "false" after saving workspace and reopening NT the next day?

    2. IsAutoScale is set to "true". (line 58) (I not familiar/proficient with OnRender(Chart Control))
    Why does this indicator not Auto Scale (see attached .png)​ ? I even tried plotting the highs and lows with separate line Plots - they don't show up or help.
    I am currently using a totally separate indicator in the same chart panel and scale justification to enable seeing bar highs and lows.

    The only changes I made to the OnBarUpdate section are lines 101-106.

    Thanks!
    Robotman

    Attached Files

    #2
    Hello Robotman,

    Thanks for your post.

    Unfortunately, since the script requires a third-party dll I cannot test the script on my end since I do not have access to that third-party dll.

    Are you seeing any errors appear in the Log tab of the Control Center when attempting to save the template or workspace?

    For this bool property to be saved to a template or workspace the XmlIgnore attribute may need to be removed from the input property.

    XmlIgnore: https://ninjatrader.com/support/help...eattribute.htm

    When adding the indicator to a chart window do you see the 'Auto scale' property is checked (enabled)?

    Is your Data Series 'Auto scale' property checked (enabled) in the Data Series window?

    When testing the IndicatorCandlestick indicator from the User App Share page you linked to I am seeign that the "Auto scale" property is enabled and the indicator seems to be auto scaling as expected.

    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      Hi NinjaTrader_BrandonH

      No errors in log.

      I feel silly for not remembering the XmlIgnore trick. I cut and paste a lot and just now deleted those lines that are needed to be remembered by the Xml.

      The data series is ES 03-24 but the indicator is what is drawing the candles. Both the ES data series and the indicator have "Auto Scale" checked.

      Thank you for your help!
      Robotman

      Comment


        #4
        Hello Robotman,

        Thanks for your notes.

        To clarify, if you test the User App Share script that you shared a link to do you see the indicator auto-scale working as expected?

        If you add the third-party indicator you are using in your script to a New > Chart window, do you see the indicator is auto scaling? Is the Auto Scale property for this indicator enabled by default?

        If the User App Share script that you shared a link to is working as expected then it is likely some custom logic in your script causing the reported behavior to occur.

        You would need to reduce the code of your script and add debugging prints to find the exact line of code causing the reported behavior.

        First, its great to create a copy of the script so that the original work is kept safe.

        Below is a link to a publicly available video that demonstrates making a copy of script.
        https://www.youtube.com/watch?v=BA0W...utu.be&t=8m15s

        Once the copy is created, the copy can be modified in any way without losing the original work.

        The next step is to start commenting out code and adding debugging prints to locate the exact line of code causing the behavior to occur.​
        <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        651 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        370 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        577 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X