Introduction
Final Analysis is a powerful tool that lets you backtest trading strategies using natural language. Simply describe your strategy in plain English, and the system will parse your query, extract the trading parameters, and run a comprehensive backtest on historical market data.
What You Can Do
Quick Start
Step 1: Write Your Query
Navigate to the Final Analysis page and enter your trading strategy in natural language. Be specific about:
- The asset you want to analyze (e.g., BTC, ETH)
- The timeframe (e.g., 1h, 4h, 1d)
- Entry conditions (e.g., "RSI crosses above 50")
- Exit conditions (e.g., "Stop loss 2%, Take profit 5%")
- Time period (e.g., "last 30 days", "from 1/1/2024 to 3/31/2024")
Step 2: Review Parsed Parameters
After clicking "Analyze Query", the system will parse your query and display the extracted parameters. You can:
- Review the asset, timeframe, and time constraints
- Check entry and exit conditions
- Click "Edit Parameters" to modify any values before running the analysis
Step 3: Execute Analysis
Click "Execute Analysis" to run the backtest. The system will:
- 01Load historical market data for the specified period
- 02Calculate all required technical indicators
- 03Evaluate entry and exit conditions on each bar
- 04Simulate trades and calculate performance metrics
Step 4: Review Results
Once the analysis completes, you will see:
- Performance metrics (win rate, profit factor, Sharpe ratio, etc.)
- Interactive trading chart with entry/exit markers
- Trade history table with detailed P&L
- Equity curve showing account balance over time
- Option to export results as JSON or CSV
Writing Natural Language Queries
The key to getting accurate results is writing clear, specific queries. Here are the essential components:
Required Information
- Be specific: Include asset, timeframe, and date range for best results
- Use clear language: "Buy when" is better than "if"
- Specify exit conditions: Always include stop loss or take profit
- Match timeframes: Use the same timeframe for indicators and backtest
Understanding Results
After running an analysis, you will see comprehensive results. Here is what each section means:
Performance Metrics
Trading Chart
The interactive chart shows:
- Price candles: OHLC data for the selected timeframe
- Entry markers: Blue markers showing when entry conditions were met
- Exit markers: Green (profit) or red (loss) markers showing trade exits
- Indicators: Technical indicators used in your strategy
Trade History
The trade history table includes:
- Entry and exit dates/times
- Entry and exit prices
- Profit/loss in dollars and percentage
- Number of bars held
- Trade direction (long/short)
Editing Parameters
After your query is parsed, you can fine-tune the parameters before running the analysis. This is especially useful for:
- Adjusting indicator periods
- Changing threshold values
- Modifying stop loss or take profit levels
- Switching between long and short positions
- Updating time constraints
How to Edit Parameters
- 01Click "Edit Parameters": After your query is parsed, you'll see an "Edit Parameters" button in the top right of the parsed query card.
- 02Expand conditions: Click on any entry or exit condition to expand it and see all its parameters.
- 03Modify values: Use dropdowns to change indicators, operators, or types. Use input fields to adjust numeric values. Use checkboxes for boolean options (like "Use ATR").
- 04Save changes: Click "Save Parameters" at the bottom of the card to save your changes.
- 05Execute: Click "Execute Analysis" to run the backtest with your updated parameters.
- Indicator type
- Indicator period
- Operator (above, below, crosses, etc.)
- Threshold value
- Direction (long/short)
- Exit type (stop loss, take profit, etc.)
- Percentage or ATR-based values
- ATR multiplier
- Risk/reward ratio
Monte Carlo Analysis
Monte Carlo simulation enhances backtest results by running thousands of randomized simulations to understand the probability distribution of possible outcomes.
What is Monte Carlo Simulation?
When you run a backtest with 5 or more trades, the system automatically performs Monte Carlo analysis by:
- 01Resampling your actual trades in random order (1000 simulations)
- 02Calculating equity curves for each simulation
- 03Generating confidence intervals and risk metrics
- 04Identifying worst-case and best-case scenarios
Key Metrics Explained
Interpreting the Equity Curve Chart
The Monte Carlo equity chart displays:
- Dark band (25th–75th percentiles): Where 50% of simulation outcomes fall
- Light band (5th–95th percentiles): Where 90% of simulation outcomes fall
- Median line (50th percentile): The most likely outcome
Parsed Query Attributes Reference
When your query is parsed, the system extracts various attributes that define your trading strategy. This reference explains every attribute you can view and edit in the parsed query display.
General Parameters
Time Constraint
Entry Conditions Sequence
Entry Condition Attributes
Each entry condition can have the following attributes:
Exit Conditions Sequence
Exit Condition Attributes
Each exit condition can have the following attributes:
"Price above EMA-50 AND RSI above 50" → Both must be true on same bar
"Price crosses above EMA-50 THEN RSI crosses above 50" → Must happen in order within 50 bars
"Stop loss 2% OR Take profit 5%" → First to trigger exits the trade
"MACD crosses above 0 THEN back below 0" → Second cross only exits if first happened within 50 bars
Built-in Indicators
The system supports a wide range of technical indicators. Here is a complete reference:
Operators
Operators define how indicators are compared. Here are the available operators:
Comparison Operators
Crossing Operators
Special Operators
Entry & Exit Conditions
Entry Conditions
Entry conditions define when to enter a trade. You can specify multiple conditions, and they will be combined with AND logic (all must be true).
This creates two entry conditions that must both be met simultaneously.
Sequential Conditions
You can also create sequential conditions that must happen in order using keywords like "then", "after", or "wait for":
Sequential conditions have a timeout (default 50 bars) to prevent waiting indefinitely.
Exit Conditions
Exit conditions determine when to close a position. Multiple types are supported:
Risk/Reward Ratio (RR)
Use Risk/Reward ratios to automatically calculate profit targets based on your stop loss distance:
Take Profit = Entry ± (Stop Loss Distance × RR Ratio)
If entry is $50,000 with 2% SL ($1,000 risk), TP will be at $53,000 (3× $1,000 = $3,000 reward).
Indicator-Based Exits
Set your stop loss or take profit at dynamic indicator values that move with the market:
Stop Loss at Indicator:
Stop loss trails the ATR trailing stop indicator value.
Take Profit at Indicator:
Exit when price reaches the swing high level.
Using ATR (Average True Range) for stop loss and take profit adapts to market volatility:
This means: Stop loss at 2× ATR below entry, Take profit at 6× ATR above entry (3:1 risk/reward ratio).
Custom Indicators
You can upload your own custom indicators via CSV files. This allows you to use proprietary indicators or indicators not available in the built-in list.
CSV Format
Your CSV file should have one of these formats:
Format 1: Timestamped (Recommended)
Format 2: Multi-plot (for indicators with multiple values)
Format 3: Index-based (no timestamps)
Using Custom Indicators
- 01Reference your custom indicator in your query using its name (e.g.,
my_custom_signal) - 02After parsing, the system will detect the custom indicator and prompt you to upload a CSV file
- 03Upload your CSV file with a name matching the indicator name in your query
- 04The system will align your CSV data with market data timestamps and use it in the analysis
- Maximum file size: 10MB per CSV
- Maximum files: 5 per request
- Format: CSV only
- Timestamp alignment tolerance: 1 minute
Examples
Example 1: Simple RSI Strategy
This strategy enters long when RSI crosses above 50 and exits when RSI crosses back below 50.
Example 2: Breakout with Stop Loss
Enters on breakout above swing high with RSI confirmation. Uses ATR-based stop loss and 3:1 risk/reward ratio for take profit.
Example 3: EMA Crossover
Classic moving average crossover strategy on 1-hour timeframe.
Example 4: Sequential Conditions
Three sequential conditions: first crossover, then price movement, then retest before entry.
Example 5: Probability Analysis
Analyzes the probability of a specific market outcome rather than executing trades.
Advanced Exit Conditions
Beyond basic percentage-based stops and targets, you can use advanced exit conditions including Risk/Reward ratios and indicator-based exits.
Risk/Reward Ratios (RR)
Instead of specifying exact take profit percentages, you can use Risk/Reward ratios to automatically calculate profit targets based on your stop loss distance.
How it Works:
- Set your stop loss (e.g., "SL 2 ATR" or "stop loss 2%")
- Specify RR ratio (e.g., "TP 3RR" means 3:1 risk/reward)
- System calculates: Take Profit = Entry ± (Stop Loss Distance × RR Ratio)
If entry is $50,000 with 2% stop loss ($1,000 risk), take profit will be at $53,000 (3× the $1,000 risk = $3,000 reward).
ATR-based stop loss with 2:1 risk/reward ratio for take profit.
Indicator-Based Exits
Set your stop loss or take profit at dynamic indicator values that move with the market.
Stop Loss at Indicator
Place stop loss below/above an indicator value:
Stop loss will trail the ATR trailing stop indicator value.
Stop loss placed at the SuperTrend indicator level.
For short positions, stop is placed above the EMA 50.
Take Profit at Indicator
Exit when price reaches an indicator level:
Exit when price reaches the swing high level.
Take profit at the 0.618 Fibonacci retracement level.
Combines ATR-based stop with indicator-based profit target.
- ATR & ATR Trailing Stop
- SuperTrend
- Swing High / Swing Low
- EMA / SMA (any period)
- Fibonacci Levels
- Custom Indicators (from uploaded CSV)
Combining Exit Strategies
You can mix different exit types for sophisticated risk management:
Indicator-based trailing stop with RR-based profit target.
Strategy Sharing
Share your successful strategies with beautiful, branded strategy cards that showcase your backtesting results.
What's Included in Strategy Cards
When you export a strategy, the generated image includes:
- Total Return %
- Win Rate
- Number of Trades
- Profit Factor
- Sharpe Ratio
- Max Drawdown
- Asset & Timeframe
- Entry Conditions
- Exit Conditions
- Testing Period
- Text-to-Quant Branding
How to Share Your Strategy
- 01Run Your Analysis: Complete a backtest with your trading strategy
- 02View Results: Navigate to the analysis results page or history drawer
- 03Click Share: Look for the "Share Strategy" button near your results
- 04Download or Share: Download as PNG image, share directly to social media, or copy to clipboard
Best Practices for Sharing
- Share on the Right Platform: Twitter/X and Discord are great for trading strategy discussions
- Add Context: Include a brief description of your strategy's logic when sharing
- Acknowledge Limitations: Mention that past performance doesn't guarantee future results
Best Practices
Query Writing Tips
- Be specific: Always include asset, timeframe, and date range for accurate results
- Use clear language: "Buy when" is clearer than "if" or conditional statements
- Always specify exit conditions: Include stop loss or take profit to manage risk
- Match timeframes: Use the same timeframe for indicators and backtest period
- Test incrementally: Start with simple strategies and add complexity gradually
Interpreting Results
- Win rate alone isn't enough: Consider profit factor, Sharpe ratio, and max drawdown
- Look for consistency: Check if results are consistent across different time periods
- Review individual trades: Examine the trade history to understand when the strategy works
- Consider market conditions: Results may vary in different market environments (trending vs. ranging)
Need help? Contact support or visit the Terminal to run your first strategy.