Backtesting has many flaws. I'll list some of them. Let me know if you need more clarification:
1. In order for backtesting to be accurate, the data must be tick data. What this means is the strategy needs to be tested on a trade-by-trade model of what actually happened. You can't just look at a historical candlestick chart and backtest off of that. Most testing programs do not offer tick data for very long. Some have it for a few weeks or so, but after that they start using minute data or 5 minute data and then your accuracy drops significantly. Tick data backtesting can be around 95% accurate. Anything less drops significantly to 40% accurate or below.
2. Backtesting usually does not factor in the spread. If you have a code that says "when conditions x, y, and z are met, buy at the opening of the next candle", and it sees that the next candle opened at 1.5000, that doesn't mean you would have been able to buy at 1.5000. Depending on the instrument, the spread was probably 1.5000/1.5002 or higher, and if you had bought there, you would have paid 1.5002, not 1.5000. So that's already a difference of 2 pips. Now if you're backtesting a scalping system that is going for only a few pips, you can see how this is already an issue. If it sold a bit later when price hit 1.5005, because of the spread you probably would have sold at 1.5003 in real life, making your profit only 1 pip, yet the backtest will show a profit of 5 pips. This doesn't factor in widened spreads during news releases.
3. Backtesting doesn't factor in SLIPPAGE. Slippage is when you see one price but due to crazy demand you cannot get the price you want. This happens during news releases when price flies away. If you see price at 1.5000 and you place a buy order, if demand is crazy you may not get filled until 1.5020 or higher. So backtesting doesn't take this into account, but in real life you would be affected by it.
There's more but those 3 should be enough to turn you off already.
That's why it's important to forward test an EA, meaning testing it on a demo account, but in real time for a few weeks/months/whatever to see how well it does in real conditions, not ideal backtesting conditions.