Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Momentum Strategy Need Help

Hello everyone,

I am new to Quantopian,and am need of a little bit of help. I am trying to create an algorithm that day trades stocks based on momentum. I have an equation that finds the difference between the current price and the price 12 minutes ago. It is my understanding that I can't use this factor in pipeline because pipeline is only called once a day. I want my algorithm to go long when the momentum value is .15 or greater, and sell the stock when the value drops below 0. I was able to create the momentum equation, but I am having trouble taking that value and using it to buy and sell stocks. Please Help.

2 responses

I think this is what you are trying to do....

Yeah that's perfect thanks I had no idea the problem was so easy.