Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Compiling strategy with multiple files

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

    Compiling strategy with multiple files

    Hello,

    is there to way to export strategy as dll which consists of many files:
    Click image for larger version

Name:	image.png
Views:	44
Size:	595.6 KB
ID:	1337582
    Now when i click export addon i have to select manually file by file - but i want to do this in batch:

    Click image for larger version

Name:	image.png
Views:	37
Size:	369.6 KB
ID:	1337583

    There is structure of about 200 files which si impossible to click every one :-/

    Thanks for advices

    Paul

    #2
    Hello Paul,

    Unfortunately, there would not be a way to do this in NinjaTrader.

    It would be required that you check the box to select the specific scripts you would like included in the export, and there is not a way to include all scripts.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Is there some kind of tool, which allows me to merge all files into one, which is valid and I can compile using Ninjatrader?

      Comment


        #4
        Hello kujista,

        I think Visual Studio can do this.

        Below is a link to the 'Visual Studio Solution for AddOn Development' project.

        Join the official NinjaScript Developer Community for comprehensive resources, documentation, and community support. Build custom indicators and automated strategies for the NinjaTrader platforms with our extensive guides and APIs.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks could you please provide startup project for developing indicator - the same way as you have here? I gues i have source code out of Custom folder and in custom foler i only put dll of indicator? What is the idea behind please?

          Thanks a lot

          Comment


            #6
            Hello kujista,

            Unfortunately, this would be the only project like this I have to provide.

            But I would recommend that you create the indicators in NinjaTrader. Then make a copy of the project, and copy the open source indicator and other open source files into the project folder and then include the files with the project in visual studio.

            Using visual studio you can build the project and create dll assemblies.

            Please note, our team is not able to assist with using Visual Studio.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Thanks Chelsea,

              so I develop indicator in Custom folder - separated into multiple files. It compiles here, then, I move it outside this folder - using template you provided for AddOns and then make build - i will have dll file.

              If this indicator uses another which is in Custom folder in dll state will it be working ok if i add it to reference?

              I am wondering if i can make manually export zip file which consists of 2 dll files.

              Comment


                #8
                Hello kujista,

                You also need to copy the assembly dll into the project and reference it.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Hi, I worked on having indicator out of Custom/Indicators folder. I create very similiar simple project here:

                  Click image for larger version

Name:	image.png
Views:	27
Size:	277.6 KB
ID:	1337795

                  I added references -
                  Click image for larger version

Name:	image.png
Views:	19
Size:	232.3 KB
ID:	1337796

                  But when i see the source code i have errors which at 1st do not know the indicator value - it is in ninjascript generated code section

                  Click image for larger version

Name:	image.png
Views:	18
Size:	592.9 KB
ID:	1337797
                  and then, it does not know the indicators and also I cannot call it like this. Which does not happen when i have the file in Custom/Indicators.

                  Is there a way to solve this? I really would appritiate to have option to build indicators here and do not have to compile them by clicking every file in ninjascript compiler.

                  Thanks a lot for advices.

                  Pavel

                  Comment


                    #10
                    Hello Pavel,

                    The issue is the 'indicator' reference in the auto generated code is referencing something internal in NinjaTrader.
                    This cannot be accessed through a dll that I can see.

                    Removing lines 263 to 294 should be ok. But please let me know if this causes any issues using the indicator from a strategy or market analyzer I may not be aware of.
                    Chelsea B.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by trendisyourfriend, 05-25-2023, 09:54 AM
                    10 responses
                    160 views
                    0 likes
                    Last Post Curerious  
                    Started by iantriestrading, Today, 04:12 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post iantriestrading  
                    Started by Adamel, Today, 03:47 PM
                    0 responses
                    8 views
                    0 likes
                    Last Post Adamel
                    by Adamel
                     
                    Started by raysinred, 04-06-2025, 01:52 PM
                    15 responses
                    136 views
                    0 likes
                    Last Post NinjaTrader_Helom  
                    Started by Str8boominit, 04-14-2025, 06:03 PM
                    7 responses
                    92 views
                    0 likes
                    Last Post NinjaTrader_Eduardo  
                    Working...
                    X