Trading Rules

How to Use AI to Level Up Your Trading

These are the exact prompts I use to build watchlists, audit my P&L, and optimize my strategy with Claude, Codex, and TradingView. Copy them, paste them, tweak them for your own trading. No coding required.

Every week someone asks me to “find me a winning stock” or “code me a strategy that turns my account 3x.” That is exactly how not to use AI. You will get generic, average results at best.

Here is what actually works: you already have a process, and AI helps you run it faster. It builds your watchlist, audits your real trades, finds your hidden leaks, and pressure-tests your rules against your own data. Below are the 8 prompts I walked through in my AI masterclass, organized from beginner to advanced.

Key takeaways

  • Garbage in, garbage out. Specific context and data get you tailored, quality answers. Vague prompts get you nothing useful.
  • Three levels of AI use: Trading Assistant (research), Performance Auditor (know your real edge), Edge Optimizer (refine your rules with data).
  • AI will not make you profitable. You bring the process and setups. AI optimizes and saves you time.

Table of Contents

  1. The right (and wrong) way to use AI for trading
  2. Level 1: Your AI trading assistant
  3. Level 2: The AI performance auditor
  4. Level 3: The AI edge optimizer
  5. The AI tools and data APIs I use
  6. FAQ

The Right (and Wrong) Way to Use AI for Trading

Garbage in, garbage out

These are the prompts that get you nowhere:

  • “Find me a winning stock”
  • “Code me a winning strategy”
  • “What setup do I trade today?”
  • “Trade my account and turn it 3x”

The better way is to feed the AI proficient input. Instead of “find me a stock,” you say: “I research the top 10 gainers plus their catalyst every morning to build my watchlist. How do I automate that and save time?” Instead of “code me a strategy,” you say: “I have a strategy with defined rules. Help me turn it into a Python script that triggers autonomously.”

See the difference? You bring your own process and setup. AI simply helps you optimize and save time. It will not magically make you profitable. Specific context and data in equals tailored, quality results out.

The 3 levels of AI use for traders

  • Level 1, Trading Assistant / Analyst: summarize earnings, basic stock research, automate your premarket watchlist, deep thesis research. Best for beginners.
  • Level 2, Performance Auditor: winners vs losers analysis, strategy deep dive, custom P&L dashboard. Best for beginner to intermediate.
  • Level 3, Edge Optimizer: refine your strategy, reconstruct your setups, backtest and forward test. Best for intermediate to advanced.

Level 1: Your AI Trading Assistant

This is the entry point: using AI for charting, research, and premarket prep. I run a lot of this through TradingView’s AI Copilot (called Remix, available on the $15/mo plan) and through Claude and Codex for anything I want automated.

Prompt 1: Swing ticker and catalyst screener

The key here is giving it specific criteria and technical indicators, not just a vibe. This is the difference between a generic answer and a real screen.

I'm looking for swing ideas in cybersecurity stocks. Give me the top 10 liquid momentum movers in that space, plus their most recent catalyst and earnings date.

My filters are:
- Above the 200-day SMA (daily)
- RVOL greater than 1.5
- Market cap greater than $2B

Return it as a table sorted by setup quality, and flag any names with earnings in the next two weeks.

Swap “cybersecurity” for any sector, and change the filters to match your own strategy.

Prompt 2: Weekly watchlist recap

Perfect for a Sunday routine. It turns a pile of tickers into a clean “what happened and why” brief.

Summarize last week's performance and the major technical or fundamental catalysts for the stocks in my watchlist. For each name give me: the weekly percent move, RVOL, the specific catalyst with its date, the key technical level to watch, and one risk. End with the top 3 setups going into next week.

Bonus: more TradingView Copilot one-liners

Once you connect Copilot to your workflow, these quick prompts do a lot of heavy lifting:

  • Premarket prep: “Show me the top 10 momentum movers this morning with volume over 2x baseline and an opening range between 0.5-2%. Rank by setup quality.”
  • Multi-timeframe check: “For [ticker], check alignment across 1m/5m for the day trend and daily/weekly for the swing trend. Flag RSI divergences and whether price is in premium or discount vs the daily range.”
  • Post-session review: “How did my opening-range setups perform today? Pull the day’s bars, check which symbols triggered my criteria, and tell me my hit rate.”

Prompt 3: Build your own automated premarket report

This is where it gets fun. You describe your exact filters and rules to Claude or Codex, connect a market data source (free ones like Yahoo Finance, or a paid API), and it writes a Python script that scans the market every morning and hands you a finished watchlist. You can even turn it into a scheduled skill that emails you the report daily.

The secret is being extremely specific about your criteria. Here is the format I use, with my own two watchlists as the example:



Build me an automated premarket report. Pull premarket gappers, economic events, analyst upgrades, and options flow from free sources (Yahoo Finance, an economic calendar), then filter for the watchlists below and output a clean report I can read at 8:45am ET. Write it as a Python script I can schedule to run every morning.

