Hi all, I am an extreme beginner, and I want to start by making my first algorithm only take care of selling stocks I've bought on Robinhood. To that end, I want to make an algorithm that is able to pick up what stock I have, and based on a couple very simple rules, enter stop limit orders, or limit orders in Robinhood.
I basically want to create a trailing stop limit, as well as a OCO type of function, where it can cancel the stop limit order, and enter a limit order if my price target is reached. This way I still control the buy side, and since Robin wont let you sell short, there isn't a danger of it going crazy that way either. It's really a way to dip my toes into Quantopian, beyond just using the research notebooks.
A couple reach goals is to later on make a version of the trailing stop limit that would reduce the trail based on a counter or milestones, ie- starts off with a 0.5 point trail, then if it gets half way to my price goal or it's been hovering over an hour, convert to a 0.4 point trail, etc.
I'm a bit stumped on where to even start on this though, so I was hoping someone has previously coded a trailing stop before?
What are your experiences trying to do so? Is there any fundamental issue with this approach? How do I make sure the algo picks up any buy I make during the day, to know its available to sell, or will it only pick up my shares from the day before. Also, are there any examples or references you would recommend I read on the technical side of trailing stops?
Thanks for any feedback and help.