# Backtesting And Optimization Support

BananaEA can be tested in MT4 Strategy Tester and can be optimized by changing input ranges.

Backtesting is a historical simulation. Optimization is a comparison of historical input combinations. Neither one guarantees live results.

## What Backtesting Is For[​](#what-backtesting-is-for "Direct link to What Backtesting Is For")

Use backtesting to check:

* Whether the EA runs without errors.
* Whether settings load correctly.
* Whether stop loss and take profit behavior looks correct.
* Whether trade frequency is reasonable.
* Whether spread and broker assumptions are suitable.

## What Optimization Is For[​](#what-optimization-is-for "Direct link to What Optimization Is For")

Use optimization to compare selected input ranges.

Good practice:

* Optimize only a few meaningful settings.
* Use realistic ranges.
* Keep a separate out-of-sample period.
* Review the top group of results, not only the top row.
* Forward test on demo before live use.

## What To Avoid[​](#what-to-avoid "Direct link to What To Avoid")

Avoid:

* Optimizing every input.
* Choosing settings only because they had the highest historical profit.
* Using unrealistic spread or commission.
* Testing only a favorable market period.
* Treating one backtest as evidence of future performance.

## Metrics To Review[​](#metrics-to-review "Direct link to Metrics To Review")

Review metrics together:

* Net result
* Drawdown
* Profit factor
* Trade count
* Average trade
* Consecutive losses
* Out-of-sample behavior

These are review tools, not sales claims.

## Related Pages[​](#related-pages "Direct link to Related Pages")

* [Backtesting And Optimization](/banana-ea/mt4/docs/v4/backtesting-optimization.md)
* [Optimization Fundamentals](/banana-ea/mt4/docs/v4/backtesting-optimization/optimization-fundamentals.md)
* [Analyzing Results](/banana-ea/mt4/docs/v4/backtesting-optimization/analyzing-results.md)
* [Validation And Forward Testing](/banana-ea/mt4/docs/v4/backtesting-optimization/validation-forward-testing.md)