DAY TRADING WATCHLIST (all required, premarket):
- Gap greater than 3% vs previous close
- Price greater than $3
- Market cap greater than $1B
- Premarket RVOL greater than 1.5
- Price breaking above yesterday's high

SWING WATCHLIST (all required):
- Gap greater than or equal to 8%
- Price greater than $3
- Open above yesterday's high AND above the 200-day SMA
- Market cap greater than or equal to $800M
- A real catalyst: earnings on the gap day, or news with no earnings

For each qualifying ticker, show: ticker, gap %, price, the catalyst headline, and which watchlist it hit.

Replace my filters with your own. The whole point is that it runs your strategy, not mine.


Level 2: The AI Performance Auditor

This is the level most traders skip, and it is the most valuable. You cannot optimize an edge you have never measured. All you need is your broker’s trade export (IBKR calls it an Activity Statement CSV) dropped into Claude. Three prompts take you from a messy CSV to a full analytics dashboard.

Prompt 4: The basic P&L audit

Start here. This rebuilds your real completed trades and checks its own math against your broker’s totals before it tells you anything, so you can trust the numbers.



Here is my broker trade export (CSV) for this year. Analyze my real trading performance:

1. First check the file is readable and tell me what date range and how many order rows it contains. Then verify your totals match the broker's own realized P&L summary before showing me anything.

2. Rebuild my COMPLETED trades (round trips) by matching buys and sells per symbol. A trade that scaled in/out over many fills counts as ONE trade. Ignore positions that are still open, completed trades only.

3. Then show me:
- Total realized P&L, number of trades, win rate per completed trade
- Average win vs average loss
- My biggest winning trade and biggest losing trade (with dates and how many fills each took)
- My best and worst stocks by total P&L
- My best and worst single days

4. Split all completed trades by holding period: closed same day, closed next day (overnight), held multi-day. For each bucket: number of trades, total P&L, win rate.

What mine came back with: +$214,494 realized on 392 fills across 26 stocks, 61% win rate, average win 2.3x the average loss. The kicker: the overnight bucket had a 78% win rate, and the held trades (a quarter of all trades) produced about 80% of the profit. That one split changed how I trade.

Prompt 5: The strategy deep dive

Once the basic audit is done, go deeper. This is a full trading-journal breakdown that surfaces your hidden leaks: the specific conditions where you consistently give money back.



Using the same completed-trades data from my broker CSV, go deeper. I want a trading-journal-style breakdown:

1. Strategy-level stats for every cut: win rate, profit factor, and expectancy per trade (not just total P&L). Cut it by:
- Long vs short
- Holding period (same-day / overnight / multi-day)
- Day of week I ENTERED the trade
- Time of day I entered (9:30-10, 10-11, 11-2, after 2pm)

2. A performance calendar view: green days vs red days, my longest green and red streaks, and the max drawdown on my cumulative P&L curve (with the dates it happened).

3. Overtrading check: compare my P&L on days I traded 1-2 tickers vs 3 vs 4+. Am I worse when I juggle more names?

4. Discipline check: do my winners and losers differ in average position size or average hold time? What % of my profit came from my top 5 trades? Longest losing streak?

5. Finish with a "hidden leaks" list: the 3-5 specific conditions where I consistently lose money, with the dollar amounts.

6. Then look at what my top losing trades/stocks have in common (technical indicators, volume, ADR, float, news, sector, price, volatility, RSI, range), and the same for my top winning trades/stocks. Tell me what kind of stocks I should focus on, how to screen for them, and which to avoid.

What it exposed for me: my long swing trades made the money, my short-selling (especially overnight) was the leak. And the single cleanest filter: stocks with ADR over 6% made +$280K, while ADR under 4% lost me money. Now I have a hard rule around it.

Prompt 6: Turn your CSV into a P&L dashboard

The finale of the audit. This connects your trades to market data and builds one self-contained HTML dashboard with your equity curve, calendar, edge profile, and every breakdown on a single page. It works offline, no external libraries.



Now connect my trades to market data (use yfinance, or my market data API if I have one configured) and profile my edge.

Then build me a single self-contained HTML dashboard file showcasing all of it: headline KPIs (P&L, win rate, profit factor, expectancy, max drawdown), a WEEKLY cumulative equity curve, a daily performance calendar, the holding-period / day-of-week / entry-time / regime breakdowns, best & worst stocks, the winners-vs-losers edge profile, the hidden leaks, and my focus/avoid screens. Dark theme, hover tooltips, no external libraries, works offline. Put each finding as a one-line takeaway under its chart.

Why the market data API matters

