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

How To Compile and Implement New Bar Type?

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

    How To Compile and Implement New Bar Type?

    I got a new source file for a better renko bar (??), betterrenkobarstype.cs, that I want to install and test. How do I compile it and incorporate it into NT?

    #2
    Hello dkrumholz,
    Thanks for your post and I am happy to assist you.
    Is the file a zip file or a cs file?

    If it is a zip file then please follow the procedure as mentioned here and restart NinjaTrader http://www.ninjatrader.com/support/h...tml?import.htm

    If it’s a *.cs file then please follow the below procedure.
    • Copy/paste the cs file to the folder <My Documents>\NinjaTrader 7\bin\Custom\Type\
    • In Control Center menu bar goto Tools>Edit NinjaScript>Indicator
    • In the Indicator dialog select any NinjaScript file and click Ok.
    • In the NinjaScript editor press F5 to compile it.
    • Restart NinjaTrader.


    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Type File Won't Seem To Compile

      It was a .cs file so I followed those instructions but the file never got compiled. I have attached a zip that contains the .cs file. Thanks for your help.
      Attached Files

      Comment


        #4
        Hello dkrumholz,
        The BarType would appear in the Data Series dialog on the next restart (of NinjaTrader). I could compile the same fine at my end.

        Did you get any compile errors? If so please send a screenshot of the errors.

        To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.
        For detailed instructions please visit the following link
        http://take-a-screenshot.org/

        I look forward to assist you further.
        Attached Files
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          There were no errors when I compiled an indicator. I had expected that a file prefixed with "@" for the type would have been created when I compiled an indicator. The "@" file was not created.

          Comment


            #6
            Hello dkrumholz,
            Only the NinjaScript files that come shipped with NinjaTrader have the @prefix.

            Please follow the below steps to import the BarType
            • Copy/paste the cs file to the folder <My Documents>\NinjaTrader 7\bin\Custom\Type\
            • In Control Center menu bar goto Tools>Edit NinjaScript>Indicator
            • In the Indicator dialog select any NinjaScript file and click Ok.
            • In the NinjaScript editor press F5 to compile it.
            • Restart NinjaTrader.

            The bartypes will show up in the Data Series dialog (right click chart and click Data Series) , in the Type field.

            Please let me know if I can assist you any further.
            JoydeepNinjaTrader Customer Service

            Comment


              #7
              I think you got me exactly what I needed. Thanks!

              Comment


                #8
                Hello dkrumholz,
                Glad the issue was resolved.

                Please let me know if I can assist you any further.
                JoydeepNinjaTrader Customer Service

                Comment


                  #9
                  Exporting a &quot;bartype&quot;

                  I have written a couple of new bar types. I'd like to be able to export "compiled" versions of those bartypes but NT doesn't have an option for exporting bartypes.

                  How does one do that?

                  Leroy

                  Comment


                    #10
                    Hello Leroy,
                    Unfortunately the BarType cannot be exported directly. You can however follow the below steps to do it.
                    • Cut/Paste the BarsType in the ~\Documents\NinjaTrader 7\bin\Custom\Indicator\ folder
                    • Go to Tools>Edit NinjaScript>Indicators... and compile any indicator
                    • Restart NinjaTrader.
                    • Now you will be able to export the BarsType using the Export feature.


                    If you now try importing the bars type it will be imported in the indicator folder. To resolve the scenario please further edit the zip file (where the bar type is exported)
                    • Extract the BarType.zip file
                    • Change the name of the "Indicator" folder to "Type"
                    • Add the xml file and the Type folder to a zip file.


                    Now you will be able to distribute it.
                    JoydeepNinjaTrader Customer Service

                    Comment


                      #11
                      Thanks....will give it a shot.

                      Comment


                        #12
                        That is if you are exporting CS files.

                        Dll files go into the bin/custom directory and the zip has no directory associated with it.

                        Comment


                          #13
                          Hello ldissinger,
                          Yes, this is if you are exporting the file as source code.

                          If you are exporting it as an assembly then just cut / paste the BarType (cs file) to the Indicator folder, compile it, and then export it using the Export feature in NinjaTrader.
                          JoydeepNinjaTrader Customer Service

                          Comment


                            #14
                            Protect assembly check box

                            I have a licensed copy of the Agile.NET secure team compiler. In Ninja it will not allow me to select "Protect Compiled Assemblies" any longer. Is this because I have the standalone version?

                            Leroy

                            Comment


                              #15
                              Hello Leroy,
                              Dont think that will be a problem. Please refer to this post which further demonstrates how to set up NinjaTrader with the full version of Agile.Net/CliSecure
                              JoydeepNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by adeelshahzad, Today, 03:54 AM
                              5 responses
                              32 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by stafe, 04-15-2024, 08:34 PM
                              7 responses
                              32 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Started by merzo, 06-25-2023, 02:19 AM
                              10 responses
                              823 views
                              1 like
                              Last Post NinjaTrader_ChristopherJ  
                              Started by frankthearm, Today, 09:08 AM
                              5 responses
                              20 views
                              0 likes
                              Last Post NinjaTrader_Clayton  
                              Started by jeronymite, 04-12-2024, 04:26 PM
                              3 responses
                              43 views
                              0 likes
                              Last Post jeronymite  
                              Working...
                              X