How I Used AI To Build A Trading Bot

Share

Summary

This video explores the feasibility of automating a trading strategy using AI, specifically to pass an Apex Trader evaluation. The creator sets up a Mac Mini with Parallels and Windows 11 to run Ninja Trader, using Apex 50K account parameters. They then use ChatGPT to generate a NinjaScript for an opening range breakout (ORB) scalping strategy for NASDAQ futures, incrementally refining the strategy based on AI feedback. The bot is put to the test, and the video concludes by analyzing its performance and discussing the challenges and realities of automated trading for individual traders.

Highlights

Setting Up for Automated Trading
00:00:00

The video begins by addressing the common desire to automate trading strategies and questions whether AI can be used to code a strategy that can pass an Apex Trader evaluation. The creator details the setup process, which involves using a Mac Mini, Parallels, and Windows 11 to run Ninja Trader in C# (NinjaScript), as Ninja Trader is PC-only. This workaround allows the automated strategy to run continuously in the background.

Defining Trading Parameters and Goals
00:01:32

The creator decides to mimic the Apex 50K account parameters for the automated bot, which include a $3,000 profit target and a $2,500 trailing drawdown. This provides a familiar and realistic framework for the bot's performance. They also briefly explain the benefits of prop firms for traders, offering capital after a successful evaluation.

Generating the Strategy with ChatGPT
00:03:30

The video transitions to using ChatGPT to develop the trading strategy. The creator asks for the best scalping strategy for NASDAQ futures, leading to a suggestion of an 'opening range plus momentum continuation with time filter VWAP bias, hard daily loss limit, no trading after midday.' This is refined into an Opening Range Breakout (ORB) system, restricting trading to 8:30 AM to midday Central Time, with a maximum risk of 25 points per trade and a target of 10-15 points.

Refining the AI-Generated Code
00:08:52

The creator further refines the strategy by asking ChatGPT to incorporate a 15-minute opening range, allow for three trades per day, and apply a chop filter (which is later removed due to concerns about its width). They also decide to remove the trailing stop and aim for a 10-point winner on each trade. The final generated NinjaScript code is then copied and compiled into Ninja Trader.

Testing the Automated Bot and Day 1 Results
00:10:50

The compiled strategy, named 'TBM bot strategy,' is activated in Ninja Trader with the defined parameters. The video shows the bot in action, with trades being placed and filled. On its first day of trading, the bot takes one trade, earning a $200 profit. This initial success is noted, with the creator highlighting that the market's trendy nature limited the trades.

Final Outcome and Reflection on Automated Trading
00:17:16

The video concludes with an update on the bot's performance: it blew up the account after about a week due to being left enabled during the creator's vacation. The creator reflects on the experiment, noting that he should have asked the AI for optimal take-profit and stop-loss levels rather than designating his own. He concludes that for the average individual, discretionary trading is more viable than relying on automated bots, as market conditions constantly change requiring continuous updates. He opens the possibility for a part two if viewers are interested.

Recently Summarized Articles

Loading...