Python loops are giving me a headache. However, I have solved one problem. The idea has been to play the 5', momo plays, at certain inflection points - trapped traders, new highs/lows, news plays - on pauses (as opposed to pullbacks which you may not get until the move is over). So, what did I come up with? Write the program and only run it when it meets the conditions of the momo plays outlined Now? How to backtest a quasi discretionary automated system At least it will get me away from the screen and out of danger. Forward testing with good records should give me some idea of the exits I want to try. However, if I solve the backtesting problem then I should be able to code it to run all the time.