Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2006.09.18 14:54
Experts

Dodgy Backtest Example - expert for MetaTrader 4

| English Español Português 日本語 Deutsch 中文

Views:
8733
Rating:
votes: 3

You may get profitable experts in backtests if orders are filled and exited in the same bar. This is usually an error due to the limitations of backtesting on data with longer timeframes than the trading strategy.

Backtest results will always be unreliable if an order is filled and exited on the same bar unless the entry is on the open or the exit on the close. This is because it is impossible to tell the price action within the bar. A backtest will make an estimation of what happened during the bar. At times the estimation may result in a fill at a price that is estimated to occur before the exit but in realty occured after. This can result in fills at impossible prices, especially when the market moves quickly in one direction. Some strategies will inadvertently exploit these impossible prices to produce impossible results.

You can end up with an expert that appears to be extremely profitable in backtests but will lose a bundle in real trading (well I think it will), as the attached expert will. Try it on EURUSD 1H timeframe.

The only way to have reliable backtests off bar data is to either enter on the open or exit on the close. It is certain when these two points happened so the order of the price action will always be correct. It also makes it certain that the expert does not inadvertenlty open and close an order on the same bar (such as with a Stop Loss Exit)

As you can guess I wouldn't recommend this expert be used for real....




Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

Holt's double exponential smoothing (mt4 version) Holt's double exponential smoothing (mt4 version)

Holt's double exponential smoothing with linear forecasting.

TimeToNextCandle TimeToNextCandle

This indicator shows how much time remaining to the next bar opening.