Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Scaling Problem With Instrument Spread Indicator

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

    Scaling Problem With Instrument Spread Indicator

    I have created a indicator which overlays instruments (spread, ratio, inverted) on a chart. It works well, except occasionally the scale on one of the overlays seems to get messed up.

    You can see this in the bottom panel of the two attached screenshots (GC/ES Ratio is set for Right scale justification, GC is set for Left scale justification, and 1/ES is set for Overlay scale justification). In the first screenshot 1/ES displays correctly. In the second screenshot 1/ES is messed up.

    I believe this only happens when the indicator is set with Overlay scale justification. Also, it often corrects itself after another bar or two forms. You can also scroll right and then left and this sometimes corrects the problem.

    I've also attached the indicator. Hopefully you can reproduce on your end and/or let me know if you see a problem with the indicator.

    Thanks for you help!
    Attached Files
    The Trading Mantis
    NinjaTrader Ecosystem Vendor - The Trading Mantis

    #2
    Hello,

    Thank you for the post. I am processing your inquiry and will have a reply for you shortly.

    I look forward to assisting further.

    Comment


      #3
      Hello,

      Thank you for your patience.

      Can you please also post your GlobalEnums file so that I can compile this script?

      I look forward to your reply.

      Comment


        #4
        Sorry... I should have thought of that.
        Attached Files
        The Trading Mantis
        NinjaTrader Ecosystem Vendor - The Trading Mantis

        Comment


          #5
          Hello,

          Thank you for your patience.

          I am going to need more information about the chart this indicator is running on. Could you please post the chart template you are using? If you have not made one for this chart right click within the chart and select Templates>Save As>give it a descriptive name like 'Support'. The template can be found in C:\Users\<user name>\Documents\NinjaTrader 8\templates\Chart.

          I look forward to your reply.

          Comment


            #6
            Hi Chris, Here's the chart template.
            Attached Files
            The Trading Mantis
            NinjaTrader Ecosystem Vendor - The Trading Mantis

            Comment


              #7
              Hello,

              Thank you for your patience.

              I was able to reproduce the bug on my installation albeit random.

              One thing that I noticed it the use of BarsPeriod.BarsPeriodType in State.Configure. This is not recommended because the script could attempt to access bars that do not exist.

              You should change this to use a pre-specified bar type for the series using this method call:

              For example:

              Code:
              AddDataSeries(''ES 09-17", BarsPeriodType.Minute, 1)
              More on AddDataSeries() here:


              Try to reproduce the flat line. If you still see it please send me your log and trace files to to*platformsupport[at]ninjatrader[dot]com.*
              You can do this by going to the Control Center-> Help-> Mail to Platform Support.
              Please add ATTN CHRISL and reference this forum post in the email body:*

              These files can be found under
              C:\Users\<user name>\Documents\NinjaTrader 8\trace
              C:\Users\<user name>\Documents\NinjaTrader 8\log.

              Please let me know if I may be of any further assistance.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              649 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
              573 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              576 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X