For the basic audit, your CSV is enough. But to profile winners vs losers (what the market was doing, what the stock’s ADR and RVOL looked like at entry) the AI needs a market data source. Free options: Alpaca, Yahoo Finance, Moomoo API, IBKR. Paid: Massive (formerly Polygon) at $29/mo, which is what I use for penny-accurate history.


Level 3: The AI Edge Optimizer

The advanced level. Now that you know your real edge from the audit, you feed the AI your written strategy rules and have it stress-test every single one against your own trade history plus historical market data. It tells you which rules to keep, tighten, loosen, or add, with a number justifying each change.

Prompt 7: Define and refine your strategy rules

Here is the exact prompt, using my swing strategy as the example. Replace the setup section with your own rules.



Here are my written swing strategy rules.

SETUP:
- Market leader breaking out to new highs, within 25% of its 52-week high
- Above its 200-day moving average
- ADR between 4-8% (I avoid the hyper-volatile names on swings)
- Liquid names only ($50M+ traded per day)
ENTRY:
- The breakout over the recent high
EXITS:
- Wide stop, hold for weeks, let the runner work

Now optimize these against the evidence:

1. Test each rule against my audited trades: which rules does my own data support, and which does it contradict?
2. Settle the exit question with data: intraday close vs overnight close, which one actually made me money?
3. Use market data to check each rule at my entry dates (gap size, ADR, extension from the 8-EMA, market regime that day).
4. Tell me: rules to KEEP as-is, rules to TIGHTEN or LOOSEN (with the number that justifies it), and rules I'm MISSING that the data says should exist.
5. Output the revised rulebook, one page, every change traced to a number.

What survived for me: the AI tested all my rules against my real trades and mechanically across 598 tickers. Only one change actually held up: enforcing the ADR 4% floor I already had written turned +$172,002 into +$230,858 and my win rate from 57% to 75%. One “improvement” I was tempted by got tested and killed. That is the whole point: let the data, not your ego, decide.


5. The AI Tools and Data APIs I Use

Research and charting

  • TradingView AI Copilot (Remix): in beta, on the lowest plan ($15/mo). Great for research inside your watchlist. Still weak on giving specific setups, and no automation yet.
  • Claude and Codex: my workhorses for automating premarket reports, auditing trades, and optimizing strategy.

Broker connectors and trading APIs

  • Official IBKR + Claude connector: uses your account data as context, suggests risk and share size, does market research, and can prepare orders. It cannot send orders to the market for you.
  • Clear Street OMNI API: soft-launched, US only for now (Canada coming). Built for day traders, like having a broker on your shoulder. Auto-calculates risk and share size, reads SEC filings, and stages complex orders you describe in plain English.

Market data

  • Free (with limitations): Alpaca, Yahoo Finance, Moomoo API, IBKR.
  • Paid: Massive (formerly Polygon), $29/mo, for accurate historical and live candlesticks, quotes, and indicators.

Want the full walkthrough? I break down my entire 8:45am Claude + Codex premarket routine on YouTube, step by step: I Replaced My 6AM Premarket Routine with AI


Frequently Asked Questions

Can AI make me a profitable trader?

No. AI will not magically make you profitable. You need your own process and setups first. AI is a tool that helps you optimize your existing edge, audit your results, and automate research so you save time. Garbage in, garbage out.

Which AI tools are best for trading?

For research and automation I use Claude and Codex. For charting I use TradingView’s AI Copilot (Remix). Other tools worth exploring are the official IBKR + Claude connector and the Clear Street OMNI trading API. Which one fits depends on whether you want research, auditing, or order staging.

What data do I need to audit my trading with AI?

Just your broker trade export. IBKR calls it an Activity Statement CSV. Drop that file into Claude and it can rebuild your completed round-trip trades and calculate your real win rate, profit factor, and expectancy. To profile winners vs losers you add a market data API like yfinance (free) or Massive ($29/mo).

Do I need to know how to code to use AI for trading?

No. Every prompt in this guide is plain English. The AI writes any Python or HTML for you. You describe your rules and your data in natural language, and it handles the technical part.

Can AI place trades for me?

Tools like the IBKR + Claude connector can prepare and stage orders, but they cannot send orders to the market for you. Clear Street’s OMNI API can stage complex orders from natural language. You still pull the trigger. Treat AI as an assistant, not an autopilot.


Disclaimer: Trading involves substantial risk and may not be suitable for all traders. You can lose some or all of your invested capital. The information shared here is for educational purposes only and reflects my personal opinions, experiences, and trading strategies. It should not be considered financial, investment, legal, or tax advice. Past performance does not guarantee future results. Any trading results or performance examples shared are not typical and should not be expected or relied upon as an indication of future success. Individual results will vary, and simply following or copying my trades or strategies does not guarantee similar outcomes. Always do your own research and make your own investment decisions.

The post How to Use AI to Level Up Your Trading appeared first on Humbled Trader.

admin

You may also like