Open bspallholtz opened 4 years ago
I've also tried these two functions
robin_stocks.orders.order_buy_stop_loss
robin_stocks.orders.order(symbol, quantity, orderType, trigger, side, limitPrice=None, stopPrice=stopPrice, timeInForce='gtc', extendedHours=False)
I am trying to loop through my open positions and set a trailing stop loss price of 10% off the current price.
Here is my code , get_cp: is another function that gets the current price of a given symbol is_buy: is a function that based on several factors determines if a given symbol is still a buy or not
This is the return I get