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

Problem with MinMax Calculation which is not in my Indicator

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

    Problem with MinMax Calculation which is not in my Indicator

    I am getting a consistent error message with a new indicator I developed, and as near as I can tell the error message relates to something not in my indicator. Here's the error message:

    Indicator 'BuySellDeltaPerCent': Error on calling 'CalculateMinMax' method on bar 4559: The calculation results in unrenderable values.

    That message is from my log file.

    I don't use MinMax in my indicator, and I looked through all of the indicator code and I find no reference to that method at all.

    Am I missing something? I'd be happy to send you my indicator file, I don't want to post it, if that's okay.

    Thanks

    DaveN

    #2
    Hello daven,

    Thank you for your post.

    Please send us the file at platformsupport[at]ninjatrader[dot]com with 'ATTN: Patrick H' in the subject line and a reference to this thread in the body of the email.

    You can export your indicator by going to Tools > Export > NinjaScript Add On > Add > select your indicator > OK > Export > name the file 'NTsupport' > Save.

    The file will be located under Documents\NinjaTrader 8\bin\Custom\ExportNinjaScript. Please attach the file to your email.

    Comment


      #3
      Sent a question to you via e-mail, but perhaps this would be a better way. If I import the edited CS file you sent back to me, will it overwrite the original CS file? I want to compare the files side by side, and if it overwrites I lose it.
      Thanks
      DaveN

      Comment


        #4
        So I renamed the old indicator file since importing your edited file would have overwritten, I imported your edited file, compiled it. It works on a chart, though it looks a bit different and the strategy that uses this indicator no longer compiles because it seems to not have access to "TradeDir" which is the trigger to take a position. Also, within properties all but one of the values are commented out, Period is the only variable remaining. What is the reason for commenting all that stuff out? Finally, can you give me a hint at what changed and why? It isn't obvious to me on first inspection, besides the commenting changes in properties.
        Thanks
        DaveN

        Comment


          #5
          Also, when I try to edit my strategy, based on the indicator, every time I open it in the editor, it kills NT. I'm kind of stuck now. How do I fix a cs file that crashes NT every time I try to load it into the editor?
          DaveN

          Comment


            #6
            Hello daven,

            Thank you for your response.

            I am glad you were able to import the indicator after renaming the original.

            The items I changed were to remove the unnecessary calls to Series and assigning them to Plots. I also made sure that only the needed Series were used and assigned (to my knowledge) to the proper Plots. I also remove the Plot and Series that was for a zero line and just used AddLine(). One major item was that the original code was syncing the Series in SetDefaults when you would actually want to do so in the DataLoaded state.

            For the strategy you will need to send us your Log and Trace files as hopefully an exception was caught in the Trace during the crash. You can do this by going to the Control Center-> Help-> Email Support. Please reference the following ticket number in the body of the email: 1715429

            I look forward to your response.

            Comment


              #7
              Just sent you the log and trace files.
              DaveN

              Comment


                #8
                Here is the error message I am getting from the strategy. I will send the strategy to you by e-mail (if I can figure out how to export a non-compiling strategy).
                DaveN

                'NinjaTrader.NinjaScript.Indicators.BuySellDeltaPe rCent' does not contain a definition for 'TradeDir' and no extension method 'TradeDir' accepting a first argument of type 'NinjaTrader.NinjaScript.Indicators.BuySellDeltaPe rCent' could be found (are you missing a using directive or an assembly reference?)

                Comment


                  #9
                  Can't send it. NT won't let me export it. I did notice the indicator seems to contain the old names, from before your edits, though I can't tell why. How does the name on the indicator plot when you place it on a chart relate to the names in the indicator file. For some odd reason they are different in the indicator you sent me?
                  I thought that part of the function of the variable statements in the "properties" area were to define the name that shows up for the plots in the indicator, but you commented them out, so that must not be true. Where then, do the names for the plots come from?
                  DaveN
                  Last edited by daven; 05-30-2017, 03:08 PM.

                  Comment


                    #10
                    Hello daven,

                    Thank you for your response.

                    I am going to contact you via email so we may look into this further with you.

                    Comment


                      #11
                      Gone all morning. Just sent you an email.
                      Dave

                      Comment


                        #12
                        Since I haven't heard back from you and we are close to your 6 pm cutoff time, I assume you will be calling sometime Friday? Any idea when?

                        Comment


                          #13
                          Hello daven,

                          Thank you for your response.

                          I have responded to you on email to re-schedule our call.

                          Comment


                            #14
                            What was the solution to this issue?

                            Thanks.

                            Comment


                              #15
                              You can see from the thread that I had some messed up code. Once Patrick made the changes to my code and I fixed the problem with the call to a TradeDir value that it couldn't find. The code compiled and that problem disappeared. The problem with the code not being able to find "TradeDir" is that I was referring to it in a Value[X] call and when I fixed that it fixed the issue. The compiler doesn't know that you are calling Value1 when you really want Value2.
                              DaveN

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by algospoke, Yesterday, 06:40 PM
                              2 responses
                              19 views
                              0 likes
                              Last Post algospoke  
                              Started by ghoul, Today, 06:02 PM
                              3 responses
                              14 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by jeronymite, 04-12-2024, 04:26 PM
                              3 responses
                              45 views
                              0 likes
                              Last Post jeronymite  
                              Started by Barry Milan, Yesterday, 10:35 PM
                              7 responses
                              21 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by AttiM, 02-14-2024, 05:20 PM
                              10 responses
                              181 views
                              0 likes
                              Last Post jeronymite  
                              Working...
                              X