Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Export Error Due To Custom Indicator Folder

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

    Strategy Export Error Due To Custom Indicator Folder

    I am able to individually export any indicator I create. Exporting strategies works fine as well, but only as long as indicators used within the strategy are located in the main indicator section.

    When I create a custom folder for indicators I create each indicator can be exported just fine. I just cannot use them in a strategy and hope to export that strategy. It is the fact that these indicators are located in a custom folder that prevents the export.

    Must be missing some special code to let the export compiler know where these indicators are located.

    The exact error Msg reads: 12/9/2019 6:52:21 AM,Default,Error compiling export assembly: c:\Users\texas\Documents\NinjaTrader 8\bin\Custom\Strategies\D28renko.cs(3050) : error CS0234: The type or namespace name 'Dtox' does not exist in the namespace 'NinjaTrader.NinjaScript.Indicators.D18' (are you missing an assembly reference?),

    NOTE: "NinjaTrader.NinjaScript.Indicators.D18"
    D18 is the name of my custom folder to hold the custom indicators

    #2
    Hello Trexxx,

    Thank you for your note.

    Putting the strategies in a custom folder without changing the namespace in the code accordingly would result in this error.

    Up near the top of your script you should see something like

    Code:
    namespace NinjaTrader.NinjaScript.Indicators
    To be able to move the scripts in this namespace to a subfolder, you need to give them a namespace within that indicators namespace that is named the same as the subfolder.. So, if I wanted to put an indicator in a folder called NT_Kate (for me), I would change this in the NinjaScript Editor to:

    Code:
    namespace NinjaTrader.NinjaScript.Indicators.NT_Kate
    I would then compile and it should then recognize where the file is by the namespace.

    Please let us know if we may be of further assistance to you.

    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Thank you Kate.

      The top of my code for the indicator called "Dtox" shows the follow code, starting at line 25:

      Code:
      namespace NinjaTrader.NinjaScript.Indicators.D18
      {
          public class Dtox : Indicator
          {
      Seems to me that it already is calling out the folder called "D18".

      Comment


        #4
        Hello Trexxx,

        Thank you for your reply.

        When you say there's a folder, is this just a folder you see in the NinjaScript Explorer within the NinjaScript Editor, or is it also physically located in a folder with the same name in your Documents > NinjaTrader 8 > bin > Custom > Indicators folder?

        Thanks in advance; I look forward to assisting you further.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          My folder named "D18" is physically located within the parent folder named "Indicators".

          Click image for larger version

Name:	IndicatorFolders.jpg
Views:	464
Size:	39.5 KB
ID:	1080391

          Comment


            #6
            Updated Info:

            [1] I recreated my custom indicator, but this time it was saved within the main Indicators folder and not a custom folder. Next, I recreated my strategy using that same indicator and everything exported just fine.

            My goal was to verify that this is not a coding issue but a folder issue instead. So yes, this is a folder issue of some sort.


            [2] Next I built a brand new strategy. The strat used only indicators not located in custom folders, but only within the main Indicators folder. The strat exported just fine.

            Then I altered that strat by adding another indicator, one that was located in a custom folder. It would not export.

            ---------

            By process of elimination I believe it is some sort of folder issue causing the export problems. And I also have a hunch that this problem has noting to do with NinjaTrader but is somehow tied to the underlying MicroSoft dotNET platform. Seems I remember a few years back having a dotNET issue when dragging files into or out of custom folders. Just a hunch.

            Comment


              #7
              Hello Trexxx,

              Thank you for your reply.

              It sounds like you're relying on the export to add the indicator for you rather than including it in the list of files to be exported.

              Add both the strategy and the indicator that's in the D18 namespace in the export dialogue, then say yes if it prompts you to include any additional necessary indicators. Are you able to export then?

              Thanks in advance; I look forward to assisting you further.
              Kate W.NinjaTrader Customer Service

              Comment


                #8
                Hello Kate,

                Oh my, that did the trick.

                So yes, I was just relying upon the export tool to select the proper indicator files for me automatically. I simply checked the box for the strategy name and knew the export would take along with it any indicators required by the strategy. I've seen it do it many times before.

                There is no warning to tell me the export manager cannot pickup any indicators in custom folders. I guess you just have to know how to avoid that type of export error.

                I really do appreciate you help. Mystery solved.

                Comment


                  #9
                  Hello Kate,
                  I'm new to this but I'm trying to export from a custom folder and when I try to add any other indicators that are coded in the custom indicator to export they are not listed.
                  Not sure I explained this correctly. I built an indicator that calls on another indicator for some values but that indicator is not listed in the indicators in the export window.
                  I found an archived forum post for custom folders but I didn't see anything else more recent.
                  Edited: I tried to just export an indicator I created that is in the main indicator folder and it also says Assembly could not be exported. Please ensure all required components are included. The indicator uses the RSI, SMA, EMA and a custom indicator by Gomi (order flow). I added to the export the Gomi Reference but still get the error.
                  Thank you for your time.
                  James
                  Last edited by laoshr; 09-14-2021, 01:39 PM.

                  Comment


                    #10
                    Hello laoshr,

                    Thank you for your inquiry.

                    I would suggest checking the log tab of the Control Center for any additional hints here. Another reference for another assembly may need to be added. Since you are working with a 3rd party assembly, they may also have some insight for you on what needs to be added to export with their assembly.

                    If you see additional errors in the log tab of the Control Center, you can select the error and press Ctrl + C to copy it. You can then paste the errors here so we can share our insight. Please also reply to the thread if you get any more help from the vendor.

                    I look forward to assisting.
                    Kate W.NinjaTrader Customer Service

                    Comment


                      #11
                      Hello Kate,
                      I don't get any errors in the Log tab. I will ask Gomi if there is something else I need to do for exporting his assembly pack. If they are a vendor with NinjaTrader do you know if I would need to add the Vendor Reference to the export?
                      Thank you for your time.
                      James

                      Comment


                        #12
                        Hello laoshr,

                        Thank you for your reply.

                        Are you referring to a reference to NinjaTrader.Vendor in the References section? If so, no, this should not be added because it will vary for each person's installation depending on the items they have installed.

                        Please let us know if we may be of further assistance to you.
                        Kate W.NinjaTrader Customer Service

                        Comment


                          #13
                          Hi there, I was going thru this forum and it's fixed 2 of my issues trying to export. I am now down to just one error found in my Log. It reads
                          Error compiling export assembly: c:\Users\Nathan\Documents\NinjaTrader 8\bin\Custom\Strategies\MyFiles\WStop.cs(1,26) :
                          error CS0234: The type or namespace name 'Indicators' does not exist in the namespace 'NinjaTrader.Custom' (are you missing an assembly reference?)
                          I'm kind of at a loss for how to approach this one. Can you please advise how I can fix this, or if more information is needed, then please let me know. Thank you.

                          Nathan.

                          Comment


                            #14
                            Hello Nathan,

                            You started another thread in the link below:

                            https://ninjatrader.com/support/forum/forum/ninjatrader-8/platform-technical-support-aa/1196513-exporting-log-reads-indicators-does-not-exist-in-the-namespace-ninjatrader-custom

                            Please follow up with us there.
                            JimNinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by RubenCazorla, Today, 09:07 AM
                            1 response
                            5 views
                            0 likes
                            Last Post RubenCazorla  
                            Started by Irukandji, Today, 09:34 AM
                            0 responses
                            3 views
                            0 likes
                            Last Post Irukandji  
                            Started by TraderBCL, Today, 04:38 AM
                            3 responses
                            25 views
                            0 likes
                            Last Post NinjaTrader_Jesse  
                            Started by WeyldFalcon, 08-07-2020, 06:13 AM
                            11 responses
                            1,423 views
                            0 likes
                            Last Post jculp
                            by jculp
                             
                            Started by BarzTrading, Today, 07:25 AM
                            2 responses
                            29 views
                            1 like
                            Last Post BarzTrading  
                            Working...
                            X