Created
September 26, 2022 17:42
-
-
Save under0tech/df0bf8f5893ebff31968fdbef163fc80 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Screen stocks | |
def ScreenStocks(trader_api): | |
assets = trader_api.list_assets(status='active', asset_class='us_equity') | |
assets = [x for x in assets if x.shortable == True and x.exchange == 'NASDAQ'] | |
stocks = [x.symbol for x in assets][:SCREENER_NASDAQ_COUNT] | |
screened = [] | |
for st in stocks: | |
_stock = CheckStock(st) | |
if _stock != {}: | |
screened.append(_stock) | |
screened = [x for x in screened if abs(x['stop_loss'] - x['take_profit']) > min(x['stop_loss'], x['take_profit']) * TAKE_PROFIT_DELTA] | |
return screened |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment