Strategy Builder
A visual drag-and-drop strategy construction tool that lets you define scenario conditions, later-level rules, and exposure logic without writing code — then compare them against historical OHLCV data. The built-in Quant Validator flags common backtesting limitations such as look-ahead bias, overfitting, and insufficient sample size. Strategies can be published to the Strategy Hub for community review or exported as Pine Script for further inspection.
What this page covers
- How to build a strategy visually using condition blocks
- How the backtesting engine works and what its outputs mean
- How to interpret backtest results without overfitting
- How to publish to the Strategy Hub and enter the Weekly Strategy Battle
The Strategy Canvas
The Strategy Canvas is a drag-and-drop interface where you build strategy scenarios by connecting logic blocks. Think of it as a flowchart for documenting conditions and reviewing how they would have behaved in selected data.
Available Condition Blocks
| Category | Conditions |
|---|---|
| Price Action | Candle pattern (engulfing, doji, pin bar, etc.), break above/below level, higher high / lower low, inside bar |
| Indicators | MA cross (SMA, EMA, WMA), RSI above/below threshold, RSI divergence, MACD signal cross, Bollinger Band touch |
| Session | Kill Zone active (London/NY), specific hour range, day of week, session open/close |
| Volume | Volume above N-period average, volume spike (> 2× average), delta positive/negative, volume climax |
| Market Structure | Break of Structure (BOS), Change of Character (CHoCH), fair value gap present, order block touch |
| Time | Between specific hours, within N bars of session open, specific day of week |
Logic Gates
Connect condition blocks with AND, OR, and NOT logic gates. Example historical annotation study (non-executable):
Annotation Condition:
Kill Zone (London-NY) = ACTIVE
AND
Price = Swept previous session high (within 3 bars)
AND
1H candle = Bearish engulfing CLOSE
AND
Volume = Above 20-period average
Historical paper-study references (not orders):
Mark a +1.5% reference band from the signal bar close
Mark the previous session high + 5 pips as a context line
Record the observed follow-through; do not place, size, or manage a position
Backtesting Engine
Once a strategy is built, compare it with historical OHLCV data. The backtester evaluates each bar and marks instances where the configured conditions would have matched; results depend on data quality and simulation assumptions.
- Select pair and timeframe
Choose the pair and timeframe your strategy is designed for. The engine uses OHLCV data sourced from Yahoo Finance.
- Set the date range
Select the historical window and record its length. Short samples may not represent other periods.
- Configure scenario parameters
Set invalidation references, later-level references, exposure method (fixed lot, % of account, ATR-based), and maximum concurrent records.
- Run the test
Click Run Backtest. Results return within 30 seconds for most configurations.
- Analyze results
Review the metrics dashboard, equity curve, and trade log before drawing conclusions.
Understanding Backtest Metrics
| Metric | What it tells you | Study interpretation |
|---|---|---|
| Outcome Rate | Share of records meeting the selected outcome field | Depends on definitions and sample |
| Profit Factor | Gross simulated result ÷ gross simulated loss | Compare samples with costs and assumptions |
| Max Drawdown | Largest peak-to-trough simulated change | Context-dependent historical field |
| Expectancy | Average simulated result in R multiples | Retrospective comparison only |
| Sharpe Ratio | Simulated result relative to volatility | Context-dependent comparison |
| Record Count | Total matching records in the test period | Interpret with sample size |
| Consecutive Losses | Longest simulated losing sequence | Record the observed sequence |
Avoiding Backtesting Pitfalls
Backtesting is easy to over-interpret. A backtest that looks excellent on a training period can perform differently on new data. These are common pitfalls and ways to examine them in the Strategy Builder:
| Pitfall | What it looks like | How to avoid it |
|---|---|---|
| Overfitting | A model can look unusually strong on a short tuned sample and fail on new data | Test on 12+ months of data and verify on an out-of-sample period you have not tuned against. |
| Optimization cherry-picking | Tested 50 parameter combinations, reporting the best result only | Compare separate historical samples and report assumptions and limitations. Persistence in a second sample remains a historical observation, not evidence of future performance. |
| Look-ahead bias | Strategy knows future candle closes when making decisions | Ensure all conditions use ta.valuewhen() or confirmed candle data only. The Quant Validator catches common look-ahead patterns. |
| Ignoring spread/commission | Profit factor 2.2 without costs becomes 0.9 with costs on a scalping strategy | Always set commission in the backtest settings. Add 0.02% per side (0.04% round trip) at minimum. |
| Insufficient trade count | A 50% win rate in an 8-record historical sample is not statistically meaningful | Require minimum 50 records — preferably 100+. If your study fires infrequently, examine 3 years of historical data. |
| Session time bias | Strategy performs only during a specific period that happened to trend strongly | Test across multiple market regimes: trending, ranging, high-volatility, low-volatility periods separately. |
Strategy Hub & Weekly Battle
Publish your strategies to the Strategy Hub where other traders can discover, clone, and rate them. Strategies are shown with their backtest metrics so others can evaluate them before using.
Each Monday, selected new strategies from the previous week may enter the Weekly Strategy Battle — a paper comparison run in Phantom Desk across monitored pairs for 7 days. Results are published as simulated records, not live-performance claims.
Frequently asked questions
Can I download my strategy as Pine Script?
Yes. Click 'Export → Pine Script' on any built strategy. The export uses the Pine Script Generator to convert your visual conditions into executable Pine Script code. Review and test the output in TradingView before deploying.
What data source does the backtester use?
OHLCV data is sourced from Yahoo Finance for supported forex, metals, indices, and commodities. Data goes back to January 2020 for most markets.
Can I combine Strategy Builder conditions with Hanzo-specific signals (Wyckoff, Kill Zones)?
Hanzo-specific signals (Wyckoff phase, kill zone active, volume anomaly) are available as condition blocks in the builder. The backtester uses historical signal data stored in the database — signals are not regenerated fresh for each backtest.
How many strategies can I have active at once?
Saved-strategy and backtest limits vary by access path. Review the current in-app limit; Elite and Operator show their applicable scope in the subscription screen.
Can I see other traders' strategies before publishing my own?
Yes. The Strategy Hub is publicly readable on all tiers — you can browse, filter by pair/style/outcome fields, and clone any community strategy to your own builder canvas. Publishing availability is shown in-app.