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

    Originally posted by jbarr View Post
    well, answering your question again they don not run any 'hidden cmd windows'.
    Compile an indicator when you have the Windows Task Manager up , and you will see csc.exe come into the list and disappear when the compilation is over. You will see the same thing when you start NT. NT does a lot of things with hidden windows, as any system SPY utility will quickly show.

    i've no idea what you mean by custom installer and dummy script.
    A custom installer is an installer that does not use the NT import facility, but puts the required files in the correct places. NT help itself talks about this. The only problem is that when NT imports using its menu utility, it immediately compiles the new indicator into the assembly. I am seeking to be able to do the same from within my installer. ref: http://www.ninjatrader.com/support/h...tml?export.htm

    if you want to install external dll just once it is only reasonable to require a restart.
    I am not installing it just once: it is an indicator. And when NT imports that same indicator through a zip file, it does not require a restart, so no, while a restart may be reasonable, it is evidently not required.

    if you want to deploy a source code dynamically, without user interaction, then you must have a code already running under nt and employ #99 commands to compile/reload.
    Not true if I am installing the indicator. I am installing a protected indicator, so no, I cannot compile friom inside it at installion time only, as there is no open code from which to compile. To get such an open code to compile from would require a script with the commands as you outlined in post #99. As that script file would have no purpose other than to run a compile command, it is a dummy file.

    Comment


      re-read my previous post (as i edited it). if you want some help, i can do that, but only if you describe exactly what is it you looking for...

      do you NOT deploy your source code? do you deploy your indicator as dll?
      let me know and i will help. what im telling you is not an educated guess but something i know for a fact.

      if you looking to LOAD an assembly into a process memory (a process other than yours) then there is NO other way than i described unless you want to resort to some keystroke simulation tricks.
      Last edited by jbarr; 09-04-2011, 02:29 PM.

      Comment


        Originally posted by jbarr View Post
        re-read my previous post (as i edited it). if you want some help, i can do that, but only if you describe exactly what is it you looking for...

        do you NOT deploy your source code? do you deploy your indicator as dll?
        let me know and i will help. what im telling you is not an educated guess but something i know for a fact.

        if you looking to LOAD an assembly into a process memory (a process other than yours) then there is NO other way than i described unless you want to resort to some keystroke simulation tricks.
        Thanks very much for your interest, and I will really appreciate any help that you can give.

        It seems that I am the one who is not being clear enough, so let me try again.

        I create an indicator that I want to distribute, so I export it as a protected dll. I will not be shipping the source code; only the dll and its associated files.

        I add other files to the package, for other purposes, so now to deploy the package, I cannot just tell clients to use the File --> Utilities --> Import NinjaScript to install the indicator. I must copy the files to the correct locations using my own installer program.

        Here is the issue. My custom installer can copy all the files to the correct locations, and do whatever other actions I require. However, my new indicator will not be available for use until a compilation is run from somewhere.

        When we use File --> Utilities --> Import NinjaScript, this gets done automatically by NT. As we did not use File --> Utilities --> Import NinjaScript, the only way so far to make my indicator available is to either restart NT, or ask the client to open any indicator and compile. Neither is an elegant solution.

        I want to be able for my installer to run the compiler just like NT does when I use File --> Utilities --> Import NinjaScript to import the dll.

        If I am still not clear, please do not hesitate to demand more clarity.

        Thanks again.

        Comment


          i see what you mean now. and yes, of course, it is not enough to just 'place the files' properly. you need to initiate a loading process. you can do that either through the nt7 menus (well, user will) or from within nt7 code (i do it from indicator itself but it has to be already running at the time, of course).

          there is NO automatic installation under nt7. to have one would require some sort of file monitoring (like a system watchdog, a hook or else).

          being a real time app they cannot afford a silly luxury.

          so what's the problem with File --> Utilities --> Import NinjaScript done by user once installation is complete? i've never done it. i deploy my stuff as indicator.x86.dll so all i have to do is place it into 'NinjaTrader 7\bin\Custom' and it becomes available as of next restart. if i need to reload a new version (complied inside vs) during the session i use the code in the indicator itself.

          why fight the tool...

          so as you described your problem there is no LEGIT automatic solution.
          and yet, if you need some info/details on internal nt7 dealings ask away.
          Last edited by jbarr; 09-04-2011, 10:42 PM.

          Comment


            Tip by Mark Whiting for setting a parameter to read only, here: http://www.ninjatrader.com/support/f...ad.php?t=44086
            eDanny
            NinjaTrader Ecosystem Vendor - Integrity Traders

            Comment


              Chart styles on multi-series charts

              An issue I dealt with some time ago was how to determine what kind of bars were on a chart (candlestick, OHLC, etc.) so that bar coloration could be handled properly. I did it successfully with this code:

              Code:
              bool bUsesOutline = 
               ( ChartControl.ChartStyleType == ChartStyleType.Box
               || ChartControl.ChartStyleType == ChartStyleType.CandleStick );
                              
              CandleOutlineColor = myBarColor;
              
              if( !bUsesOutline || Close[0] < Open[0] )
                  BarColor = myBarColor;
              else
                  BarColor = hollowColor;
              Note that the idea here is that bar coloration would indicate something other than Close > Open or Close < Open, so rising candlesticks and boxes must be hollow while falling candlesticks and boxes must be solid. Anyway, this works fine on charts with a single data series, or at any rate when an indicator incorporating this code is applied to a chart's primary data series. But problems can arise when it's not the primary data series; I just discovered the code above always returns information about the primary data series.

              Anyone have any suggestions for determining the chart style of the data series to which an indicator is applied, regardless of whether or not it's the primary data series?

              Comment


                Mike,

                Try:
                Bars.BarsData.ChartStyleType

                See if that does what you're looking for.

                VT
                Last edited by VTtrader; 09-14-2011, 08:50 PM.

                Comment


                  Originally posted by VTtrader View Post
                  Mike,

                  Try:
                  Bars.BarsData.ChartStyleType

                  See if that does what you're looking for.

                  VT
                  Thanks, VT, worked like a charm! I knew that info had to be tucked away somewhere....

                  Comment


                    Is there a "master list" of these types of parameters like ReadOnly etc?

                    Comment


                      r2kTrader,

                      I'd wanted to launch a Strategy from an Indicator but I'm always told that it is NOT possible, until I saw you post #24 on the Strategy TEMPLATES thread where you indicated that "I figured out how to launch a strategy from indicator. It's actually pretty easy ..."; Could you please let me know how to do this ?

                      Lolu

                      Comment


                        Manually Drawn Text Z Order

                        I do a lot of manual text notation on my charts and have been getting finger fatigue from spinning my mouse wheel to get the text objects to the top of the Z order .

                        This may be documented somewhere, but I discovered accidentally that if the text object is simply copied and pasted, voila! It rises to the top of the Z order where it is easiest to read.

                        Comment


                          Need Help With A Simple Ninja Script

                          Hellow everybody. I do not know any programmers, so I would be happy if somebody can program for me a simple automated strategy that I need.

                          It should help me to manage my position after I have recieved a fill and bracket orders has been placed.

                          It has to have two functions:

                          1. Time stop - if within X seconds of time, my first target is not reached(limit orders not filled), the Stop Loss should be moved to Break Even +2. If the current price is bellow that level(or order is rejected), than close position!

                          2. 20EMA Trailing Stop - if the stop has been placed at BE+2, than wait for 20EMA(10 periods behind) to become above/bellow that level and start trailing it 1 tick bellow 20EMA. Update the trailing Stop every 3 periods.
                          Last edited by spitfire; 01-07-2012, 08:57 AM.

                          Comment


                            look at the title

                            So that'a an undocumented tip or trick is it?
                            Please re submit in an appropriate area.

                            Comment


                              Wrong topic?

                              Maybe you should resubmit this in one of the Strategy topic areas?

                              Comment


                                Dear Sirs,

                                Lot of interesting stuff is there on this thread. But i am searching for a very simple task i.e. import historical data into NT using code/program. NT told me it is not supported but i know it is possible and have seen one or two programs providing this feature. Can any one throw some light on it? It will be of great help. Thanks

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Bobin, 03-12-2024, 08:51 AM
                                18 responses
                                547 views
                                0 likes
                                Last Post TaoTrader  
                                Started by sofortune, Yesterday, 10:55 PM
                                2 responses
                                11 views
                                0 likes
                                Last Post sofortune  
                                Started by sofortune, Yesterday, 09:49 PM
                                2 responses
                                9 views
                                0 likes
                                Last Post sofortune  
                                Started by EnveousColnago, 03-24-2020, 07:50 AM
                                8 responses
                                367 views
                                0 likes
                                Last Post morozg05  
                                Started by anton_tymoshchuk, Today, 01:14 AM
                                3 responses
                                18 views
                                0 likes
                                Last Post NinjaTrader_Gaby  
                                Working...
                                X