You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All sales should be done with a Stop Limit Order. limit_price according to the rules, stop_price = x% (TBD) above limit_price. A position should always have an open order to sell according to our rules.
When transitioning from stop loss 1 => 2 => take profit, we should patch the current Stop Limit Order in Alpaca and let them keep track of the market automatically. We only need to update the limit_price and stop_price according to our rules. EDIT: Not needed since we keep track of this ourselves, i.e. we don't have any long-lived sell orders in Alpaca but check market value and compare to entry price continuously.
Stop loss case (1)
If stock is down 0,5%* of total assets (invested + cash balance) => SELL 100% of position
If stock is above breakout level (entry price) next day set breakeven (entry price) as stop loss and SELL 100% of position
Start checking day after purchase before markets open. Then check constantly, via Alpaca?
Stop loss (3) SELL! Take profit
When ticker price is above breakeven level, set MA 10 as trailing stop loss, meaning check every day before open of market and set stop at MA 10 and SELL 100% of position
Start checking day after purchase before markets open
When above breakeven level set MA 10 as take-profit (sell level)
Sell 100% when stock hits take-profit
Allow selling for lower price if needed when stock hits take-profit to make sure we get rid of everything (i.e. sell with Market Order rather than stop limit.
Take partial profit
If stock is up with 10%*** from buy level => sell 50%**** of position. Use SELL! Take profit (1) for the rest of the position, I.e the trailing MA 10 SELL rule and check /change before open every day.
Needs to done manually since Alpaca can't have multiple orders with different quantity.
Check continuously during the day (poll Alpaca?)
If >10%, cancel current sell order, sell 50% at market price (?)
*make this possible to change number of percent
**Make this optional
***Make this dynamic and possible to change percentage or number of days
****Make this possible to change number of percent
*****Make this possible to change how long the order is valid from open of markets (1h, intraday etc)
Check later
Start tracking MA 10 on day 1?
The text was updated successfully, but these errors were encountered:
JAWS - buy and sell
Check [x] means checked, not guaranteed by tests :)
BUY
SELL RULES
All sales should be done with a Stop Limit Order.
limit_price
according to the rules,stop_price
= x% (TBD) abovelimit_price
. A position should always have an open order to sell according to our rules.When transitioning from stop loss 1 => 2 => take profit, we should patch the current Stop Limit Order in Alpaca and let them keep track of the market automatically. We only need to update theEDIT: Not needed since we keep track of this ourselves, i.e. we don't have any long-lived sell orders in Alpaca but check market value and compare to entry price continuously.limit_price
andstop_price
according to our rules.Stop loss case (1)
Stop loss case (2)** (#185)
Stop loss (3) SELL! Take profit
When ticker price is above breakeven level, set MA 10 as trailing stop loss, meaning check every day before open of market and set stop at MA 10 and SELL 100% of position
Take partial profit
If stock is up with 10%*** from buy level => sell 50%**** of position. Use SELL! Take profit (1) for the rest of the position, I.e the trailing MA 10 SELL rule and check /change before open every day.
Needs to done manually since Alpaca can't have multiple orders with different quantity.
Further improvements
TRADE_STATUS
values e..gSTOP_LOSS_1
,TAKE_PARTIAL_PROFIT
(Trades: Set more accurate TRADE_STATUS values on sell #190)TRADE_STATUS
(Trades: Track buy/sell events with separate entity #191)*make this possible to change number of percent
**Make this optional
***Make this dynamic and possible to change percentage or number of days
****Make this possible to change number of percent
*****Make this possible to change how long the order is valid from open of markets (1h, intraday etc)
Check later
The text was updated successfully, but these errors were encountered: