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

Indicator Export Problems

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

    Indicator Export Problems

    I am attempting to Export a custom indicator. When using the Export tool, I receive the Compiler Error: Error compiling export sources. Please check your logs."

    Checking the situation, I noted that my custom indicator was using the UserDefinedMethods indicators, which was fine on my development machine, but creates problems for exporting (and one doesn't want to over-write another users UserDefinedMethods on Import, etc.). So I moved all the code in my UserDefinedMethods into the body of the custom indicator I am trying to export. I did this by placing the needed methods from the UserDefinedMethods into the indicator in-line. Ugly, but it compiled and ran on the development machine.

    Yet, when I returned to Export the custom indicator, I ran into the error line in the Logs: Error CS10103. The name 'XYZ' does not exist in the current context. So I am not sure how to proceed.

    Thanks to any one within the NT support community who can offer a suggestion.

    --MikeG

    #2
    Hi MikeGutmann,

    Thank you for your post.

    This error indicates that there is no definition or set instance for the XYZ. Typically, you get this error when you pass a variable without first declaring it.

    Would you mind sharing the code with me so that I may take investigate it?
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      I am getting the same error when I try to export studies. What do i need to do ?

      Thanks for your time and Input

      Curtis

      Comment


        #4
        Export Error CS10103

        Cal,

        Thanks very much for your reply.

        I've attached the code here as a word doc. It's a straightforward modification of MACD to output z-scores.

        The queue method, which had been placed in the UserDefinedMethods indicator was placed in-line, and it is the individual queue interfaces that are giving the CS10103 error when attempting to export the indicator. See below. The indicator compiles and runs here stand-alone.

        Please let me know if you need anything additionally, and thanks again.

        --Mike

        12/18/2013 4:54 AM Default See Help Guide section 'Export Problems' (http://www.ninjatrader.com/support/h...t_problems.htm) for additional instructions

        12/18/2013 4:54 AM Default Error compiling export sources: c:\Documents and Settings\Mike\My Documents\NinjaTrader 7\bin\Custom\Indicator\TVLEFTMACDSD1.cs(223,19) : error CS0103: The name 'GetNextInQueueLIFO' does not exist in the current context

        12/18/2013 4:54 AM Default Error compiling export sources: c:\Documents and Settings\Mike\My Documents\NinjaTrader 7\bin\Custom\Indicator\TVLEFTMACDSD1.cs(214,10) : error CS0103: The name 'GetQueueHead' does not exist in the current context

        12/18/2013 4:54 AM Default Error compiling export sources: c:\Documents and Settings\Mike\My Documents\NinjaTrader 7\bin\Custom\Indicator\TVLEFTMACDSD1.cs(213,8) : error CS0103: The name 'QueueLength' does not exist in the current context

        12/18/2013 4:54 AM Default Error compiling export sources: c:\Documents and Settings\Mike\My Documents\NinjaTrader 7\bin\Custom\Indicator\TVLEFTMACDSD1.cs(211,4) : error CS0103: The name 'Queue' does not exist in the current context

        12/18/2013 4:54 AM Default Error compiling export sources: c:\Documents and Settings\Mike\My Documents\NinjaTrader 7\bin\Custom\Indicator\TVLEFTMACDSD1.cs(165,4) : error CS0103: The name 'InitQueue' does not exist in the current context
        Last edited by MikeGutmann; 12-23-2013, 12:52 PM.

        Comment


          #5
          Mike,

          Is there another file that should go with this?

          I cannot get the file to compile on my end and seeing the same errors, The name 'Queue' does not exist in the current context, from my NinjaScript Editor window.
          Cal H.NinjaTrader Customer Service

          Comment


            #6
            How do I simply get rid of the study files that are corrupt on my system ?

            I would rather not like to send files to get the errors fixed , just delete the bad indicators and traces of them ?
            Last edited by CRM5096; 12-18-2013, 03:52 PM.

            Comment


              #7
              I think I found the thread

              Comment


                #8
                Cal,

                Thanks for continuing to look at this.

                I find NT development a little opaque at times, at it seems like a C# environment but with a number of restrictions, all of which I'm not sure of.

                In any case, I am able to compile and run the TVLEFTMACDSD1 indicator based on the code I posted here. But, before I began looking at exporting the indicator, it was using the QueueMethod originally coded in the UserDefinedMethods indicator. So I was wondering if, even when recompiling TVLEFTMACDSD1 with the QueueMethod inline, it somehow reverts to the UserDefinedMethods namespace. I'm guessing.

                To test this, I put a print statement in the TVLEFTMACDSD1 in-line QueueMethod.InitQueue interface, but unfortunately, NT won't compile this, returning the errors "'Print' does not exist in the current context" and "'Time' does not exist in the current context." However, the same Print statement compiles in the main body of the indicator. There appears to be something incorrect about the insertion of the class QueueMethod in the indicator's file, moving it from UserDefinedMethods.

                Thanks again,
                Mike

                Comment


                  #9
                  Cal,

                  I was finally able to work-around the Export issue for indicators relying on UserDefinedMethods code. While I was unable to simply copy the class implementation into the main body of the indicator -- Errors in placing additional class definitions within indicators -- I was able to strip out the individual interfaces and place them in the indicator code. It works and is Export-able in that form.

                  --Mike

                  Comment


                    #10
                    Export the indicator WoodiesCCI from NT

                    Hello!
                    I need to export the indicator WoodiesCCI from NT. I thought everything would be easy: File -> Utilitiz -> Export, etc., but
                    First, Woody was not in the folder Indicators, which opens for export and I do not know where else you can find the indicator WoodiesCCI;
                    Secondly, when I tried to export any indicator from the list folder Indicators program writes an error message "Invalid charactor in file name".
                    Help me, please, if possible.
                    Thank you in advance, Elena (sorry for my english).

                    Comment


                      #11
                      Hello Elena,

                      The WoodiesCCI indicator you will not be able to export because it the source code is not available for this Indicator. With that said, you should not need to export this indicator as it comes preloaded with all NinjaTrader 7 versions.

                      As for the error message this means that the "File Name" is invalid. Make sure that you do not have any special characters in it and there is not spaces for example "This_Is_a_test".

                      Happy to be of further assistance.
                      JCNinjaTrader Customer Service

                      Comment


                        #12
                        Thank you very much for your answer. I understood everything about Woody. But I keep files not the first time, and believe me I know the rules for writing file names. I tried different names including the .cs, without it, copying indicator name, etc. Always the result - the error message in the file name. So I wrote my message to you for help.
                        Last edited by lucky9512; 01-12-2014, 03:17 PM.

                        Comment


                          #13
                          Hello lucky9512,

                          What names have you tried? Can you try to name the file just "test"?
                          JCNinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by trilliantrader, 04-18-2024, 08:16 AM
                          4 responses
                          18 views
                          0 likes
                          Last Post trilliantrader  
                          Started by mgco4you, Today, 09:46 PM
                          1 response
                          7 views
                          0 likes
                          Last Post NinjaTrader_Manfred  
                          Started by wzgy0920, Today, 09:53 PM
                          0 responses
                          9 views
                          0 likes
                          Last Post wzgy0920  
                          Started by Rapine Heihei, Today, 08:19 PM
                          1 response
                          10 views
                          0 likes
                          Last Post NinjaTrader_Manfred  
                          Started by Rapine Heihei, Today, 08:25 PM
                          0 responses
                          10 views
                          0 likes
                          Last Post Rapine Heihei  
                          Working...
                          X