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
- Test trading strategies using technical indicators
- Analyze probability of market conditions
- Set entry and exit conditions with stop losses and take profits
- Upload custom indicators for advanced analysis
- View detailed performance metrics and trade history
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")
Buy when RSI crosses above 50 and exit when RSI crosses below 50 for BTC 1D from 1/1/2024 to 3/31/2024Step 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:
- Load historical market data for the specified period
- Calculate all required technical indicators
- Evaluate entry and exit conditions on each bar
- Simulate 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
| Component | Description | Example |
| Asset | The cryptocurrency to analyze | BTC, ETH, SOL |
| Timeframe | Chart timeframe | 1h, 4h, 1d, 1w |
| Entry Condition | When to enter a trade | "RSI crosses above 50" |
| Exit Condition | When to exit a trade | "Stop loss 2%", "Take profit 5%" |
| Time Period | Date range for analysis | "last 30 days", "from 1/1/2024 to 3/31/2024" |
Pro Tips
- 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
| Metric | Description |
| Total Return (%) | Overall percentage gain or loss |
| Win Rate | Percentage of winning trades |
| Profit Factor | Gross profit divided by gross loss (higher is better) |
| Sharpe Ratio | Risk-adjusted return measure |
| Max Drawdown | Largest peak-to-trough decline |
| Expected Value | Average expected return per trade |
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
- Click "Edit Parameters": After your query is parsed, you'll see an "Edit Parameters" button in the top right of the parsed query card.
- Expand conditions: Click on any entry or exit condition to expand it and see all its parameters.
- Modify values:
- Use dropdowns to change indicators, operators, or types
- Use input fields to adjust numeric values (periods, thresholds, etc.)
- Use checkboxes for boolean options (like "Use ATR")
- Save changes: Click "Save Parameters" at the bottom of the card to save your changes.
- Execute: Click "Execute Analysis" to run the backtest with your updated parameters.
What You Can Edit
Entry Conditions
- • Indicator type
- • Indicator period
- • Operator (above, below, crosses, etc.)
- • Threshold value
- • Direction (long/short)
Exit Conditions
- • Exit type (stop loss, take profit, etc.)
- • Percentage or ATR-based values
- • ATR multiplier
- • Risk/reward ratio
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
| Attribute | Type | Description |
| Asset | String | The cryptocurrency symbol to analyze (e.g., "BTC", "ETH", "SOL") |
| Timeframe | String | Chart interval: 1m, 5m, 15m, 1h, 4h, 1d, 1w |
| Market Type | String | "spot" or "futures" - determines which market data to use |
| Query Type | String | Type of analysis: "backtest", "probability", or "analysis" |
| Execution Type | String | When trades execute: "bar_close" (default) or custom execution price |
Time Constraint
| Attribute | Type | Description |
| Type | String | "relative" (e.g., "last 30 days") or "absolute" (specific dates) |
| Value | String | Time period description (e.g., "30 days", "3 months") |
| Start Date | Date | Beginning of the analysis period (calculated or specified) |
| End Date | Date | End of the analysis period (default: today) |
| Days | Number | Number of days in the period (for relative constraints) |
Entry Conditions Sequence
Controls how multiple entry conditions work together
| Attribute | Type | Description |
| Sequential | Boolean | false (AND logic): All conditions must be true simultaneously on the same bar true (THEN logic): Conditions must occur in sequence order within timeout window |
| Sequence Timeout | Number | Maximum bars between sequential conditions (default: 50) |
Entry Condition Attributes
Each entry condition can have the following attributes:
| Attribute | Type | Description |
| Indicator | String | The technical indicator to evaluate (e.g., "rsi", "ema", "macd", "price") |
| Operator | String | Comparison type: "above", "below", "crosses_above", "crosses_below", etc. |
| Threshold | Number | Value to compare against (e.g., RSI threshold of 50) |
| Threshold Type | String | "absolute" (fixed value) or "percentage" (relative value) |
| Period | Number | Indicator calculation period (e.g., EMA-20 uses period=20) |
| Direction | String | "long" (buy signal) or "short" (sell signal) |
| Compare To Indicator | String | For cross comparisons (e.g., "price above ema" → compareToIndicator="ema") |
| Compare To Period | Number | Period of the comparison indicator (e.g., EMA-50 → compareToPeriod=50) |
| Sequence Index | Number | Order in sequence (0, 1, 2...) - only set when Sequential=true |
| Needs Reference Point | Boolean | Whether this condition requires a reference price/point to evaluate |
Exit Conditions Sequence
Controls how multiple exit conditions work together
| Attribute | Type | Description |
| Sequential | Boolean | false (OR logic): First condition to trigger exits the trade true (THEN logic): Conditions must trigger in order (e.g., "MACD crosses above 0 then back below 0") |
| Sequence Timeout | Number | Maximum bars between sequential exit triggers (default: 50) |
Exit Condition Attributes
Each exit condition can have the following attributes:
| Attribute | Type | Description |
| Type | String | "stop_loss", "profit_target", "indicator_signal", "time_exit" |
| Indicator | String | For indicator-based exits (e.g., "price", "rsi", "macd") |
| Operator | String | Comparison type for indicator exits |
| Value/Threshold | Number | For percentage SL/TP: percentage value (e.g., 2 for 2%). For indicator exits: threshold value |
| Use ATR | Boolean | Whether to use ATR (Average True Range) for dynamic SL/TP |
| ATR Multiplier | Number | Multiplier for ATR-based SL/TP (e.g., 2 for 2×ATR) |
| ATR Period | Number | Period for ATR calculation (default: 14) |
| Risk/Reward Ratio | Number | For TP: multiple of stop loss distance (e.g., 3 for 3:1 RR) |
| Preceding Bars | Number | For SL based on recent price action (e.g., "lowest low of 3 preceding candles") |
| Position Direction | String | "long" or "short" - which position type this exit applies to |
| Reference Point | String | Price reference for dynamic exits (e.g., "entry_price", "swing_high") |
| Sequence Index | Number | Order in sequence (0, 1, 2...) - only set when Sequential=true |
| Lookforward Bars | Number | Time-based exits: close position after N bars (rarely used) |
Quick Reference Examples
"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:
| Indicator | Default Period | Description | Common Usage |
| RSI | 14 | Relative Strength Index (0-100) | Oversold (<30), Overbought (>70) |
| EMA | 20 | Exponential Moving Average | Trend following (9, 12, 21, 50, 200) |
| SMA | 20 | Simple Moving Average | Trend following (5, 10, 20, 50, 200) |
| MACD | 12,26,9 | Moving Average Convergence Divergence | Momentum and trend changes |
| Bollinger Bands | 20,2 | Volatility bands | Overbought/oversold levels |
| ATR | 14 | Average True Range | Stop loss/take profit sizing |
| Supertrend | 14,3.0 | Trend-following indicator | Trend direction and reversals |
| Williams %R | 14 | Momentum oscillator | Overbought/oversold conditions |
| VWAP | 14 | Volume Weighted Average Price | Intraday support/resistance |
| Swing High/Low | N/A | Price structure levels | Breakout/breakdown detection |
| Fibonacci | N/A | Retracement levels | Support/resistance, price targets |
| Volume Profile | N/A | Volume distribution | POC, Value Area High/Low |
| Price | N/A | Current price | Price comparisons and breakouts |
| Volume | N/A | Trading volume | Volume analysis |
| Open Interest | N/A | Futures open interest | Market sentiment analysis |
Operators
Operators define how indicators are compared. Here are the available operators:
Comparison Operators
| Operator | Description | Example Query |
| Above / Greater Than | Value is greater than threshold | "RSI above 50" |
| Below / Less Than | Value is less than threshold | "RSI below 30" |
| Equals | Value equals threshold | "RSI equals 50" |
| Not Equals | Value does not equal threshold | "RSI not equals 50" |
Crossing Operators
| Operator | Description | Example Query |
| Crosses Above | Value crosses above threshold | "RSI crosses above 50" |
| Crosses Below | Value crosses below threshold | "Price crosses below EMA 20" |
Note: Crossing operators detect actual crosses by comparing the current bar to the previous bar. This ensures accurate signal detection.
Special Operators
| Operator | Description | Example Query |
| Deviation Above | Percentage above indicator | "Price 10% above EMA" |
| Deviation Below | Percentage below indicator | "Price 5% below SMA" |
| Divergence Bullish | Bullish divergence pattern | "RSI bullish divergence" |
| Divergence Bearish | Bearish divergence pattern | "RSI bearish divergence" |
| Touches Upper/Lower | Touches band (Bollinger Bands) | "Price touches upper Bollinger Band" |
| Reaches | Price reaches indicator value (for exits) | "Take profit at swing high" |
Note: The "reaches" operator is specifically used for exit conditions when you want to take profit or stop loss at a dynamic indicator level.
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).
Buy when RSI crosses above 50 AND price breaks out of swing high for BTC 1DThis 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":
First RSI crosses above 50, then price breaks above EMA 20 before entering longSequential 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:
| Type | Description | Example |
| Stop Loss | Percentage or ATR-based loss limit | "SL 2%" or "SL 2 ATR" |
| Take Profit | Percentage or ATR-based profit target | "TP 5%" or "TP 3 ATR" |
| Risk/Reward Ratio | Take profit based on stop loss distance | "TP 3RR" (3:1 risk/reward) |
| Indicator-Based Exits | Stop/profit at indicator value | "stop below ATR trailing stop" |
| Indicator Signal | Exit based on indicator condition | "Exit when RSI crosses below 50" |
Risk/Reward Ratio (RR)
Use Risk/Reward ratios to automatically calculate profit targets based on your stop loss distance:
How it works:
Take Profit = Entry ± (Stop Loss Distance × RR Ratio)
Buy BTC when RSI > 30, SL 2%, TP 3RR for last 30 daysIf 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:
Buy when RSI > 50, stop below ATR trailing stopStop loss trails the ATR trailing stop indicator value.
Take Profit at Indicator:
Buy BTC, take profit at swing highExit when price reaches the swing high level.
Supported indicators: ATR Trailing Stop, SuperTrend, Swing High/Low, EMA/SMA, Fibonacci, and custom indicators.
ATR-Based Exits
Using ATR (Average True Range) for stop loss and take profit adapts to market volatility:
Buy when price breaks out of swing high SL 2 ATR TP 3RR for BTC 1DThis 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)
timestamp,value
2024-01-01T00:00:00Z,45.2
2024-01-01T04:00:00Z,48.3
2024-01-01T08:00:00Z,52.1Format 2: Multi-plot (for indicators with multiple values)
timestamp,histogram,macd_line,signal_line
2024-01-01T00:00:00Z,12.5,245.6,233.1
2024-01-01T04:00:00Z,15.2,248.3,235.2Format 3: Index-based (no timestamps)
value
45.2
48.3
52.1Using Custom Indicators
- Reference your custom indicator in your query using its name (e.g.,
my_custom_signal) - After parsing, the system will detect the custom indicator and prompt you to upload a CSV file
- Upload your CSV file with a name matching the indicator name in your query
- The system will align your CSV data with market data timestamps and use it in the analysis
Enter long when my_custom_signal crosses above 50 for BTC 1D last 30 daysLimitations
- 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
Buy when RSI crosses above 50 and exit when RSI crosses below 50 for BTC 1D from 1/1/2024 to 3/31/2024This strategy enters long when RSI crosses above 50 and exits when RSI crosses back below 50.
Example 2: Breakout with Stop Loss
Buy when price breaks out of swing high and RSI is above 50 SL 2 ATR TP 3RR for BTC 1D starting from 1/1/2024 to march 2024Enters 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
Buy when 12 EMA crosses above 21 EMA for BTC 1H last 30 daysClassic moving average crossover strategy on 1-hour timeframe.
Example 4: Sequential Conditions
When EMA 12/21 crossover happens, then price moves 2 ATR away, then retest EMA 12 before entering longThree sequential conditions: first crossover, then price movement, then retest before entry.
Example 5: Probability Analysis
What is the probability of BTC making a new high after RSI drops below 30 in the last 90 days?Analyzes the probability of a specific market outcome rather than executing trades.
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 10 or more trades, the system automatically performs Monte Carlo analysis by:
- Resampling your actual trades in random order (1000 simulations)
- Calculating equity curves for each simulation
- Generating confidence intervals and risk metrics
- Identifying worst-case and best-case scenarios
Key Metrics Explained
| Metric | Description |
| Probability of Ruin | Percentage chance of losing 50% or more of your capital |
| 95% Confidence Interval | Range where 95% of all simulation outcomes fall |
| 5th Percentile Return | Worst-case scenario (95% of outcomes are better than this) |
| 95th Percentile Return | Best-case scenario (95% of outcomes are worse than this) |
| Max Consecutive Losses (95th %ile) | Worst-case streak of losing trades you might experience |
| Max Drawdown (95th %ile) | Largest peak-to-trough decline in 95% of simulations |
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
Pro Tip: A wide confidence interval suggests higher variance in results. Strategies with tighter bands are more predictable.
When Monte Carlo Runs
Monte Carlo simulation automatically runs when your backtest generates 10 or more trades. If you have fewer trades, you'll see a message explaining that more trades are needed for meaningful statistical analysis.
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)
Buy BTC when RSI > 30, SL 2%, TP 3RR for last 30 daysIf 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).
Long when MACD crosses above 0, SL 2 ATR, TP 2RRATR-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:
Buy when RSI > 50, stop below ATR trailing stopStop loss will trail the ATR trailing stop indicator value.
Long when price breaks swing high, SL below SuperTrendStop loss placed at the SuperTrend indicator level.
Short when EMA 12 crosses below EMA 21, stop above EMA 50For short positions, stop is placed above the EMA 50.
Take Profit at Indicator
Exit when price reaches an indicator level:
Buy BTC, take profit at swing highExit when price reaches the swing high level.
Long when RSI crosses 50, TP at fibonacci 0.618Take profit at the 0.618 Fibonacci retracement level.
Buy on breakout, SL 2 ATR, take profit at EMA 200Combines ATR-based stop with indicator-based profit target.
Supported Indicators for Exits
- 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:
Buy when RSI > 50 and MACD crosses above 0, stop below ATR trailing stop, TP 3RR for BTC 4H last 60 daysIndicator-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:
Performance Metrics
- • Total Return %
- • Win Rate
- • Number of Trades
- • Profit Factor
- • Sharpe Ratio
- • Max Drawdown
Strategy Details
- • Asset & Timeframe
- • Entry Conditions
- • Exit Conditions
- • Testing Period
- • Text-to-Quant Branding
How to Share Your Strategy
- Run Your Analysis: Complete a backtest with your trading strategy
- View Results: Navigate to the analysis results page or history drawer
- Click Share: Look for the "Share Strategy" button near your results
- Download or Share:
- Download as PNG image
- Share directly to social media
- Copy to clipboard
Best Practices for Sharing
Twitter/X and Discord are great for trading strategy discussions
Include a brief description of your strategy's logic when sharing
Mention that past performance doesn't guarantee future results
Disclaimer
Strategy cards are for educational and discussion purposes only. Always include appropriate disclaimers when sharing trading strategies on social media. Strategy performance is based on historical data and does not 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 and when it doesn't
- Consider market conditions: Results may vary in different market environments (trending vs. ranging)
Common Mistakes to Avoid
- ❌ Forgetting to specify exit conditions (leads to unrealistic results)
- ❌ Using mismatched timeframes (e.g., daily indicators on hourly data)
- ❌ Over-optimizing on a single time period (test on multiple periods)
- ❌ Ignoring transaction costs and slippage in your analysis
- ❌ Not reviewing the actual trade execution on the chart
Need help? Contact support or check the FAQ section.