Portfolio Strategies

Your portfolio starts with $10,000 by default. If you don't specify a time range, it defaults to the last 3 years on a daily timeframe.

Buying

If you don't specify an amount, the default is to buy $1,000 worth of shares per trade.

Buy a fixed number of shares

Purchase exactly N shares of a stock at the current price.

Buy 10 shares of AAPL when RSI drops below 30

Buy a dollar amount

Invest a specific dollar amount — buys as many whole shares as that amount allows.

Buy $1,000 of NVDA when price crosses above the 50-day SMA

Buy a percentage of portfolio

Invest a percentage of your total portfolio value (cash + holdings).

Buy 25% of portfolio in QQQ when MACD crosses bullish

Buy with all available cash

Go all-in with remaining cash. If no amount is specified, defaults to buying as many shares as cash allows.

Buy TSLA when earnings growth exceeds 30%

Selling

If you don't specify how much to sell, the default is to sell all shares of that stock.

Sell all shares

Close the entire position in a stock.

Sell all AAPL when RSI crosses above 70

Sell a fixed number of shares

Sell exactly N shares.

Sell 5 shares of MSFT when price drops below the 200-day SMA

Sell a percentage of your position

Sell a fraction of what you hold — useful for scaling out of winners.

Sell 50% of my NVDA when it's up 20% from entry

Sell everything

Close all open positions across all stocks.

Sell all positions when the S&P 500 drops below its 200-day SMA

Short Selling

Short a stock

Bet against a stock by selling shares you don't own. You profit when the price falls.

Short 10 shares of GME when RSI is above 80 and volume is declining

Cover a short position

Buy back shares to close your short. You lock in profit if the price dropped since you shorted.

Short 10 shares of GME when RSI is above 80, cover the short when RSI drops below 30

Cover all shorts

Close your entire short position in a stock.

Short $2,000 of TSLA when price drops below the 200-day SMA, cover all my shorts when price closes back above the 50-day SMA

Scaling In (Doubling Down)

Add to an existing position

Buy more of a stock you already hold — only triggers if you have an open position.

From 2020-01-01 to 2025-01-01 (daily):
- Buy $1,000 of SPY when RSI drops below 30
- Double down on SPY if price drops another 5% from my last buy
- Sell all when RSI crosses above 70

Multiple scale-in levels

Chain multiple add-to-position rules for aggressive dip buying.

From 2022-01-01 to 2025-01-01 (daily):
- Buy $2,000 of QQQ when price drops 10% from 52-week high
- Double down if price drops another 5% from last entry
- Double down again if price drops another 5% from last entry
- Sell all when price recovers to the 50-day SMA

Scaling Out (Partial Exits)

Take partial profits

Sell a portion of your position at different profit levels.

From 2021-01-01 to 2025-01-01 (daily):
- Buy $5,000 of AAPL when RSI drops below 25
- Sell 25% of AAPL when it's up 10% from entry
- Sell 50% of AAPL when it's up 20% from entry
- Sell all AAPL when it's up 30% from entry

Position Sizing

Default: $1,000 per buy if no amount is specified. Default sell: entire position.

MethodExampleWhat it does
Fixed sharesBuy 10 shares of AAPLAlways buys exactly 10 shares
Dollar amountBuy $1,000 of AAPLBuys as many shares as $1,000 allows
Portfolio %Buy 25% of portfolio in SPYInvests 25% of total portfolio value
Cash %Buy 50% of available cash in MSFTUses half of remaining cash
All-inBuy AAPLUses all available cash

Starting Capital

Your portfolio starts with $10,000 by default. You can specify a different amount:

Start with $50,000. Buy $5,000 of AAPL when RSI drops below 30, sell all when above 70.

Cooldowns

By default, a buy condition can trigger every single bar. Use cooldowns to prevent overtrading.

From 2020-01-01 to 2025-01-01 (daily):
- Buy $1,000 of SPY when RSI drops below 30 (wait at least 5 bars between buys)
- Sell all when RSI crosses above 70