Forex glossary
Backtesting
Backtesting evaluates explicit strategy rules against historical data using information available at each decision point. Results depend on data quality, spreads, fees and execution assumptions. Strong historical performance may reflect overfitting and does not establish future profitability.
Illustrative example
How does it work in practice?
In a hypothetical test, a signal forms at a 100 USD close, but entry is permitted only at the next Ask of 100.20 USD. Recording a 100 USD fill understates the assumed purchase price.
A case to work through
Signal versus fill
A hypothetical strategy knows the close of 100 only after the bar ends; the next open is 101.
- The close-based signal forms once the value of 100 is established.
- With next-open execution, entry is 101 before additional costs.
What follows? Specify execution timing and recalculate the result under that assumption.
Example boundary: Other order models can differ; simulation does not confirm live execution.
Checking time in a test
Text description of the diagram
- Available data: When did the input value become known?
- Signal: When were all its conditions satisfied?
- Execution: Which later price fits the order model?
A useful distinction
Backtesting / Walk-forward analysis
A backtest examines a historical sample; walk-forward separates successive parameter-selection and later evaluation windows.
Check your understanding
Identify an execution price unavailable under the stated model.
Show the answer and explanation
101
This is the execution price under the stated model.
From a plan to automation tests
Step 9 / 12 · 0 / 12 reviewed
View the full sequence →Progress is saved only in this browser.
Read the fuller explanation
Related terms
Sources and documentation
- TradingView – Pine strategies
Hypothetical strategy orders, broker-emulator timing and backtest limitations.
Document read:
The example illustrates the mechanism. Check current account conditions and instrument specifications with the provider.