Menu
Home
About
Our Role
Goals
The Team
Roadmap
Tokenomics
How To Buy
Knowledge Base
Contacts
Sitemap & Links
A.I.
Chart
Shop
IMMORTALITY
🏠
⬇️
Harvest algorithmic trading
New name
B
I
U
S
link
image
code
HTML
list
Show page
Syntax
{pre} cd mkdir harvest cd harvest python3 -m venv ./ source bin/activate {/pre} {pre} pip install harvest-python[[BROKER]] {/pre} Replace BROKER with a brokerage/data source of your choice: # Robinhood # Alpaca # Webull # Kraken # Polygon {pre} pip install harvest-python[[Alpaca]] {/pre} Example... {pre} from harvest.algo import * from harvest.trader import * class Watch(BaseAlgo): def config(self): self.watchlist = [["TSLA"]] self.interval = "5MIN" def main(self): sma_long = self.sma(period=50) sma_short = self.sma(period=20) if self.crossover(sma_long, sma_short): self.buy() elif self.crossover(sma_short, sma_long): self.sell() {/pre} Command... {pre} harvest start -s yahoo -b paper {/pre} Add more stocks {pre} from harvest.algo import * from harvest.trader import * class Watch(BaseAlgo): def config(self): self.watchlist = [['NVDA','TSLA','AAPL','MSFT','GOOGL','META','TSM','TCEHY','ORCL']] self.interval = "1MIN" def main(self): sma_long = self.sma(period=50) sma_short = self.sma(period=20) if self.crossover(sma_long, sma_short): self.buy() elif self.crossover(sma_short, sma_long): self.sell() {/pre}
Password
Summary of changes
📜
⏱️
⬆️