We have a custom NinjaScript framework and 3 Functioning Strategies--Where to next?
This is a follow up to the previous update post on February 13th. I go into more detail about where HGT plans to go next.
I published the first post here back in late November. Since then, we have created an evolving framework for custom NinjaScript (NS) strategies and added three functioning strategies to our library. One of those strategies (9X) is performing quite well in a forward test. The HGT newsletter is young, but it is moving along nicely. I have you (my subscribers) to thank for that.
The following post is a loose roadmap of the projects I want to take on with HGT. It represents where I am currently and how I view this project. I am also trying to bring as much value to the community as possible. If you have any ideas, topics, or strategies that you would like me to discuss/research/develop, I am always open to ideas.
Disclaimer: the following post is an organized representation of my research and project notes. It doesn’t represent any type of advice, financial or otherwise. Its purpose is to be informative and educational. Backtest results are based on historical data, not real-time data. There is no guarantee that these hypothetical results will continue in the future. Day trading is extremely risky, and I do not suggest running any of these strategies live.
This post is for all subscribers. It may contain references or links to posts that are only available to paid subscribers. Paid subscribers will have access to the private GitHub where all the Hunt Gather Code and strategies live. It is continuously being worked on and will expand as we explore the world of automated trade systems.
Strategy Development
I will continue to convert the Twilight Strategies into our custom framework and publish them on Substack at least monthly. There are 13 strategies on this list, so there will be continuous strategy releases for some time. For the time being, these strategies will be the focus.
Strategy X was a surprise release. I plan to update this strategy as we move forward. I will create a second variation that uses the extra entry criteria. Eventually, we will create two variations of the original strategy. That way, we can compare the results of the strategies and see if there are any other opportunities for trading with these signals.
Strategy 44X needs to be refactored to fit into the new framework. All of its code resides inside the strategy file, so it should still function. When I refactor it, I am going to remove any extra criteria that I added when initially researching the strategy, bringing the signal criteria back to the original state defined by Automated Trading Strategies.
The signal model needs to be updated to consider exit signals. This will require changing how it delivers its signals (probably from an integer to an enum) and updating all related execution models.
QuantConnect for Backtesting and Research
I plan to incorporate the QuantConnect (QC) framework and cloud for future backtesting and strategy research. This will be a slow process. I do not intend to replace NinjaTrader (NT), as I also use it for my manual trading. Instead, QC will be another addition to what we are currently doing. Since QC has a C# library, I will likely continue using C# for my strategy research and backtesting. If I find myself using Python, I will provide code for both variations.
Similar to our current codebase, any code for QC will be added to GitHub in its own repo. I will also experiment with different ways of delivering backtest results to the community. It looks like there are a couple of options here. One option might make it possible for readers to view and interact with the backtest results in the web browser. I will know more about this once I dive into developing with QC in earnest.
I would also like to point out that I have no affiliation with QC. I researched a lot of different platforms and solutions (like the home server) before deciding that this would be the best route to making our backtest results more reliable. The QC service provides me with data and cloud compute nodes to offload research and backtesting from my local machine. The LEAN framework is open source, robust, and has good documentation. It also allows me the ability to develop locally so I can keep my precious terminal-centric workflow.
Home Server Lab
Originally, I was going to create a home server lab. The purpose of this lab was to be able to run continuous forward tests to solve the issue of running forward tests on NT with my local machine and taking up precious RAM/CPU with backtesting. A home server has a lot of different use cases, many of which are beneficial. However, I intend to use QC to solve the issues with research and backtesting on my local machine. I do not know if I will use QC for the forward tests, but I am currently searching for a way to run them and have the results accessible to the community in real-time.
For now, this project has been delayed until I know exactly how I will run simulations of these strategies. QC offers live nodes, but they have a cost, and I can only have two live nodes with the researcher’s seat at QC. I will reserve that method for the most promising strategies. In the meantime, I may use an old laptop or mini-pc to run NT and forward test our strategies.
Improving the Manual Trading Experience in NinjaTrader
I use NT for my manual day trading. I have used several different platforms for day trading (TradingView, DAS Trader), but I (obviously) like NT. It has all the functions I want and the ability to create anything it doesn’t have. I want to take some time to work on a few projects that might improve the day trading experience in NT.
I want to look at the NT Market Analyzer tool and see if I can customize some columns to display information that would be useful to me when I am trading. I am considering converting some of the strategies we develop into indicators for the Market Analyzer. The idea is that you can use the signals from specific strategies in confluence with your manual trading strategy.
I also want to create some hotkeys for order functions and code some functional Automatic Trade Management (ATM) strategies that I can use with my order entries and functions. The idea is that I can plan my trades with my chart analysis, monitor the market trends with the Market Analyzer, and then, when I trigger an entry order, have an ATM set the SL and TP automatically, based on some criteria I program into the ATM strategy.
Conclusion
I will continue to provide strategies for NT in our custom NS framework. The addition of QC will be to improve our backtest reliability. This means that I don’t have to build a home server yet. While it doesn’t solve all the problems, it solves enough for the time being. Running a continuous forward test of strategies will be something I hope to solve in the not-so-distant future.
Several refactoring projects need to be completed before the next strategies (after this week’s) can be developed. The next one drops at the end of this week. Once I have finished testing it, I will merge the branch onto GitHub. Paid subscribers will likely have access to the code for the strategy 24-48 hours before the post is published. After it is merged, I will begin working on the signal model changes.
In March, expect a Twilight Strategy and updates to Strategy X. I will keep subscribers updated on any forward tests I have in progress. If all goes well, I may publish an article or two about setting up and developing QC strategies via the Lean CLI. I plan to work on improving my manual trading experience in NT throughout the rest of February and March. I will publish articles about this process to document the process. Assuming the enhancements are possible, that is.
Thank you for reading and thank you for subscribing. Many posts I have planned for the coming weeks will be for paid subscribers. I will continue to try to provide at least one free article a month. Most of those articles will be informative or be an update article like this one. If there are any subjects that you (free or paid subscribers) would like to see researched and discussed, feel free to contact me via e-mail.
The code for strategies and the custom functions/framework I use for strategy development in NinjaScript can be found at the Hunt Gather Trade GitHub. This code repository will house all code related to articles and strategy development. If there are any paid subscribers without access, please contact me via e-mail. I do my best to invite members quickly after they subscribe. That being said, please try to make sure the e-mail you use with Substack is the e-mail associated with GitHub. It is difficult to track members otherwise.
Feel free to comment below or e-mail me if you need help with anything, wish to criticize, or have thoughts on improvements. Paid subscribers can access this code and more at the private HGT GitHub repo. As always, this newsletter represents refined versions of my research notes. That means these notes are plastic. There could be mistakes or better ways to accomplish what I am trying to do. Nothing is perfect, and I always look for ways to improve my techniques.