As I familiarize myself with Quantopian's back testing software (which is pretty cool) I have a curious question.
I am looking to write a sample algorithm to learn how intraday trades are handled. Is it possible to do the following:
As a pure momentum play, follow a stock minutely to see if new intraday highs keep occurring, wait for a 1% or greater retreat off the days current high. Then, if the stock rebounds and crosses the previous intraday high by 0.5% market buy with a stop-loss placed at the cost-basis.
I was playing with the history function for a while but couldn't quite get this to work.
Any help is much appreciated.
Thanks