Suppose you backtest the EUR/USD (or GBP/USD) forex pair with this system on the 1min timeframe:

1) Enter the market at any time n: go long if the "future" bar n+1 has a higher close as the close than bar n; go short otherwise

2) Place a stop loss of 50 pips and a take profit target of 25 pips

Clearly, with this "cheating" system you get good results. Now assume you restrict the distance on the closes of bar n and n+1 to the interval [0 0.0002]. In this case you also get good results but clearly not as good as in the first case.

In the real world, if you could filter to take only trades where next bar is in the direction of your entry you would be the richest man in the world.

The question is, if there is a reasonable strategy what to do about the "bad" trades, where the next bar is in the opposite direction of your entry.

I tested this with the same system as above but this time the system only trades those "bad" trades so that the trade is in a loosing position right after the first bar.

Clearly, this system ends up as a loosing system. I wondered if it is possible to "optimize" those bad trades with a higher stop of 100 pips and a higher take profit of 10 pips.

To my surprise all attempts on the SL and TP parameters failed, there was no improvement on whatever settings.
All I could achieve was that the loosing range of this system was somehow less choppy.

If only the very first bar after your entry bar goes in the wrong direction, there is nothing you can do about it(at least with my dumb backtesting). Why is this?
You cannot decrease/increase the SL; you cannot decrease/increase the TP.
Does this mean that one can see bad trades right after the first bar, even if your SL is still far away from it?

don't be silly. you want free lunch or what? You can't make a profitable system with zero intelligence model, with no prediction capability. Or is it the case, that you 'discovered' autocorrelation of high freq fx retuns and try to obscure your idea in this quasi theoretical question? :)
–
MarianPAug 18 '12 at 21:48

You can't see into the future in real trading so you shouldn't allow your backtests to see into the future.
–
user2763361Mar 5 '14 at 14:13

2 Answers
2

To be honest I dont fully comprehend your question. Not sure what you try to achieve. You should however not occupy yourself with questions that imply the impossible -> looking ahead. You stand at time t and must make a decision to trade or not to trade and if you trade then in what direction, how much notional, what kind of stops/targets. You can adjust your stop losses and targets at any time after the trade. If you believe the next bar's result is a strong predictor of the total outcome of the trade then you may use that kind of information. But notice that you may not necessarily optimize for performance by exiting after the next bar in case you determined that an adverse move by the end of the next bar means that you will guaranteed end up with a loss (given that would be the result of your analysis). What if there was an unexpected spike between t and t+1? You may exit at the worst point, maximizing your loss as a result. Trading is all about expectancy. If you start to think in terms of probabilities, and test with such framework in mind then you will eventually find an algorithm that will give you positive expectancy. This will be your starting point. From there it's gonna be a rocky road ahead of you before you can run a successful algorithmic trading strategy. Are you sure you are prepared to go down that road? Hope this helped a little. I tried to word in in laymen's terms as I sensed you are pretty much a beginner in this game.

The results of this test with the look-ahead bar indicates that one cannot influence a trade with SL and TP once its gone in the wrong direction. I asked myself: why bother with SL and TP? That's one of the main reasons of that question. You could write a simple test and see this phenomena for yourself.
–
JuergenMar 1 '12 at 11:44

I believe this is a variation on a classic roulette gambling system. We make a bet that seems likely to win, but has a chance of losing if some unlikely things happen. In roulette, the game is to raise your bet each time you lose to cover the losses from previous bets. As long as you win before you run out of money, you come out ahead.

Similarly here you are betting 25 pips up and 50 down; any trend will cost you twice as much in losses as you take in profits, so in the long run you are likely to lose. The only thing stopping that is if you can anticipate some pattern in the market. But that is exactly what traders and algorithms have been trying to do for a long time. Market traders have the edge on screen traders, because they have more information available.

This algorithm seems to be failing you, just like the roulette algorithm will bankrupt all but a few who try it. You cannot consistently make money from a random process without a trend, particularly when your trading costs put the odds in the house's favour.