🧠 Pillar Tutorial

5 AI Prompts Every SA Trader Should Know (2026)

By Dan Machado · 12 min read · Production-tested prompts

You have ChatGPT or Claude open. Now what? Most traders waste hours typing vague requests and getting mediocre responses. These 5 prompts have been tested on dozens of trading scenarios and consistently produce useful output. Copy them, modify the brackets, paste them. Save them in a Google Doc — these become your most-used trading tools.

🎯 How to Use This Guide

1. Each prompt has a copy-paste template with [BRACKETS] for variables
2. Replace the brackets with your specific values
3. Paste into ChatGPT-4 or Claude (free tier works for most)
4. Save modifications you like to your personal prompt library
5. All examples use SA context (JSE, ZAR, FSCA) where relevant

Prompt 1: Generate a Custom Indicator

PROMPT 1
Indicator Generation

The Indicator Generator

Use case: you want an indicator combining specific elements. Don’t have time to learn Pine Script. AI handles syntax, you handle the logic.

▸ Copy Template COPY ↗
You are a Pine Script v5 expert.

Create a complete TradingView indicator with these specs:
- Indicator name: [DESCRIPTIVE NAME]
- Purpose: [ONE-SENTENCE GOAL]
- Indicators used: [E.G. "RSI(14), Bollinger Bands(20,2), Volume MA(50)"]
- Display location: overlay=[true/false]
- What to plot: [E.G. "BB upper/lower bands on chart, RSI as separate pane"]
- Signal conditions:
  • BUY: [SPECIFIC CONDITION, E.G. "Price touches BB lower AND RSI < 30"]
  • SELL: [SPECIFIC CONDITION]
- Visual markers: [E.G. "BUY arrow below candle, SELL arrow above"]
- Alert messages: [WHAT TO SAY IN ALERTS]

Constraints:
- Use Pine Script v5 syntax ONLY (no v4)
- All thresholds must be input.* configurable
- Add inline comments
- Output complete .pine file ready to paste

Asset context: [E.G. "Volatility 75 Index, 5-minute chart" or "USD/ZAR daily"]

💡 SA Example

Asset context: USD/ZAR forex pair, 1-hour chart. Account for high volatility during SARB MPC announcements (typically last Thursday of cycle)” — adding this context produces better-tuned indicators.

Prompt 2: Convert Indicator to Backtestable Strategy

PROMPT 2
Strategy Conversion

The Strategy Builder

Use case: you have an indicator that visually looks good. Now you want to backtest it to see if it would actually be profitable. AI converts indicator code to strategy code with proper trade execution.

▸ Copy Template COPY ↗
Convert this Pine Script INDICATOR into a STRATEGY script
for backtesting on TradingView Strategy Tester.

[PASTE YOUR INDICATOR CODE HERE]

Strategy requirements:
- Use strategy() instead of indicator()
- initial_capital = 1000 (USD)
- Position sizing: 2% of equity per trade
- Stop-loss: [E.G. "1% below entry for BUY, 1% above for SELL"]
- Take-profit: [E.G. "2% target = 1:2 risk-reward"]
- Commission: 0.05% per trade (round-trip)
- Slippage: 1 tick
- Pyramiding: 1 (no stacking)
- Process orders on bar close
- Only enter on signal candle close (not intra-bar)

Add Strategy Tester properties (process_orders_on_close=true, etc.)

Use Pine v5 syntax. Return complete strategy file.

Pro tip: after you get the strategy, run it on Strategy Tester (Performance Summary tab). Look at: Profit Factor > 1.5, Max Drawdown < 25%, Win Rate > 50%. If any of these fail, iterate the strategy parameters.

Prompt 3: Debug Broken Code

PROMPT 3
Debugging

The Code Debugger

Use case: TradingView Pine Editor shows red error lines and you don’t know why. Or worse — code compiles but doesn’t behave as expected. AI is faster at debugging than searching forums.

▸ Copy Template COPY ↗
I have Pine Script v5 code that's not working correctly.

