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

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.
    Chris L.NinjaTrader Customer Service

    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.
      Chris L.NinjaTrader Customer Service

      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.
          Chris L.NinjaTrader Customer Service

          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.
              Chris L.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Rapine Heihei, 04-23-2024, 07:51 PM
              2 responses
              30 views
              0 likes
              Last Post Max238
              by Max238
               
              Started by Shansen, 08-30-2019, 10:18 PM
              24 responses
              943 views
              0 likes
              Last Post spwizard  
              Started by Max238, Today, 01:28 AM
              0 responses
              9 views
              0 likes
              Last Post Max238
              by Max238
               
              Started by rocketman7, Today, 01:00 AM
              0 responses
              5 views
              0 likes
              Last Post rocketman7  
              Started by wzgy0920, 04-20-2024, 06:09 PM
              2 responses
              28 views
              0 likes
              Last Post wzgy0920  
              Working...
              X