Getting Started
When the Strategy/Backtesting Widget is opened, you will see a prompt to select a strategy. Click Select Strategy or Open Strategy to open the strategy panel, where you can:- Choose a built-in strategy
- Open an existing custom strategy
- Create a new strategy with New strategy
Using Built-in Strategies
The widget includes a library of ready-to-use strategies such as:- ADX Breakout Strategy
- MACD Strategy
- Moving Average Cross
- RSI Strategy
- Price Channel Strategy
- Consecutive Up/Down Strategy
- Inside Bar / Outside Bar Strategies
- Open the strategy selector
- Choose a strategy from the Built-in section
- Run the backtest
- Learning how strategy logic works
- Benchmarking performance
- Comparing behavior across instruments and timeframes
Creating a Custom Strategy
To create your own strategy:- Open the strategy selector
- Click New strategy
- The Indie editor will open
- Define your strategy logic
Strategy Settings
Each strategy includes configurable inputs. Typical parameters may include:- Initial Capital
- Commission value and type
- Leverage
- Risk-free rate
- Order size and order size unit
- Market order type
- Intrabar execution rules
- Strategy-specific logic inputs (periods, thresholds, multipliers, etc.)
Backtesting Date Range
You can control the period used for backtesting directly from the top panel of the widget.Start Date
- Available – uses the earliest available historical data (limited by your plan)
- From Custom Date – manually select a start date using the calendar
Note: Historical data is capped depending on your plan (5,000 candles on Freeroll, 20,000 on All-In).
End Date
- Now – includes the most recent market data and updates automatically (forward testing)
- Until Custom Date – manually select an end date
Calendar Selection
When selecting a custom range:- A dual calendar picker allows you to define start and end dates
- You can navigate between months and years
- Selected dates define the exact backtesting window
- Test strategies on specific market periods
- Compare performance across different conditions
- Isolate trends, volatility phases, or events
Main Performance Overview
After running a strategy, the Strategy/Backtesting Widget provides a structured performance summary. The report has four tabs: Statistics, Trades, Orders, and Code. Code shows the strategy’s source, with buttons to copy it or open it in the IDE. The Open Source Code icon in the widget header opens the strategy in the code editor too. Run Bot opens the order form to launch the strategy as a live bot. See Algo Trading.Core Metrics
- Total P&L
- Win Rate
- Profit Factor
- Total Trades
- Wins / Losses
- Average Trade
- Expectancy
- Risk–Reward Ratio
Capital & Returns
This section summarizes capital progression:- Initial Capital
- Final Capital
- Realized P&L
- Unrealized P&L
- Annualized Return
- Buy & Hold Return
- Average Monthly Return
- Minimum / Maximum Equity
Risk & Volatility
Risk metrics help evaluate downside exposure:- Max Drawdown
- Average Drawdown
- Number of Drawdowns
- Max Drawdown Duration
- Sharpe Ratio
Volatility & Recovery
Additional recovery and stability indicators:- Sortino Ratio
- Calmar Ratio
- Daily Standard Deviation
- Daily Value at Risk (95% / 99%)
- Annualized Volatility
- Average Recovery Time
- Maximum Recovery Time
Trade Quality
Trade-level quality metrics include:- Expectancy
- Risk–Reward Ratio
- Profit Factor
- Best Trade Net P&L
- Worst Trade Net P&L
- Commission-to-Profit Ratio
Trade Analysis
The Trades tab provides a detailed breakdown:- Trade ID and type (Long / Short)
- Entry and exit timestamps
- Duration
- Individual trade P&L
- Cumulative P&L
- Drawdown and run-up
Orders Log
The Orders tab displays:- Order ID
- Order type (Market / Limit / Stop)
- Price
- Quantity
- Exposure
- Fee
Visual Components
The widget also provides:- Equity curve
- Drawdown chart
- Position activity
- Trade distribution statistics
- Open two Strategy/Backtesting Widgets with the two strategies you want to compare (these can be built-in, existing custom strategies, or a new strategy you want to create).
- Select the asset.
- Select the timeframe.
- Click Open Source Code to open both strategies in the editor, and click Open Report to update your strategy backtesting results.
- Verify the results of both strategies side-by-side.
Workflow Integration
The Strategy/Backtesting Widget is designed to work together with:- Charts – to visually validate entries and exits
- IDE – to develop and refine strategy logic
- Watchlist – to test strategies across multiple instruments
- AI assistants – an assistant connected through the TakeProfit MCP server can run a backtest, read its orders and trades, and compare parameter sets for you
- Algo Trading – a strategy that tests well can be started as a live bot on a connected account, see Algo Trading
The Strategy/Backtesting Widget transforms your workspace into a complete strategy validation environment — combining execution logic, risk diagnostics, and performance analytics in one unified interface.