I've got a piece of code that looks at a single stock and see's if it's price action meets certain requirments before trading starts each day, if it does then it looks for a trigger during that day and buys. If somebody could show me an example of how something like this might be done using the Q500US list it would be appreciated. Too keep things "simple" the strategy would work like this:
Before trading starts:
-Check if the previous 2 days made new highs
-If they did, then save the previous days high for use as a trigger for when to buy today, and save previous days low for a stop-out trigger
In handle_data
-If price >= trigger price then go long
-If price of an open postion drops below the low of the candle that triggered the buy (2nd day with a new high) then sell
-If an open position is up 10% then sell
This is just a dummy strategy I dreamt up to try and get all the required info I'd need to apply it to a strategy I am working on. Thanks for taking the time to look at this and I look forward to your replies!