In this video, we build a trading strategy that simulates end of day and intraday stop losses to find out which method is more profitable. We also touch on the important behavioral considerations you'll want to think about when deciding between the two. Enjoy!
Beyond the Charts is a series from the Trade Risk that seeks to answer new behavioral questions about the stock market every month. All of the episodes are recorded on the Trade Risk's YouTube channel where we code up our experiments live with commentary and explanations. You can watch this episode here:
All of the code is written in C# and built for the free NinjaTrader backtesting engine. If you want maintain the same folder structures as our demo with zero code editing, complete the following steps:
1. Navigate to your NinjaTrader local file directory Strategies folder: /Documents/NinjaTrader 8/bin/Custom/Strategies/
2. Create a folder /BeyondTheCharts within /Strategies/
3. Checkout Ep001.cs
4. Copy to /Documents/NinjaTrader 8/bin/Custom/Strategies/BeyondTheCharts/
5. Launch NinjaTrader
6. Open NinjaScript Editor
7. Open NinjaScript Explorer on the right hand side
8. Select BeyondTheCharts folder and double click Ep001
9. Compile the code.
10. You are now ready to test the strategy using StrategyAnalyzer
Alternatively you can go directly into NinjaTrader, launch the Strategy Builder, unlock code, copy in our Ep001.cs and update your namespace accordingly.
Due to data useage restriction agreements we cannot publish the historical stock market data we used in this experiment. Our source and recommendation for stock market data is Norgate. For alternative free sources, consider Tiingo or Yahoo.
Please be advised nothing here should be considered investment advice. The Trade Risk is not a registered financial advisor and is not recommending the purchase or selling of any securities or investment strategies. Please review our disclaimer which applies to the contents of this repository.
If you would like to reach us, please use the contact page on our website.