Coded a system almost exactly like this, and the backtest results were not pretty. 15ema retest with 200ema+50ema trend detection. It looks good on paper and when backtesting a few trades by hand, but the moment you set the rules and run it over 3+ years of historic data, the net results are...