Learning the dynamics of technical trading strategies