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

Export - Exclude Other Indicators

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

    Export - Exclude Other Indicators

    I've read in the forums that there is not a way to not exclude the calling indicators in the Export routine.

    In one indicator that I'm using, I end up having to include 10 other indicators because of descendant classes, etc. I would rather not include all those indicators - with the assumption that the destination Ninja would have to have those indicators installed first.

    Is it possible to do something like this in code - because if I don't call the indicator in my code, then it won't be exported. So, have an option to tell the compiler to not include it in the export - in this case, do not export SMA?

    [ExportIgnore()] // Ignore the next line for Export
    TrendMovingAvg = SMA(trendMovAvg)[0];

    Would something like this be possible?

    #2
    Hello bobcat70,

    Thank you for your post.

    This is not possible, but you can add the calculation logic needed from the other indicators into your own code so that the calls to the other files are not needed.

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

    Comment


      #3
      Yeah, not possible. The SMA is simple, I realize. But one call may require 10 other indicators - and that is way too much code to just simply add to my indicator.

      The other option that might be nice is an INCLUDE statement - so you could include all the other 10 by name so I don't have to pick and choose the other indicators from the Export menu. Would that be possible?

      And, can these be added to the wish list?

      Comment


        #4
        Hello bobcat70,

        Thank you for your response.

        When exporting your NinjaScript files if there is a required file you will be prompted to include this in your archive file. If you select Yes it will add these files for you so that you do not need to manually add them one by one.

        This is necessary, because if another user imports your NinjaScript archive file and you did not include a necessary indicator for your NinjaScript file and the user does not have that indicator then it will result in compile errors on their end and they will not be able to import any further NinjaScript archive files until they resolve the compile errors on their end.

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

        Comment


          #5
          That is true, however, when one indicator is a DESCENDANT from another - its not including that and I get export errors (namespace missing, defined types are missing, etc. If I include all of those external indicators, then it exports just fine. I just have to remember to do that to avoid all the export errors.

          Comment


            #6
            Hello bobcat70,

            Thank you for your that information.

            Yes in some cases this does occur but you can check the Log tab of the NinjaTrader Control Center to see what file is needed at that point.

            I will forward this as a suggestion to be able to export your NinjaScript files without exporting the referenced indicators in your code.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by jaybedreamin, Today, 05:56 PM
            0 responses
            2 views
            0 likes
            Last Post jaybedreamin  
            Started by DJ888, 04-16-2024, 06:09 PM
            6 responses
            18 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by Jon17, Today, 04:33 PM
            0 responses
            1 view
            0 likes
            Last Post Jon17
            by Jon17
             
            Started by Javierw.ok, Today, 04:12 PM
            0 responses
            6 views
            0 likes
            Last Post Javierw.ok  
            Started by timmbbo, Today, 08:59 AM
            2 responses
            10 views
            0 likes
            Last Post bltdavid  
            Working...
            X