If you want to actually use AI the right way in trading, it starts with better prompts.
Below are the prompt templates pulled from the workflow examples we created, organized by practice so you can copy, paste, and adapt them for your own trading process.
Practice #1: Custom Alerts
TradingView (Pine Script)
Build a TradingView Pine Script v5 indicator and alert that triggers when ALL of these conditions are met:
1. Price breaks above the 30-minute opening range high
- Opening range = 9:30 AM to 10:00 AM EST
- Breakout = close above the high of this range
2. Current bar volume is at least 1.5x the average volume of the opening 30-minute range
3. Price is currently above VWAP
4. It's within the first 2 hours of the regular session (before 11:30 AM EST)
VISUAL REQUIREMENTS:
- Draw a horizontal line showing the opening range high
- Mark the breakout bar with a green triangle above the bar
- Add a background color (light green) when all conditions are met
ALERT REQUIREMENTS:
- Create an alert condition that fires once per bar when conditions are met
- Alert message should include: Symbol, Price, Time
Make the code clean and well-commented.
Refinement Prompt
Update the script:
Only trigger the alert if the breakout bar closes in the top 50% of its range.
This confirms strong buying pressure on the breakout.
ThinkorSwim (ThinkScript)
Build a ThinkScript study for ThinkorSwim that creates an alert when:
1. Price breaks above the 30-minute opening range high
- Opening range = first 30 minutes after market open (9:30-10:00 AM EST)
- Breakout = close above the high of this range
2. Current bar volume is at least 1.5x the average volume of the opening range
3. Price is above VWAP
4. Time is within first 2 hours of session (before 11:30 AM EST)
REQUIREMENTS:
- Add a horizontal line showing the OR high
- Use AddLabel to show when conditions are met
- Include an alert trigger
- Make it work on 1-minute, 5-minute, and 15-minute charts
Provide clean, commented thinkScript code.
Practice #2: Pre-Market Game Plan Automation
Analyze this watchlist for today's trading session.
WATCHLIST: TSLA, NVDA, AMD, META, AAPL, GOOGL, MSFT, AMZN
OVERNIGHT NEWS/CATALYSTS:
[Paste any relevant headlines from your news source]
- NVDA: Earnings report after close yesterday, beat estimates
- TSLA: CEO commented on production targets
- AMD: Analyst upgrade from JPM
- META: No significant news
[etc.]
PRE-MARKET DATA (as of 9:00 AM EST):
Symbol | Price | Change | Volume | Key Levels
TSLA | $245.30 | +2.1% | High volume | R: $248, S: $242
NVDA | $892.50 | +3.8% | Very high | R: $900, S: $885
AMD | $178.20 | +1.2% | Average | R: $180, S: $175
META | $485.60 | -0.3% | Low | R: $490, S: $482
[etc.]
FOR EACH STOCK, PROVIDE:
1. Key catalyst or news driver (if any)
2. Pre-market price action assessment (strength/weakness, volume)
3. Key levels to watch (support/resistance from the data above)
4. Setup potential (which patterns might develop: ORB, VWAP bounce, momentum continuation, etc.)
5. Priority ranking (High/Medium/Low) based on setup quality + catalyst strength
OUTPUT FORMAT:
Provide as a clean table with one row per stock, sorted by priority (High first).
Then provide 2-3 sentences of overall market context at the bottom.
Practice #3: Custom Trade Journal / Performance Analysis
Build me a Python script that analyzes my trading performance.
INPUT:
- Import CSV file from TD Ameritrade (or any broker)
- Required columns: Symbol, Entry Date, Entry Time, Entry Price, Exit Date, Exit Time, Exit Price, Shares, P&L
- I'll manually add a "Setup Type" column (ORB, VWAP Bounce, Momentum, etc.)
ANALYSIS TO PERFORM:
1. Overall Statistics:
- Total trades, Winners, Losers, Win Rate
- Average Win, Average Loss, Expectancy
- Largest Win, Largest Loss
- Total P&L, Average P&L per trade
2. Performance by Setup Type:
- Win rate for each setup
- Average win/loss for each setup
- Total P&L by setup
- Number of trades per setup
3. Performance by Time of Day:
- Break trading day into hourly blocks: 9:30-10:30, 10:30-11:30, 11:30-12:30, 12:30-1:30, 1:30-2:30, 2:30-4:00
- For each block: Win rate, Avg Win, Avg Loss, Total P&L, Number of trades
4. Performance by Day of Week:
- Same metrics broken down Monday through Friday
5. Pattern Detection:
- Identify best performing hour
- Identify worst performing hour
- Identify best performing setup
- Identify worst performing setup
- Flag any time periods where I'm consistently losing
OUTPUT:
- Display results as clean formatted tables
- Generate a written summary highlighting key patterns
- Provide specific recommendations based on the data
TECHNICAL REQUIREMENTS:
- Use pandas for data analysis
- Make it easy to run (simple command line: python analyze_trades.py)
- Include error handling for missing data
- Add comments explaining each section
Make this something I can run weekly on my latest trades.
Practice #4: Custom Order Entry / Exit Logic
TradingView Version
Write a TradingView Pine Script v5 strategy that implements a 2-bar trailing stop.
ENTRY:
- Strategy will use strategy.entry() for long positions
- User can manually define entry conditions or I'll enter on simple MA cross for demo
STOP LOSS LOGIC:
- Initial stop: Lowest low of the past 2 bars at time of entry
- Trailing mechanism:
* Every time price makes a new 2-bar high (current high > high of past 2 bars)
* Move stop to the lowest low of the past 2 bars
* Stop only moves UP, never down
- Exit when stop is hit using strategy.exit()
VISUAL REQUIREMENTS:
- Plot the stop line on the chart
- Color coding: Red when initially set, Green when trailing (has moved up at least once)
- Show entry points with a triangle marker
- Show exit points with a square marker
SETTINGS:
- Make the lookback period (2 bars) adjustable via input
- Add option to show/hide the stop line
Provide clean, well-commented code suitable for backtesting.
ThinkorSwim Version
Write a ThinkScript strategy for ThinkorSwim that implements a 2-bar trailing stop for long positions.
REQUIREMENTS:
1. Entry Logic:
- Use a simple moving average crossover as entry trigger (50 SMA crosses above 200 SMA)
- Or allow manual entry if user prefers
2. Stop Loss Logic:
- Initial stop = Lowest low of past 2 bars at entry
- Trailing: When price makes new 2-bar high, move stop to lowest low of past 2 bars
- Stop only moves up, never down
- Exit when price hits stop
3. Visual Elements:
- Plot stop level line on chart
- Color: Red initially, Green after first trail
- Mark entries and exits on chart
- Add label showing current stop price
4. Settings:
- Adjustable lookback period (default 2)
- Option to enable/disable strategy
Provide clean thinkScript code with comments.
Practice #5: AI Trade Autopsy
Analyze this trade. I'm attaching a chart screenshot.
SETUP DETAILS:
- Setup Type: Opening Range Breakout
- Stock: TSLA
- Date: [Today's date]
- Entry: $245.80 (broke above 30-min high of $245.50)
- Planned Exit: First 5-min bar closing in bottom 25% of range
- Planned Stop: $242.00 (30-min low)
- Actual Exit: $244.20 (took loss before stop was hit)
ENTRY RULES (My playbook):
- Break of 30-min high
- Volume 1.5x average on breakout bar
- Price above VWAP
EXIT RULES (My playbook):
- Exit on first 5-min bar that closes in bottom 25% of its range
- OR stop loss at 30-min low
CONTEXT:
- I entered when price broke $245.50 on volume
- I was planning to hold for the first weak bar
- Instead, I exited at $244.20 because I "felt" it was rolling over
- My stop was still at $242.00, so I exited before it was hit
- This was my 3rd trade of the day (first two were losers)
QUESTIONS:
1. Did my entry meet my rules? Was it clean?
2. Did I follow my exit plan? If not, what did I violate?
3. Based on the chart, what pattern am I showing here?
4. What should I focus on improving?
5. If you were coaching me, what would you tell me about this trade?
The Prompt Pattern Behind All of These
The reason these prompts work is because they all follow the same structure:
- Clear objective
- Explicit rules and logic
- Structured inputs
- Defined output format
- Constraints and formatting requirements
In other words, the better you describe what you want, the better the AI can build it.
Final Thought
AI is not here to replace your thinking.
It is here to remove the bottlenecks that slow down your preparation, your review process, your execution, and your ability to build custom trading infrastructure. If you use it correctly, you can create tools in minutes that would have taken weeks or months to build on your own.

