Momentum-Trading-Example icon indicating copy to clipboard operation
Momentum-Trading-Example copied to clipboard

An example algorithm for a momentum-based day trading strategy.

Results 28 Momentum-Trading-Example issues
Sort by recently updated
recently updated
newest added

Tried to run and go the following error messages: 135/136 136/136 Success. Watching 136 symbols. unknown channel A.VMD (you may need to specify the right data_stream) Any input on this...

Getting current ticker data... Success. Tracking 106 symbols. Getting historical data... Traceback (most recent call last): File "algo.py", line 396, in run(get_tickers(), market_open, market_close) File "algo.py", line 87, in run...

I'm not a US citizen and therefore can't access live data from Alpaca within my demo account. I'm implementing Polygon via seems to work. ``` def get_polygon_credentials(alpaca_key=None): #try: # alpaca_key,...

I get this error as soon as the script attempts to buy or sell any stock. Not sure why, as the code I added and the code I modified all...

I have been getting this error consistently at the end of each day while it is trying to liquidate the day's remaining positions. Any thoughts? Log below: Jan 08 12:45:10...

I followed the instructions and I get the below error when running the algo.py: > pravinraj_vincent@alpaca-uirobots:~$ python3 algo.py > Traceback (most recent call last): > File "algo.py", line 4, in...

When calculating the number of shares to buy, I think the formula you use should be ```python shares_to_buy = portfolio_value * risk // data.close ``` instead of https://github.com/alpacahq/Momentum-Trading-Example/blob/be4352838eebdd2d124eedd341e31fbae8774f3d/algo.py#L253-L255 I think...

Can anyone tell me why I always get the error "event loop is already running" when I try to run the trade_updates channel? the error is thrown from the asyncio