OrgTBoot / AlpacaTrader

0 stars 1 forks source link

Limit number of open position #9

Open maimas opened 1 year ago

maimas commented 1 year ago

For real accounts, it would be good to have a way to limit the number of open positions through a config property.

For example, if account size is 1k $ then transacting multiple symbols during the same day might result in an account block (Day Trading Pattern).

Other options to solve this problem should be considered as well.

vladislavmunteanu commented 1 year ago

Doesn't alpaca offer this protection?

maimas commented 1 year ago

Yes, alpaca has some level of protection. If we reach the limit of "day trading pattern" (3 transactions total) then alpaca prevents any orders from execution. Meaning that potentially we can run into situations where we have open positions with large losses that we can't close. If we force those positions then by law alpaca will block the account for 60 days.

This is not a problem if we have > 25k $ account size. I assume when we will go live, we'll want to start small and this could be some sort of protection for us when we will get multiple buy/sell signals for the same symbol per day.

Definitely not a priority now, but let's keep it in mind for later.

vladislavmunteanu commented 1 year ago

Yes, alpaca has some level of protection. If we reach the limit of "day trading pattern" (3 transactions total) then alpaca prevents any orders from execution. Meaning that potentially we can run into situations where we have open positions with large losses that we can't close. If we force those positions then by law alpaca will block the account for 60 days.

This is not a problem if we have > 25k $ account size. I assume when we will go live, we'll want to start small and this could be some sort of protection for us when we will get multiple buy/sell signals for the same symbol per day.

Definitely not a priority now, but let's keep it in mind for later.

Agree, that's a good point actually.