Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
buy an upward cross of ma, sell a downward cross

Hello!
This is my first attempt at an algo. it doesnt use pipeline, just practicing on spy for now. i am interested in algo trading options in ib, so im not too concerned about shorting, i'll buy a put. any advice to improve my strategy or my code would be really appreciated. ive been trading options as if they were leveraged stocks for a couple years. ive been kind of trading this strategy for a couple months now and have done well, (when i trade my strategy, not my emotions and guesses).

-i want to try trail stops, to see if they keep profit better than closing at the next cross. any feedback is much appreciated.
-i also would like to see if implementing another confirmation signal, maybe volume or sentiment based. in real life i like obv.
-i also cant figure out how to do this for many stocks at the same time. if you could tell me that would be awesome.

i couldnt have even made this piece of crap with out yalls help anyway. any suggestions and ideas of how to code the suggestions would be a lot of help.

thank you,
Tyler

1 response

Very cool....Here is a start on introducing volume as a factor for consideration. The only changes made to your original algo can be found on lines 25 and 44.