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

Bizarre Results

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

    Bizarre Results

    I am seeing bizarre results with this indicator (source attached).

    Reproduction steps (questions in bold):
    1) Load a daily SPY and place this indicator on the chart;
    2) Only a few days of JYN (the gold line) appear. WHY?;
    3) Change the chart security to JYN and the gold indicator appears for all days. WHY THE DIFFERENCE?
    4) Also, in case 3, the SPY returns are shown as negative. WHY?

    I have wrestled with this and I am baffled.

    Many thanks.
    Attached Files

    #2
    Hello achalk,

    Thank you for your note.

    For the SPY chart what interval and period type is selected?

    In addition, please attach screenshots of this item working and not working to your response.

    I look forward to your response.

    Comment


      #3
      Interval is one day in all cases.
      Period type? Not sure what you mean here.
      Not sure how to atach files to a reply so I will attach them to another message.

      Comment


        #4
        Here are the files that you requested.

        Here are the files that you requested.
        Attached Files

        Comment


          #5
          Hello achalk,

          Thank you for your response.

          Please advise if these are the correct JYN and REZ for your indicator:
          I look forward to your response.

          Comment


            #6
            Originally posted by NinjaTrader_PatrickH View Post
            Hello achalk,

            Thank you for your response.

            Please advise if these are the correct JYN and REZ for your indicator:
            I look forward to your response.
            Yes. See the source code that I sent you.

            Comment


              #7
              Hello achalk,

              Thank you for confirming that information.

              As these are not preloaded in NinjaTrader, when I ran your code it returned errors. So I must add these into NinjaTrader first before I can run your code.

              I will continue to test and follow up with you here.

              Comment


                #8
                Hello achalk,

                Thank you for your patience.

                I recommend debugging your NinjaScript code, I am able to reproduce the same results on my end.
                For information on debugging your NinjaScript code please visit the following link: http://www.ninjatrader.com/support/f...ead.php?t=3418

                You are also using unsupported code to add the additional instruments into the indicator. Unfortunately, there is no documentation for these methods.

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

                Comment


                  #9
                  What do you mean "unsupported code". Be specific.

                  Comment


                    #10
                    Hello achalk,

                    Thank you for your response.

                    The 'AddSecurity()' method you have created is not defined in NinjaScript and is unsupported. How this method behaves and interacts with NinjaTrader and the Charts will need to be debugged on your end.

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

                    Comment


                      #11
                      Originally posted by NinjaTrader_PatrickH View Post
                      Hello achalk,

                      Thank you for your response.

                      The 'AddSecurity()' method you have created is not defined in NinjaScript and is unsupported. How this method behaves and interacts with NinjaTrader and the Charts will need to be debugged on your end.

                      Please let me know if I may be of further assistance.
                      Patrick: i don't know if you did not read the code that I sent or if you are new to Ninjascript. AddSecurity() is a member function in my code. It calls the NinjaTrader API.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Barry Milan, Yesterday, 10:35 PM
                      4 responses
                      14 views
                      0 likes
                      Last Post Barry Milan  
                      Started by DanielSanMartin, Yesterday, 02:37 PM
                      2 responses
                      13 views
                      0 likes
                      Last Post DanielSanMartin  
                      Started by DJ888, 04-16-2024, 06:09 PM
                      4 responses
                      12 views
                      0 likes
                      Last Post DJ888
                      by DJ888
                       
                      Started by terofs, Today, 04:18 PM
                      0 responses
                      11 views
                      0 likes
                      Last Post terofs
                      by terofs
                       
                      Started by nandhumca, Today, 03:41 PM
                      0 responses
                      8 views
                      0 likes
                      Last Post nandhumca  
                      Working...
                      X