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

Undocumented/Unsupported Ninja Tips and Tricks

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

    Undocumented/Unsupported Ninja Tips and Tricks

    This thread has been started to see if there is anyone interested in joining me to help start a Development Wiki, devoted to expanding Ninja in areas that are currently not supported or documented.

    I will post some undocumented tips and tricks that you may find helpful. If you have one, please post it as well.

    The idea is to use this thread as a starting point for the wiki. I may or may not actually do this, it will depend on the interest of the forum and others to help as I am a beginning programmer.

    Please state if your tip/trick is for NT7, NT6.5.x or both.

    Originally posted by NinjaTrader_Dierk View Post
    Just a few words of warning aka disclaimer:
    - we appreciate the concept of "users helping users"
    - any undocumented feature is exactly that: it's undocumented, meaning we are unable to provide support for it nor are we able to provide any support for issues which ultimately could arise from using undocumented features
    - any undocumented feature might be gone as you update/upgrade NT. There is no guarantee that NT might:
    * work as expected or
    * even start up after upgrading/updating.

    Be prepared to experience the unexpected and be ready to resolve the unexpected as you use undocumented features
    Thank you,
    Last edited by r2kTrader; 11-09-2009, 01:06 AM.

    #2
    Auto Load a Workspace from a Strategy - 6.5

    Have you ever wanted to load a workspace from within a strategy or when you start a certain strategy? Now you can. Just drop this line in your initialize() and change to your liking.

    NinjaTrader.Gui.WorkspaceOptions.SwitchWorkspace("D:\\Documents and Settings\\User\\My Documents\\NinjaTrader 6.5\\workspaces\\123.xml", true);

    If anyone is interested, you can use a similar technique to "auto-save" your workspace throughout the day.

    Comment


      #3
      FTP - Upload Your Strategy To Your Blog - 6.5

      Apparently NT has an FTP class for logging into a server and executing a series of commands.

      This could be very useful if you want to provide your signals to a website for your subscribers.

      It's found in "NinjaTrader.Cbi.Ftp"

      There will need to be more work done on this, but I am going to work on a class that can be used to pump buy/sell signals to a pay for signal website. I know, I know, Collective2 or whatever, but this is your own and would run in wordpress and allow you to personalize the whole experience.

      If there is an advanced programmer out there who would like to work with me on this project. Please PM me. I have the Linux boxes and a small hosting company and I know how to use OpenSource solutions to manage the other side of the equation. Namely taking the signal that is FTP'd to the server and putting it up on the website.

      Again, please contact me if you want to help. This is a another example of how the development wiki could play a key role in helping provide starting places for people with ideas and needs, but that transcend the current limitations of support.

      You probably don't need to use their FTP Class to accomplish this, but I just thought it was interesting. You could just as easily use any SFTP .NET library to poll a File that you streamwrite to, or even have a socket that you write to that is pumped right over.

      This is a solution that would be used for a situation where you don't want to run NT on a windows server that also does the hosting. In my case I have Linux boxes (dedicated servers) and I would want to pump signals and results in realtime as well as Graphics images that provide a snapshot of the signal, etc.

      You could also run your own little "Collective2" type service.

      [UPDATE]
      After some further thought, the ftp might be useful for uploading chart snapshots to your website. As far as real time signals, etc., it would probably be best to use a direct connection to a mysql database on your linux server (this post was primarily for those who use linux and want a bridge to get signals and the like from their NT strategies/indicators).
      Last edited by r2kTrader; 11-09-2009, 12:30 AM.

      Comment


        #4
        TimeInForce = Fill Or Kill? NT 6.5

        Here are some other options for TimeInForce you might want to play with.

        Remember, none of this is supported by Ninja.

        TimeInForce = Cbi.TimeInForce.Ioc; // Fill or kill
        TimeInForce = Cbi.TimeInForce.Opg; // Order on Open (interesting??)
        TimeInForce = Cbi.TimeInForce.Gtd; // Good Till Date (instead of GTC)

        I recommend playing with these and of course testing before committing real capital. The one of interest to come clip traders may be the fill or kill.


        Enjoy

        Comment


          #5
          Just a few words of warning aka disclaimer:
          - we appreciate the concept of "users helping users"
          - any undocumented feature is exactly that: it's undocumented, meaning we are unable to provide support for it nor are we able to provide any support for issues which ultimately could arise from using undocumented features
          - any undocumented feature might be gone as you update/upgrade NT. There is no guarantee that NT might:
          * work as expected or
          * even start up after upgrading/updating.

          Be prepared to experience the unexpected and be ready to resolve the unexpected as you use undocumented features

          Comment


            #6
            FlattenEverything() Programmatically - NT 6.5

            This is a nifty little snippet.

            Did you ever have the need to "Flatten Everything". All strategies, and all open orders. Just get flat!

            NinjaTrader.Gui.SuperDom.SuperDom.FlattenEverythin g();

            I tested it and it seems to work ok. It killed all my strategies and got me flat on any orders that work working. I mean it took me FLAT! And fast.

            Test and use at your own risk.

            Comment


              #7
              Windows Forms

              Folls came up with a way of launching a windows form using a
              windows strategy



              I understand the form construction etc but can anyone show how to get information from ninja eg from a variable to the form. From what I can see Ninja is launching the form but no information is being transmitted.

              What I am looking for is a way for ninja to produce a result from the on bar update method, and to transmit it to the form.

              I am not expecting detailed code but an idea in principle would be welcome.

              Great Thread but think the Ninja people should make it into a main thread,
              ie underneath General Programming etc
              Last edited by NinjaTrader_PatrickH; 07-23-2014, 01:48 PM. Reason: Changed link to current URL.

              Comment


                #8
                MicroAl,

                Since it is an old thread we will be leaving it there so people looking back for it won't get confused.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Undocumented/Unsupported Ninja Tips and Tricks

                  Sorry Josh some confusion I meant having a main Undocumented/Unsupported Ninja Tips and Tricks thread at the top of the directory so to speak.

                  You may find that Ninja gets extended in ways that even you people
                  never thought of

                  Comment


                    #10
                    Thanks for the suggestion.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Micro,

                      That was the purpose of this thread, so thank you for your comments.

                      Thanks,




                      Originally posted by MicroAl View Post
                      Folls came up with a way of launching a windows form using a
                      windows strategy



                      I understand the form construction etc but can anyone show how to get information from ninja eg from a variable to the form. From what I can see Ninja is launching the form but no information is being transmitted.

                      What I am looking for is a way for ninja to produce a result from the on bar update method, and to transmit it to the form.

                      I am not expecting detailed code but an idea in principle would be welcome.

                      Great Thread but think the Ninja people should make it into a main thread,
                      ie underneath General Programming etc

                      Comment


                        #12
                        Using GDI+ methods to draw anything.

                        I believe this thread should be linked/included here.

                        Using GDI+ methods to draw anything.

                        Last edited by eDanny; 08-14-2014, 12:27 PM.
                        eDanny
                        NinjaTrader Ecosystem Vendor - Integrity Traders

                        Comment


                          #13
                          Checking for the existence of a file with System.IO

                          Checking for the existence of a file with System.IO

                          Last edited by eDanny; 08-14-2014, 12:27 PM.
                          eDanny
                          NinjaTrader Ecosystem Vendor - Integrity Traders

                          Comment


                            #14
                            eDanny,

                            Thank you for contributing. Could you please leave a brief note in the TITLE or preceding the link so people know what is is for?

                            Thanks!

                            Comment


                              #15
                              Discussion on serialization

                              Although not unsupported info, here is a discussion on serialization which can be helpful.
                              Last edited by eDanny; 08-14-2014, 12:28 PM.
                              eDanny
                              NinjaTrader Ecosystem Vendor - Integrity Traders

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by sofortune, 05-18-2024, 11:48 AM
                              2 responses
                              31 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by Zach55, 02-19-2024, 07:22 PM
                              2 responses
                              65 views
                              0 likes
                              Last Post lbadisa1  
                              Started by JGriff5646, Yesterday, 05:47 PM
                              1 response
                              14 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by AlphaOptions, 06-18-2013, 08:24 AM
                              9 responses
                              2,203 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by ttrader23, Yesterday, 09:33 AM
                              3 responses
                              27 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Working...
                              X