Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT Automation Feasible?

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

    NT Automation Feasible?

    Hi. I'm evaluating NT as a tool for automatic stock analysis and trading. I've been working the NT support team, but it looks like NT has some limitations that are roadblocks to what I want to accomplish. I'm looking for other feedback to see if there are automated ways (no manual intervention) to implement the first two steps of my process
    (below).

    Roughly, here is the process I'm trying to implement using a NinjaScript that automatically runs daily to:

    1. Import a daily CSV symbol file into Market Analyzer (or whatever works as a temporary repository) and have the latest price and volume updated automatically for only those symbols.

    2. Standard or custom indicators would run against this Market Analyzer list to identify specific symbols as potential high-probability trades.

    3. These resulting target symbols (5-10/week) would then be charted manually and be setup for automatic or manual trade execution.

    After talking to the support folks, it looks like step 1 can't be implemented automatically. Is this correct? Has anyone successfully implemented this kind of automation?

    Thanks for any feedback.

    Regards,

    Dan.

    #2
    I've done some playing around in NT7 with AutoIT. I'm not sure how compatible it is with NT8.

    There are other similar projects out there.

    AutoIt is a freeware BASIC-like scripting language designed for automating the Windows GUI and general purpose scripting.

    Comment


      #3
      Originally posted by sledge View Post
      I've done some playing around in NT7 with AutoIT. I'm not sure how compatible it is with NT8.

      There are other similar projects out there.

      https://www.autoitscript.com/site/autoit/
      sledge,

      Thanks for the link. Moreover, it's the concept that's huge - tools and applications that execute the NinjaTrader UI.

      It turns out that I've done some extensive work with that approach in the distant past. Your post kicked me in the bu... uhmm... posterior and got me thinking out of the box!!! Now the issue for me is to research the best tools and apps that can do that.

      Many thanks and best regards,

      Dan.

      Comment


        #4
        After searching around, I found a bunch of expensive apps that will allow you to implement Windows Automation. Then I found the Microsoft "UI Automation Fundamentals" website:
        https://docs.microsoft.com/en-us/dot...n-fundamentals. If you're a Windows developer using Visual Studio, this should be relatively straight forward and inexpensive (other than your time, of course.

        This is webpage contains instructions, code snippets,
        and a video about getting the properties for all controls on an apps UI:
        http://executeautomation.com/blog/ge...coded-ui-test/. With this you can identify the NT controls you need to click, check, scroll, etc. and execute them from an NT script.

        Another tool is "Inspect.exe". It displays all of the properties of a particular control. It may already be on your system. Search the C: drive for "Inspect.exe". The run it and click on a control in NT. The results may be difficult to understand, but at least it's a start to provide NT UI Automation.

        Regards,

        Dan.

        Comment


          #5
          I reviewed AutoIT further and found this reference to a .NET version in their forum: https://www.autoitscript.com/forum/t...omment=1285615. Since I want to use a single language (C#) and a single development environment (Visual Studio), AutoIT May work out very well.

          Regards,

          Dan.

          Comment


            #6
            I was only trying to use it as an auto market replay downloader for NT7... there was one NT window I couldn't get details on, so I couldn't progress/gave up/lost interest. But it was very close.

            Comment


              #7
              Hello Dan,

              I am glad you have found some further input on the forums.

              As NinjaScripts are built on C#, nearly anything would be possible that can be written in the language. There are some limitations that we can provide support for when it comes to modifying the UI and assisting in solutions that we do not have documentation for.

              Nonetheless, we encourage discussion for these items among members of the forums. It should only be minded that if we do not have documentation, we cannot provide further direction as the internal implementation may be subject to change.

              If you have any questions regarding items that we have documented or if something can be done through supported NinjaScript code, please feel free to reach out.
              JimNinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_Jim View Post
                Hello Dan,

                I am glad you have found some further input on the forums.

                As NinjaScripts are built on C#, nearly anything would be possible that can be written in the language. There are some limitations that we can provide support for when it comes to modifying the UI and assisting in solutions that we do not have documentation for.

                Nonetheless, we encourage discussion for these items among members of the forums. It should only be minded that if we do not have documentation, we cannot provide further direction as the internal implementation may be subject to change.

                If you have any questions regarding items that we have documented or if something can be done through supported NinjaScript code, please feel free to reach out.
                Jim,

                Thanks for the feedback. I don't believe that there has been any discussion of users modifying the UI. The issues relate to certain limitations in the UI that the users want to work around.

                For example, it appears that there is no way to grammatically import a list symbols using a NinjaScript. It appears that you can execute a NinjaScript to a list AFTER it has been imported manually. It's the manual effort that I'm trying to reduce or eliminate. Think of it as automated typing and mouse clicks.

                I'm a data warehouse architect. Two of the most important topics in data warehousing systems are 1) the ability to break up complex processes into manageable pieces by caching the data 2) automate the process. The first allows you to audit the data and process it faster. The second reduces the daily grunt work. That's were I'm coming from with NinjaTrader.

                Regards,

                Dan.

                Comment


                  #9
                  I made my decision...

                  After much work trying to understand NT and how to automate the grunt work, I've concluded that it's a manual program with virtually no Process Automation to make my workflow easier. With almost everything I've tried, I've hit roadblock after roadblock. It's "click here", "select from this drop down", "type in this", I can't find ANY NinjaScript functions to make the workflow easier. I'm disappointed.

                  It would be wonderful to say that I found better. Unfortunately, I can't. The industry is focused on helping you automate your trades but has does little to help you create a smooth, fast workflow. Besides NT, I've tried MultiCharts, AmiBroker, Tradestation, ThinkOrSwim, Interactive Brokers, and a couple others that were completely forgettable. While some have very nice features, none have a better infrastructure for my goals than NinjaTrader.

                  By Friday, unless I find something else at the last minute, I'll buy a quarterly subscription to NT, a monthly subscription to IQFeed, and maybe the QCollector/IQFeed just to get started. Given that process automation will have to be via AutoIT, it will be a hack to make all this work. It's frustrating to waste time building workflow solutions that should be part of the software. Oh, well.

                  /Rant = OFF

                  Many thanks for all the help and guidance.

                  Regards,

                  Dan.

                  Comment


                    #10
                    Hello Dan,

                    There was a feature request submitted requesting UI automation through NinjaScript. That feature request is being tracked with ticket ID SFT-631.

                    I will submit a vote for you and share your feedback. Feature requests are up to the development team's priorities to consider implementing and we cannot offer an ETA. Filled feature requests can be found in the Release Notes section of the help guide.

                    Release Notes - https://ninjatrader.com/support/help...ease_notes.htm
                    JimNinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_Jim View Post
                      Hello Dan,

                      There was a feature request submitted requesting UI automation through NinjaScript. That feature request is being tracked with ticket ID SFT-631.

                      I will submit a vote for you and share your feedback. Feature requests are up to the development team's priorities to consider implementing and we cannot offer an ETA. Filled feature requests can be found in the Release Notes section of the help guide.

                      Release Notes - https://ninjatrader.com/support/help...ease_notes.htm
                      Jim,

                      Thanks for adding my name to the feature request. I believe that this feature request would be a significant competitive advantage for NT. After some intense analysis comparing NT to your competitors, I could find NONE that had any kind of process automation.

                      Adding these kinds of Ninja Script methods would make more complex analysis and trading feasible because it helps limit the grunt work involved in trading. Specific additions that I would like to see include:

                      - Ability to design and implement automatic, complex, multi-step analysis that could include intermediate datasets

                      - Ability to import and export symbol sets and analysis data to/from other tools like sophisticated statistical and AI tools

                      - Ability to create user interfaces to control a step-wise process

                      All charting/analysis vendors have many of the same marketing messages like "Really Fast!", "Automated trading!", "Great charting!", "Indicators!", blah, blah. But the day to day reality for us is typically, "Push button here", "select from list there", manual step after step. Some vendors a bit better. Some worse. But in the end, it's still a lot of manual work.

                      NT users are typically smart people. Please help us limit extraneous, manual work and let us focus on the analysis and trading.

                      Best Regards,

                      Dan.
                      Last edited by dan_public; 07-27-2017, 03:59 PM. Reason: typo

                      Comment


                        #12
                        I do something similar with my setup but the approach is different. I use Kinetick data, 500 symbol count, NT 8, and AutoHotKey.

                        For me AutoHotKey launches IB Gateway each morning entering the user/pass as NT isn't 100% reliable for auto starting it but starting gateway first then NT has always been reliable for me.

                        Then AutoHotKey launches NT, clicks over to the Strategies tab where the strategies from the previous day are still sitting, highlights them all, right clicks, and selects enable. Then AutoHotKey switches to the Positions tab and quits.

                        This has been running for more than 6 months now and thus far has worked 100% of the time. It just takes the time to automate the mouse movements. A word of advice though is that all this runs on a dedicated laptop with it's lid closed to prevent accidental touches that might move things out of place. So I use remote desktop from my main PC to do various things. Each day you'll want NT to shutdown with all the windows in the same place as they were when it started up or automated mouse clicks may be off the next day.

                        At the end of the day AutoHotKey shuts down NT, saving the workspace, exists out of gateway, and reboots the pc to be ready for the next day.

                        So for your setup:

                        1. Import a daily CSV symbol file into Market Analyzer (or whatever works as a temporary repository) and have the latest price and volume updated automatically for only those symbols.
                        Just do this process yourself once and write down on paper every click that you make. This will then be built in your AutoHotKey script and will be repeated each day at X time if using Task Scheduler or you can create a shortcut to run the script when you click it. I think to add a symbol list to the analyzer it should be added as an Instrument List first. Deleting yesterdays instrument list and creating a new one is just several more lines in AutoHotKey. Be sure to name the new list something that starts with say an A so that the list is always at the top of the various lists making clicking the top item easier.

                        2. Standard or custom indicators would run against this Market Analyzer list to identify specific symbols as potential high-probability trades.
                        Again, after creating the list use AutoHot key to open the analyzer, add the newly made instrument list, then add any desired indicators. The script could stop at this point and it would leave the analyzer on the screen ready for you to look at it and make your decisions so you could then manually open a chart and do etc.

                        3. These resulting target symbols (5-10/week) would then be charted manually and be setup for automatic or manual trade execution.
                        Nothing here to really automate.

                        Attached are a few scripts that I use to automate NT and also a strategy to send me periodic text messages while I'm away from the computer. Feel free to use them as a guide to script up your own custom stuff. After installing AutoHotKey and creating a script you can right click that script and compile it to an exe file so it's easier to be run from other applications as well.

                        Attachements:
                        DailyAlert.txt is code to create a NT strategy that you'll run on a symbol that you'll never buy/sell to automatically send periodic text messages to your phone or email address with info.
                        AutoHotKey Scripts.zip has 3 scripts 1) Start Gateway and login, 2) Start NT and enable strategies, 3) Close everything out and reboot.


                        Be sure to use the AU3_Spy.exe that comes with AutoHotKey to easily identify the X,Y positions for each mouse click needed. The AutoHotKey scripts attached only work for my setup and on whatever my laptops screen size is set too. Note I think I used Absolute positions in these scripts and not relative. You'll see that when you use AU3_Spy.
                        Attached Files

                        Comment


                          #13
                          Originally posted by antrux View Post
                          I do something similar with my setup but the approach is different. I use Kinetick data, 500 symbol count, NT 8, and AutoHotKey.

                          For me AutoHotKey launches IB Gateway each morning entering the user/pass as NT isn't 100% reliable for auto starting it but starting gateway first then NT has always been reliable for me.

                          Then AutoHotKey launches NT, clicks over to the Strategies tab where the strategies from the previous day are still sitting, highlights them all, right clicks, and selects enable. Then AutoHotKey switches to the Positions tab and quits.

                          This has been running for more than 6 months now and thus far has worked 100% of the time. It just takes the time to automate the mouse movements. A word of advice though is that all this runs on a dedicated laptop with it's lid closed to prevent accidental touches that might move things out of place. So I use remote desktop from my main PC to do various things. Each day you'll want NT to shutdown with all the windows in the same place as they were when it started up or automated mouse clicks may be off the next day.

                          At the end of the day AutoHotKey shuts down NT, saving the workspace, exists out of gateway, and reboots the pc to be ready for the next day.

                          So for your setup:

                          1. Import a daily CSV symbol file into Market Analyzer (or whatever works as a temporary repository) and have the latest price and volume updated automatically for only those symbols.
                          Just do this process yourself once and write down on paper every click that you make. This will then be built in your AutoHotKey script and will be repeated each day at X time if using Task Scheduler or you can create a shortcut to run the script when you click it. I think to add a symbol list to the analyzer it should be added as an Instrument List first. Deleting yesterdays instrument list and creating a new one is just several more lines in AutoHotKey. Be sure to name the new list something that starts with say an A so that the list is always at the top of the various lists making clicking the top item easier.

                          2. Standard or custom indicators would run against this Market Analyzer list to identify specific symbols as potential high-probability trades.
                          Again, after creating the list use AutoHot key to open the analyzer, add the newly made instrument list, then add any desired indicators. The script could stop at this point and it would leave the analyzer on the screen ready for you to look at it and make your decisions so you could then manually open a chart and do etc.

                          3. These resulting target symbols (5-10/week) would then be charted manually and be setup for automatic or manual trade execution.
                          Nothing here to really automate.

                          Attached are a few scripts that I use to automate NT and also a strategy to send me periodic text messages while I'm away from the computer. Feel free to use them as a guide to script up your own custom stuff. After installing AutoHotKey and creating a script you can right click that script and compile it to an exe file so it's easier to be run from other applications as well.

                          Attachements:
                          DailyAlert.txt is code to create a NT strategy that you'll run on a symbol that you'll never buy/sell to automatically send periodic text messages to your phone or email address with info.
                          AutoHotKey Scripts.zip has 3 scripts 1) Start Gateway and login, 2) Start NT and enable strategies, 3) Close everything out and reboot.


                          Be sure to use the AU3_Spy.exe that comes with AutoHotKey to easily identify the X,Y positions for each mouse click needed. The AutoHotKey scripts attached only work for my setup and on whatever my laptops screen size is set too. Note I think I used Absolute positions in these scripts and not relative. You'll see that when you use AU3_Spy.
                          Antrux,

                          Wow! Great post!!!

                          I need to dig into the post deeply tomorrow morning, but I have one question now: Why use IB Gateway rather than starting TWS? Is it more stable? (I'm getting random disconnects with the NT --> IB TWS connection.)

                          Many thanks,

                          Dan.
                          Last edited by dan_public; 07-28-2017, 09:35 PM.

                          Comment


                            #14
                            I was having several small issues between NT and IB so just as a test I installed Gateway over TWS. In the end NT had the bugs but I kept gateway as I found it simpler. TWS would give me random popup messages from time to time which would mess with my AutoHotKey scripts, I hated TWSs interface & never traded from it, and having not known what Gateway actually was before liked it better because its just an API only version of TWS. So less to account for, worry about, or chance for something to go wrong.

                            When I got in to all this I already knew that I didn't want to be a "trader" who is always reading up about companies and watching this number or that number. I just wanted to purely do technical trading and have a normal job. So writing a decent strategy was the first key but then it was not needing to monitor NT all day long while at work. So with AutoHotKey & Task Scheduler the laptop starts, does it's thing in the market, and restarts M-F and I never look at it unless I get an error email from NT. Then if I do just a simple remote desktop from my phone allows me to click ok on the error, maybe fix something, and disconnect. Remote Desktop is free but window RDP isn't very secure so if that is something you'd want in the future I'd recommend getting a router that runs OpenVPN first. Then you can install OpenVPN client on your phone then use the great windows RDP phone app for viewing. OpenVPN creates a secure connection between your phone/laptop and your homes router. Then RDP doesn't need to be as secure cause it then only uses the VPN.

                            It's been a great setup for a long while now. Just Friday morning I was over two hours away from the house and for whatever reason NT 8.0.8 wouldn't finish starting up and never connected to IB. So in 15 minutes on the phone I uninstalled 8.0.8 and reinstalled 8.0.7.1 when I got home it had made a little profit for the day.

                            Comment


                              #15
                              Originally posted by antrux View Post
                              I was having several small issues between NT and IB so just as a test I installed Gateway over TWS. In the end NT had the bugs but I kept gateway as I found it simpler. TWS would give me random popup messages from time to time which would mess with my AutoHotKey scripts, I hated TWSs interface & never traded from it, and having not known what Gateway actually was before liked it better because its just an API only version of TWS. So less to account for, worry about, or chance for something to go wrong.

                              When I got in to all this I already knew that I didn't want to be a "trader" who is always reading up about companies and watching this number or that number. I just wanted to purely do technical trading and have a normal job. So writing a decent strategy was the first key but then it was not needing to monitor NT all day long while at work. So with AutoHotKey & Task Scheduler the laptop starts, does it's thing in the market, and restarts M-F and I never look at it unless I get an error email from NT. Then if I do just a simple remote desktop from my phone allows me to click ok on the error, maybe fix something, and disconnect. Remote Desktop is free but window RDP isn't very secure so if that is something you'd want in the future I'd recommend getting a router that runs OpenVPN first. Then you can install OpenVPN client on your phone then use the great windows RDP phone app for viewing. OpenVPN creates a secure connection between your phone/laptop and your homes router. Then RDP doesn't need to be as secure cause it then only uses the VPN.

                              It's been a great setup for a long while now. Just Friday morning I was over two hours away from the house and for whatever reason NT 8.0.8 wouldn't finish starting up and never connected to IB. So in 15 minutes on the phone I uninstalled 8.0.8 and reinstalled 8.0.7.1 when I got home it had made a little profit for the day.
                              Antrux,

                              Great stuff! Your pearls of wisdom keep flowing:

                              When I got in to all this I already knew that I didn't want to be a "trader" who is always reading up about companies and watching this number or that number. I just wanted to purely do technical trading and have a normal job.
                              This describes me exactly. I'm not a "trader", but I am a pretty good analyst and software developer. I.e. I can define and find a good trade, but lack the "pull the trigger" talent that good traders possess. Besides reducing the administrivia of trading, automated analysis and trading helps overcome my lack of "trader" instincts.

                              Many thanks for this feedback. This is logged in my OneNote "Trading Tips And Tips" folder.

                              Best regards,

                              Dan.

                              p.s. I still have to get moving for the day and study your posts throughly.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by algospoke, Yesterday, 06:40 PM
                              2 responses
                              23 views
                              0 likes
                              Last Post algospoke  
                              Started by ghoul, Today, 06:02 PM
                              3 responses
                              14 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by jeronymite, 04-12-2024, 04:26 PM
                              3 responses
                              45 views
                              0 likes
                              Last Post jeronymite  
                              Started by Barry Milan, Yesterday, 10:35 PM
                              7 responses
                              21 views
                              0 likes
                              Last Post NinjaTrader_Manfred  
                              Started by AttiM, 02-14-2024, 05:20 PM
                              10 responses
                              181 views
                              0 likes
                              Last Post jeronymite  
                              Working...
                              X