CODE:
```
[PASTE FULL CODE]
```

PROBLEM:
[E.G. "Line 12 shows error: Undeclared identifier 'rsi'"]
[OR: "Code compiles but BUY arrows appear on every candle"]
[OR: "Strategy backtests show $0 trades despite signals"]

EXPECTED BEHAVIOUR:
[E.G. "RSI should be calculated using 14-period close prices,
arrows only when RSI crosses oversold/overbought thresholds"]

Please:
1. Identify what's wrong
2. Explain WHY it's wrong (so I learn)
3. Provide the corrected complete code
4. Note any common Pine v5 mistakes I should avoid

💡 Why Claude Wins for Debugging

Claude has longer context window and tends to give more thorough debugging explanations. ChatGPT-4 is faster but sometimes suggests fixes that don’t address root cause. For debugging specifically, use Claude.

Prompt 4: Multi-Timeframe Analysis

PROMPT 4
Multi-Timeframe

The MTF Analyser

Use case: you trade on 5-minute charts but want to know what higher timeframes (H1, H4, D1) say. AI can build dashboards showing multiple timeframes simultaneously.

▸ Copy Template COPY ↗
Build a multi-timeframe Pine Script v5 indicator that shows
trend status across multiple timeframes simultaneously.

Specifications:
- Indicator name: "MTF Trend Dashboard"
- Display: overlay=true (on price chart)
- Timeframes to analyse: 5min, 15min, 1H, 4H, 1D
- Trend definition per timeframe:
  • BULL if EMA(9) > EMA(21) AND close > EMA(50)
  • BEAR if EMA(9) < EMA(21) AND close < EMA(50)
  • NEUTRAL otherwise
- Display as table in top-right corner showing:
  • Timeframe label
  • Trend status (BULL/BEAR/NEUTRAL)
  • Coloured cell (green/red/yellow)
- Compute trends using request.security() function
- Add overall "confluence score": +1 for each BULL, -1 for BEAR, 0 for neutral
  Sum across 5 timeframes (-5 to +5)
- Show confluence score as bottom row of table

Constraints:
- Use Pine v5 syntax
- Make EMA periods configurable inputs
- Handle barmerge.gaps_off correctly

Return complete .pine code.

Usage tip: with MTF confluence dashboard, only trade when score is +3 or higher (for BUY) or -3 or lower (for SELL). Reduces signals 60% but increases quality.

Prompt 5: SA-Specific Market Analysis

PROMPT 5
SA Context

The Local Market Analyser

Use case: you want analysis specific to SA market conditions (JSE timing, SARB rate decisions, USD/ZAR sensitivity, load shedding economic impact).

▸ Copy Template COPY ↗
You are a financial analyst specialising in South African markets.

Analyse the following situation and provide actionable trading insights
for a SA-based retail trader:

CONTEXT:
- Asset: [E.G. "USD/ZAR" or "JSE Top 40" or "Sasol shares" or "Volatility 75 Index"]
- Current price action: [E.G. "USD/ZAR broke above 19.20, retesting"]
- Timeframe: [E.G. "1-hour chart"]
- Capital available: [E.G. "R10,000 risk capital"]
- Risk tolerance: [E.G. "Conservative — max 2% per trade"]

QUESTIONS TO ANSWER:
1. What's the broader macro context affecting this asset?
   (SARB rates, US Fed policy, commodity prices, EM risk-on/off)
2. Key technical levels (support/resistance)
3. Catalysts to watch in next 7 days (SA-specific events)
4. Position sizing for my capital and risk tolerance
5. Reasonable stop-loss and take-profit levels
6. Tax implications for SA resident (CGT vs income)

Be specific. Give concrete numbers. Mention SARB MPC dates if relevant.

Disclaimer: I understand this is educational, not financial advice.

⚠️ Important Caveat

AI doesn’t have real-time data. It uses training data which may be months old. For SARB rate decisions, current Fed positions, or recent JSE movements, always cross-reference with current sources (Reuters, Bloomberg, SAonline). Use AI for structure and analysis frameworks, not real-time facts.

Bonus: Combining Prompts

The real power emerges when you chain prompts. Example workflow:

  1. Prompt 1 → generate RSI + Bollinger indicator
  2. Prompt 2 → convert to strategy for backtesting
  3. Run on Strategy Tester, note: PF 1.42 (below 1.5 threshold)
  4. Prompt 3 → “Strategy backtest shows PF 1.42, max DD 32%. Suggest 3 modifications to improve.”
  5. Apply suggested mods, backtest again. PF 1.78. ✓
  6. Prompt 4 → add MTF filter (only trade when H4 trend aligns)
  7. PF jumps to 2.14, fewer trades but higher quality
  8. Prompt 5 → “Strategy ready for live testing. Suggest first-week monitoring protocol.”

Total time: ~45 minutes. Total cost: R0 (Claude free tier) or R20-30 (API tokens). Equivalent process without AI: 40+ hours of learning Pine Script + reading strategy optimisation literature.

Common Mistakes Using AI Prompts

❌ Mistakes That Waste Your Time

1. Being vague — “create an indicator for trading” produces generic garbage. Always specify asset, timeframe, indicators, conditions.
2. Not testing output — AI compiles ≠ profitable. Always backtest.
3. Trusting AI predictions — AI doesn’t see the future. Use it for code, not crystal-ball predictions.
4. Skipping the “expert” framing — “You are a Pine Script v5 expert” actually improves output quality (research-confirmed).
5. One-shot perfectionism — iterate. Each prompt improves on the last.
6. Pasting account data — never share real account numbers or balances with AI services (POPIA risk).
7. Asking AI to “find profitable strategy” — that’s your job through backtesting. AI generates code, not edges.

Free vs Paid Tier Recommendations

  • Casual user (1-2 prompts/week): Claude free tier or ChatGPT free (GPT-3.5)
  • Active trader (5-10 prompts/week): Claude Pro or ChatGPT Plus ($20/mo ≈ R370)
  • Power user / developer (50+ prompts/week): API access (pay-per-token, often cheaper than Pro)
  • Multi-language needs: ChatGPT-4 slightly better for non-English (Afrikaans, isiZulu)

Saving and Organising Your Prompts

Build a personal prompt library. Recommended structure:

  1. Google Doc with categories: Indicators, Strategies, Debugging, Analysis
  2. For each prompt: title, use case, template, example output, date last tested
  3. Tag prompts that work especially well
  4. Update prompts when you find improvements
  5. Review monthly — delete what didn’t work

After 6 months, you’ll have 20-30 reusable prompts that save you hours weekly.

Privacy Note for SA Users

🔐 POPIA Compliance When Using AI

OpenAI (ChatGPT) and Anthropic (Claude) are US-based companies. Data you input is transmitted internationally. Under POPIA Section 72:
• Don’t input personal identifiers (ID number, full name, address)
• Don’t input bank account or broker account numbers
• Don’t input client data (if you trade for others)
• Use placeholders: “[USER]”, “[BROKER ACCOUNT]”
• Anonymise trade data before sharing for analysis
For sensitive analysis, consider Claude’s “no training” enterprise tier or local LLMs like Llama.

What’s Next

  1. Save these 5 prompts to your personal library
  2. Test Prompt 1 today — generate one indicator
  3. Read ChatGPT & Claude Tutorial for deeper context
  4. Backtest your generated indicators: Backtesting Guide
  5. Deploy on demo: Deriv Bot Setup

🚀 Test AI-generated strategies on Deriv demo (FSCA, $10,000 virtual):

Open Free Demo Account

Related Reading

DM

Dan Machado

Founder IA Trader Pro · Daily AI prompt user

⚠️ Disclaimer: AI-generated code may contain errors. Always backtest and demo-test. Trading involves risk of capital loss. Deriv is FSCA-authorised (FSP 50885). Contains Deriv affiliate links. Full disclaimer.