Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Stochastic long-term strategy

Hello,
I am new to algorithmic trading I wanted to build my own trading algorithm. I wanted to base my algorithm on more of a long term strategy. The first criteria of my strategy would be to trigger a trade when the stochastic indicator crosses above the %D 5 on a 9 day basis. How would I go about that? Thanks