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

CategoryConditions
Price ActionCandle pattern (engulfing, doji, pin bar, etc.), break above/below level, higher high / lower low, inside bar
IndicatorsMA cross (SMA, EMA, WMA), RSI above/below threshold, RSI divergence, MACD signal cross, Bollinger Band touch
SessionKill Zone active (London/NY), specific hour range, day of week, session open/close
VolumeVolume above N-period average, volume spike (> 2× average), delta positive/negative, volume climax
Market StructureBreak of Structure (BOS), Change of Character (CHoCH), fair value gap present, order block touch
TimeBetween 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.

  1. Select pair and timeframe

    Choose the pair and timeframe your strategy is designed for. The engine uses OHLCV data sourced from Yahoo Finance.

  2. Set the date range

    Select the historical window and record its length. Short samples may not represent other periods.

  3. Configure scenario parameters

    Set invalidation references, later-level references, exposure method (fixed lot, % of account, ATR-based), and maximum concurrent records.

  4. Run the test

    Click Run Backtest. Results return within 30 seconds for most configurations.

  5. Analyze results

    Review the metrics dashboard, equity curve, and trade log before drawing conclusions.

Understanding Backtest Metrics

MetricWhat it tells youStudy interpretation
Outcome RateShare of records meeting the selected outcome fieldDepends on definitions and sample
Profit FactorGross simulated result ÷ gross simulated lossCompare samples with costs and assumptions
Max DrawdownLargest peak-to-trough simulated changeContext-dependent historical field
ExpectancyAverage simulated result in R multiplesRetrospective comparison only
Sharpe RatioSimulated result relative to volatilityContext-dependent comparison
Record CountTotal matching records in the test periodInterpret with sample size
Consecutive LossesLongest simulated losing sequenceRecord 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:

PitfallWhat it looks likeHow to avoid it
OverfittingA model can look unusually strong on a short tuned sample and fail on new dataTest on 12+ months of data and verify on an out-of-sample period you have not tuned against.
Optimization cherry-pickingTested 50 parameter combinations, reporting the best result onlyCompare separate historical samples and report assumptions and limitations. Persistence in a second sample remains a historical observation, not evidence of future performance.
Look-ahead biasStrategy knows future candle closes when making decisionsEnsure all conditions use ta.valuewhen() or confirmed candle data only. The Quant Validator catches common look-ahead patterns.
Ignoring spread/commissionProfit factor 2.2 without costs becomes 0.9 with costs on a scalping strategyAlways set commission in the backtest settings. Add 0.02% per side (0.04% round trip) at minimum.
Insufficient trade countA 50% win rate in an 8-record historical sample is not statistically meaningfulRequire minimum 50 records — preferably 100+. If your study fires infrequently, examine 3 years of historical data.
Session time biasStrategy performs only during a specific period that happened to trend stronglyTest 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.