Indicator BacktesterOverview
This professional-grade backtesting tool allows you to turn any indicator into a fully functional strategy without writing a single line of code. By using the "Source" inputs, you can link this backtester to the plots of your favorite indicators to analyze their historical performance, win rate, and drawdown.
The standout feature of this tool is the Dynamic Risk-Based Position Sizing, which automatically calculates your trade quantity so that you lose a specific dollar amount (e.g., $50) if your Stop Loss is hit, regardless of how wide the gap is.
How to Use
Load your favorite indicator onto the chart.
Load this Indicator Backtester strategy.
In the "Settings" menu, map the Long/Short Entry Signals to the specific plots or "shapes" of your indicator.
Choose your Exit Method and map the corresponding TP/SL levels or signals.
Settings Breakdown
1. System Settings
- Exit Method:
- Price Levels: Uses specific price points for Take Profit and Stop Loss (ideal for indicators that plot target lines).
- Signals: Uses trigger-based exits (ideal for indicators that show "Exit Now" shapes or color changes).
2. Risk Management
- Use Risk-Based Sizing:
- Enabled: The strategy calculates the quantity automatically. If your Stop Loss is 1% away or 10% away, your total loss will always equal the "Risk Amount."
- Disabled: The strategy defaults to the quantity set in the "Properties" tab (e.g., % of Equity).
- Risk Amount: The maximum amount of currency (e.g., USDT) you are willing to lose on a single trade.
3. Entries
- Long Entry Signal: Select the indicator plot that triggers a buy.
- Short Entry Signal: Select the indicator plot that triggers a sell.
4. Mode: Price Levels (Exit Method 1)
- Long/Short TP Level: Select the plot representing your profit target price.
- Long/Short SL Level: Select the plot representing your stop loss price.
Note: These must be actual price values on the chart.
5. Mode: Signals (Exit Method 2)
- Take Profit Signal: Select the plot that triggers a profit take.
- Stop Loss Signal: Select the plot that triggers a stop loss exit.
Chiến lược Pine Script®






















