Why difference between Strategy Tester and live EA

 
Why is there a difference between the results of the Strategy Tester as opposed to using the EA against live data?
I am using exactly the same settings over the same period for the same currency pair, but I get big differences in when the trades enter and exit.
 
Your question is probably one of the most frequently asked.

IMO

I'm running a MetaQuotes Demo and using MetaQuotes History Data in Strategy Tester and the results, from same date range, are similar, but not exact. Even these small diffrences can determine if EA will be profitable or not.

Possible Reason:
The Strategy Tester has a fixed spread value to calculate bar interpolation. This fixed spread can be found in the Symbol properties. The Broker's demo/live spread is always changing as market conditions influence. I've seen some Broker's spread, even on the 4 major pairs, up over 20 pips.

I don't believe it is possible to have identical Demo/Live and Strategy results. And if the History Data is not from your Broker, your Strategy Tester result can have very large performance differences, ranging from highly profitable to account wipe out and everything in between. Until there is way to compensate for changing Broker spreads, and Brokers provide their own 1-2 years History Data within their demo/live platforms, the Strategy Tester will never be an acceptable predictive tool to develop profitable EAs. I can produce very similar Strategy Tester and Demo results for short date ranges. The longer the date range, more erratic results as the changing demo spreads come into play.

I've been reading and participating in several Forex forums on the web for 2 years. I've never seen anyone post exact results from Strategy Tester and demo/live. It is just an impossibility in the present MT4 environment. If I'm wrong in this opinion, I would love for someone to correct me. Most EA sellers, in eBay, forums and other websites, will only post Strategy Tester results. These results are usually very impressive. Other Sellers that post actual Demo/Live results, show profits, but results are more erratic with more loses than seen in Strategy Tester results.

The present benefit of the Strategy Tester is to determine if EA will function properly in the MT4 Platform. And, with the Visual Mode, to see if EA and Indicator/s interact as intended. Other control variable values can be optimized for general working ranges. Until the Strategy Tester spreads equal Broker's spread, Strategy Tester results will never be truly comparative to demo/live results.

If it were possible to have exact or very similar Strategy Tester and Demo/Live results, I would think we would have seen a MetaQuotes Article with demonstrating techniques and reports proving it possible.

To get improved comparative results:
1. Use History Data from demo/live Broker for Strategy Tester.
2. Use Broker with lowest actual spreads. Ask Broker for actual historic spreads, not just the advertised spreads. Spreads can be collected over time to compare Brokers.
3. Hardcode timeframes/periods in EA. Chart H4 Example: Instead of Close[0]; use iClose(Symbol(),Period-H4,0);
4. To overcome some spread problems, When possible, hardcode iClose(symbol(),Period-?,0) instead of Ask or Bid.
5. Run Visual Mode to determine correct order entry and OrderClose() exit.
6. Optimize all control variables at same time. Run first on Model-Open prices only. Then run Strategy Tester with best settings on Model-Every tick. This may not work on evey EA. If not, then Optimize on Model-Every tick.
 
Thank you for the comprehensive reply. But it doesn't explain why I get big differences.
1. My history data comes from the same broker
2. My spread does not change. I have watched very carefully, and my live spread does not change when the trades get entered or exited.
3. Tried that - still big differences
4. I do not have spread changes
5. The ST (strategy tester) enters very differently to live. I have compared OHLC with live, and prices are the same. Cannot see any problem there.
6. Did every tick - still big differences.
7. Short period - I have done comparisons purely on a single day - still big differences.

If I say big differences, I mean things like the ST loosing 100 of pips in one day, and in live profit of 10's of pips for the same day.

Hmmm, sounds like the ST is useless to see if a strategy is profitable. It seems it is purely useful to see that an EA actualy functions - not how well.
 
Presently, I agree with your opinion of the Strategy tester.

Which Broker do you use?

It may not apply to you, but most, if not all Broker's supply only a few days up to a few weeks of their M1 data in the History Center. If you used the download button in the History Center, that tick data comes from MetaQuotes. The only quick sources of free MT4 history tick data, that I'm aware of, is Metaquotes and Alpari. You should run MetaQuotes or Alpari Demo/Live account accordingly. You can refresh existing Broker's data using a chart refresh and click/hold the up button on keybord procedure, but this can take alot of time.

I'm not awawre of any retail Broker that has fixed spreads for Demo or Live accounts. Here is a quote from "MQL4: Indicative vs "Real" quote data..." "Indicative and "Real" Quote Data"

"From my understanding, all retails brokers are in fact, mini-marketmakers between their own clients and clearing banks, only clearing trades with their clearing banks when absolutely necessary. This would basically mean that each Forex broker’s quotes (while "pretty much" following the market) are their own, and therefore different from another broker’s quotes, depending on what their clients are up to. I've verified this by downloading several demo platforms from different FOREX brokers and comparing their quotes. For instance, comparing Saxobank’s and FXDD’s hourly quotes shows normal quote differences of around 5-10 pips but can vary by as much as 50 pips! Even the guys who claim to not have Dealing Desks, still seem to make their own internal markets but often through an associated or sister company (so they can claim to not have a Dealing Desk)."
Reason: