๐ฏ Think of it like a school test. Every stock gets a score from 0 to 100, just like a grade.
55 is the passing mark โ we only buy stocks that "pass the test."
๐The score combines multiple factors: MACD strength, RSI positioning, trend alignment, volatility context, and market regime. It's our single "buy or skip?" number.
โ Reject
0-54
โ Buy Zone
55-100
โผ Threshold: 55 โ only scores โฅ 55 get a buy signal
Why have a score?
Removes emotion โ no gut feelings, no FOMO. The number decides.
Consistent quality โ every stock is measured the same way.
Works in any market โ adapts as conditions change.
๐กReal example: If AAPL scores 72 and TSLA scores 43, we buy AAPL and skip TSLA โ even if TSLA is "more exciting." The score keeps us disciplined.
๐ Full Trading Day Flow โ How Everything Connects
This diagram shows how all the components fire throughout a trading day. From market open to close, each cron job runs on its schedule and feeds into the next. Follow the arrows to see how a stock goes from scanner candidate โ buy order โ managed position โ exit.
SGT Time โ21:30 ๐ข Market Opensโโโโโโโโโโโโ04:00 ๐ด Market Closes
Evaluate candidates โ Check VIX regime โ Size position โ Place buy on Alpaca
โ ๏ธ Note: The scanner fetches daily OHLCV data (Yahoo Finance period="3mo"). Today's last bar is a live price that shifts hourly, but the MACD/RSI/SMA20 barely budge from one hourly run to the next (one intraday price out of 60+ daily bars). The score is effectively a once-daily computation โ the hourly cadence is a convenience, not a necessity.
๐ฅ Try the score yourself โ The same MACD ยท RSI ยท SMA20 ยท Volume โ Score calculation is available as a downloadable Excel spreadsheet. Go to "Try It Yourself" โ paste any stock's daily OHLCV data and see the exact Technical Score the system uses to decide โ BUY or โ REJECT.
YFinance (daily) ยท Alpaca (live prices) ยท News API
OUTPUTS
Alpaca orders
Buys, sells, partials placed automatically
๐ค Recap: Auto-Trader vs Intraday Tracker โ not the same thing
๐ค Auto-Trader (:15 hourly)
โ ENTERS a position
Takes scanner candidates โ checks VIX regime โ sizes position โ places buy order on Alpaca
๐ก Intraday Tracker (every 15 min)
โ๏ธ MANAGES & EXITS a position
Checks: trailing stop ยท stop-loss ยท take-profit ยท time stop ยท news sentiment ยท VIX regime
๐ MACD โ Momentum Direction
๐ MACD is like a car's speedometer. It tells us: is the stock accelerating (speeding up) or decelerating (slowing down)? We only ride with stocks that are picking up speed.
MACD stands for Moving Average Convergence Divergence โ a fancy name for a simple idea: compare two moving averages to see if momentum is building or fading.
๐ How to read MACD:
๐ข Bullish โ Fast line above slow line = momentum up = โ Good to buy ๐ด Bearish โ Fast line below slow line = momentum down = โ Don't buy ๐ Histogram: the bar height shows momentum strength (bigger = stronger)
Three MACD signals we check:
Direction: Is the MACD line above the signal line? (Bullish โ )
Histogram: Is the momentum bar growing or shrinking? (Growing = strength โ )
Trend alignment: Is the stock in an overall uptrend? (Higher highs โ )
โกOur edge: We enter when momentum is building, not after a stock has already skyrocketed. This means we catch the middle of moves, not the tail end.
๐ก๏ธ RSI โ Temperature Check
๐ก๏ธ RSI is your stock's thermometer. It runs from 0 to 100. 70+ is "overheated" (like a fever โ due for a cool-down). 30 or below is "cold" (oversold โ may bounce back).
RSI = Relative Strength Index. It measures how strong recent price moves are compared to recent losses over the last 14 periods.
๐ด 70-100 Overbought โ may drop soon
๐ข 30-70 Normal range โ sweet spot for entry
๐ต 0-30 Oversold โ may bounce up
๐ Our preference: RSI between 40 and 65 โ not too hot, not too cold
๐กHow we use it: If a stock has RSI of 74 (overbought), we wait โ it's likely to pull back. If RSI is 39 (just right) with rising MACD, that's a green light.
๐ ATR โ Measuring Volatility
๐ ATR is like a wave height forecast. A stock with ATR = $30 is like 5-foot waves (rough, bouncy). A stock with ATR = $3 is like a calm lake (smooth, steady). Our strategy adjusts for both โ wider safety nets for rough waters.
ATR = Average True Range. It tells us how much a stock typically moves each day. This is the single most important number for managing risk.
๐ Volatility Regimes (based on ATR as % of price):
Stop-Loss placement โ A volatile stock needs more room. ATR tells us exactly how much elbow room to give.
Take-Profit targets โ Profits are set based on ATR multiples (1.5x, 2.5x, 4.0x). Bigger swings = bigger targets.
Position sizing โ High ATR = smaller position. Low ATR = larger position. Risk stays the same either way.
๐This is how we avoid the trap of fixed % stops. A 5% stop on TSLA might get hit in 15 minutes (too tight). A 5% stop on KO might never trigger (too loose). ATR adapts to each stock's personality.
๐ฌ Where the Numbers Come From
Every number you see on the dashboard comes from a mix of local calculations (run on our own server) and third-party data (pulled from free/paid APIs). Here's exactly where each one comes from and how much you can trust it.
โค๏ธ Reliability:High โ It's math we control, based on objective price data.
๐ MACD โ Locally Computed
๐ฅData flows: Yahoo Finance (yfinance) โ our server โ MACD formula โ result
MACD is calculated locally in Python using standard formulas (26-day EMA minus 12-day EMA, with a 9-day signal line). The raw price data comes from Yahoo Finance via yfinance โ a free, widely-used source for historical price data.
โญReliability:Good โ MACD is a well-known calculation. Yahoo Finance data is typically accurate for daily data but may have 5โ15 minute delays for real-time prices. For a swing trading strategy (holding 1โ25 days), this delay doesn't matter.
๐ก๏ธ RSI โ Locally Computed
๐ฅData flows: Yahoo Finance (yfinance) โ our server โ Wilder's RSI formula โ result
RSI uses the standard Wilder's 14-period formula, computed locally from the same Yahoo Finance price data. It measures the speed and magnitude of recent price changes.
โญReliability:High โ RSI is a mature, proven indicator. The calculation is trivial and Yahoo Finance data is more than accurate enough for daily RSI.
๐ ATR & Volatility โ Locally Computed
๐ฅData flows: Yahoo Finance (3-month history) โ ATR formula โ CACHED for 6 hours
ATR is calculated from 14 periods of True Range data, pulled from 3 months of Yahoo Finance history. We cache the result for 6 hours to avoid hitting Yahoo's rate limits. If Yahoo is unreachable, we use the last known value (even if stale) or estimate 3% of price as a fallback.
โญReliability:Good with caveats โ The ATR calculation itself is solid, but the underlying data can be slightly delayed. The 3% fallback is a "best guess" and works well for normal stocks but may be off for very volatile ones.
๐ฐ News Sentiment โ Multi-Source (Mixed)
News sentiment is the most complex data source โ it combines 5 different feeds into a single score:
๐ Price Action (30% weight) โ Based on actual price movements
โฒ Weights: more emphasis on actual price data than noisy news text
Each article's title is scored by keyword matching (bullish vs bearish word lists). Alpha Vantage adds ML-based sentiment where available. The scores are combined by weighted average.
โ ๏ธReliability:Moderate โ Keyword-based sentiment misses nuance ("sales miss" vs "EPS beat" in the same headline). It's directionally correct ~70% of the time but should not be blindly trusted. The price action component (30% weight) helps ground it in reality.
๐ Macro Indicators (VIX, Fear & Greed) โ Locally Computed
The VIX (fear index) and 10-year Treasury yield come from Yahoo Finance. The Fear & Greed Index is calculated locally from VIX (-7 to +7 scale), news sentiment, and S&P 500 momentum โ no external API needed.
โญReliability:Good โ VIX and yield data from Yahoo Finance is reliable for daily values. The Fear & Greed calculation is our own formula but correlates well with CNN's official index.
๐ต Live Prices & Order Execution โ Alpaca API (Broker)
All live trading data โ current positions, account balance, order fills, real-time prices โ comes directly from Alpaca Markets, our broker. This is the single source of truth for "what we actually own" and "how much money we have." The dashboard fetches fresh data every time it's generated.
โ Reliability:Very High โ This is broker-grade data. Alpaca provides the same level of data that real hedge funds use. Prices are real-time (SEC-regulated). Order status is definitive โ if Alpaca says it filled, it filled.
๐ Quick Summary
๐ฏ Technical ScoreLocal Pure math on price data โ High
๐ MACD / ๐ก๏ธ RSILocal Standard formulas โ High
๐ ATR / VolatilityLocal Yahoo Finance raw โ local calc โ Good
๐ VIX / MacroLocal Yahoo Finance raw โ local calc โ Good
๐ต Positions / PricesAlpaca Broker-grade, real-time โ Very High
๐กThe bottom line: The most important numbers โ what we own, what we paid, and what it's worth now โ come from our broker (Alpaca) and are highly reliable. The technical indicators (score, MACD, RSI, ATR) are locally computed math on free market data โ reliable enough for a swing trading strategy. The weakest link is news sentiment, which is why it gets the lowest weight in our decisions.
โก Live Position Management โ Intraday Sell Triggers
๐ฏ How the daily score and the intraday system work together: The Technical Score (MACD, RSI, SMA20) decides whether to enter a trade โ checked once per day after market close. But once you're in a position, a separate real-time system runs every 15 minutes during market hours to decide when to sell. These six triggers below are what actually fire sell orders intraday.
Intraday Sell Triggers (checked every 15 min)
๐1. Stop-Loss โ Hard Floor entry_price โ (ATR ร multiplier)
If price drops to this level, SELL ALL immediately. The multiplier depends on the stock's volatility regime:
โข Low volatility โ 2.5ร ATR (wider stop)
โข Medium volatility โ 2.0ร ATR
โข High volatility โ 1.5ร ATR (tighter stop)
โข Capped at max 2% below entry
๐2. Trailing Stop โ Locking In Profits
Activates once the price rises 1ร ATR above entry. Once active, every new high tightens the stop by 50% of the gain. If price then drops back to the stop level โ SELL ALL. This is how winners run while profits get locked in.
๐ฏ3. Partial Take-Profit โ Banking in Stages
Profits are taken in 3 tranches:
โข At 1.5ร ATR above entry โ ๐ช Sell 50% of shares
โข At 2.5ร ATR above entry โ ๐ช Sell 30% of remaining
โข At 4.0ร ATR above entry โ ๐ช Sell 20% of remaining
By the time the trailing stop triggers, 50-80% of profits are already banked.
๐ฐ4. Full Take-Profit โ Close the Rest
After all 3 partials are done, any remaining shares are closed if the price stays above the primary TP level.
โฐ5. Time Stop โ No Zombie Trades
โข After 10 days โ stop tightens to breakeven (entry + 0.5%)
โข After 21 days โ SELL ALL regardless of price
Capital doesn't get stuck in dead positions.
๐ฐ6. News Exit โ Sentiment Override
โข Sentiment < โ3 (very bad news) โ SELL ALL immediately
โข Sentiment โ1 to โ3 โ Tighten stop, watch closely
โข Sentiment > โ1 โ No change
๐ช๏ธ7. Market Regime โ VIX Override
The system monitors VIX (fear index) every run:
๐ก๏ธ A stop-loss is like an airbag. You hope you never need it, but you'd be crazy to drive without one. It automatically sells if the price drops too far, protecting you from a crash.
Our stop-loss has THREE layers:
1๏ธโฃ
Initial Stop โ Set at entry. Based on 2ร ATR below entry price. This is the "first warning line." If we buy at $100 with ATR=$5, stop is at $90 ($100 - 2ร$5).
2๏ธโฃ
Breakeven Tighten โ After 10 days in profit, we move the stop up to entry price. Now you can't lose money โ worst case, you break even.
3๏ธโฃ
Time Stop โ If a position is held for 25 days (about 5 trading weeks) and hasn't moved, we close it. No point tying up money in a dead trade.
๐ Example: Buy AAPL at $180
๐ก๏ธ Stop-loss: $172 (2ร ATR = ~$8 below entry) โ max loss ~4.4%๐ Breakeven: After 10 days, if price โฅ $180, stop moves to $180โฐ Time stop: If still open after 25 days, auto-close
โ ๏ธWhat this prevents: A stock dropping 30%+ while you "wait for it to come back." Our stops cap each loss at roughly 2โ5%. A disciplined small loss beats a catastrophic one.
๐ฐ Take-Profit โ Locking In Wins
๐ Take-profit is like eating cake in slices. Most people eat the whole cake at once (sell all shares). We eat it in three slices โ 50%, then 30%, then 20%. This way you enjoy profits early but still have more cake if the party continues!
We use three profit targets based on ATR multiples:
๐ฅ TP1: 1.5ร ATR โ Sell 50% of shares
๐ฅ TP2: 2.5ร ATR โ Sell 30% of remaining
๐ฅ TP3: 4.0ร ATR โ Sell last 20%
๐ Remaining shares after partial sells are protected by the trailing stop.
Why partial profit-taking?
Psychological win: Taking profits feels good and builds confidence
Reduces risk: After selling 50%, your remaining stake is much smaller โ less to lose
Captures big moves: The last 20% slice catches the home-run moves
๐ฐReal example: Buy 100 shares at $100. At TP1 ($105), sell 50 shares = $250 profit booked. At TP2 ($110), sell 15 more = $150 more. At TP3 ($120), sell 10 more = $200 more. Total: 75% profit locked in with only 25 shares still riding!
๐ Trailing Stop โ Let Winners Run
๐ช A trailing stop is like a kite string. As the kite (stock price) rises, we let out more string (lock in higher floor). But if the wind dies and the kite drops, the string pulls it back in. We capture the high, not the crash.
๐ How trailing works:
1๏ธโฃ Stock goes up 5% โ Trailing activates ๐ข
2๏ธโฃ Stock hits new high โ Stop moves up too ๐ผ
3๏ธโฃ Stock drops 1.5ร ATR from peak โ Auto-sell ๐
โฒ The stop only moves UP โ never down. Locking in gains.
๐Why this beats "I'll sell when it hits $X": Nobody knows the exact top. A trailing stop catches 80% of a big run instead of exiting too early at a fixed target. You capture the meat of the move.
โ๏ธ Position Sizing โ Never Bet the Farm
๐ฒ Position sizing is like splitting your chips at a poker table. You don't put all your chips on one hand, no matter how good it looks. You bet 1.5% of your stack per hand โ so even a bad beat doesn't knock you out.
Our rules:
Risk per trade: Maximum 1.5% of $20K capital = $300 risk per trade
Max position: Never more than 30% of capital ($6,000) in one stock
Min position: At least 3% ($600) โ small positions aren't worth the effort
ATR adjusts size: High volatility = smaller position. Low volatility = larger position. Same $300 risk either way.
โฒ Same $300 risk โ very different position sizes. Risk stays consistent.
๐ขSimple math: Even 10 straight losses (very unlikely!) would only cost 10 ร $300 = $3,000, or 15% of capital. Compare that to someone who goes all-in and loses 50% on one bad trade. We survive to trade another day.
๐ฆ Capital Protection โ The Golden Rule
๐๏ธ Think of your capital like a castle. Every indicator we use โ the score, MACD, RSI, ATR, stop-loss, trailing stop, position sizing โ is a wall or defense around your castle. The goal isn't to conquer every kingdom. It's to keep your castle standing so you can fight another day.
Why this strategy is resilient against losing your initial capital:
๐ฏFilter first โ The Technical Score and MACD filter out 80%+ of bad setups before we even trade. We only see high-probability opportunities.
๐ก๏ธSmall losses โ Every trade has a hard stop-loss at 2โ5% max. No "hopium" holds. A loss is a loss, small and done.
โ๏ธSmart sizing โ 1.5% risk per trade. Even 15 consecutive losses = only 15% drawdown. Still have $17K+ to trade.
๐ฐPartial profits โ We bank profits in stages. By the time the trailing stop triggers, 50-80% of profits are already in the bank.
๐Let winners run โ The trailing stop means we don't sell too early. One 15% winner can cover five 3% losers.
๐ Time limits โ No zombie trades. 25-day max hold means money isn't stuck in dead positions.
๐ The SureWin Formula
High Scores +
Good Momentum +
Smart Sizing +
Disciplined Stops
= Consistent Wins Without Blowing Up ๐
๐ฅ
Try It Yourself โ Score Any Stock
See if your stock gets a โ BUY or โ REJECT using the same scoring formula the system uses for entry decisions.
๐ How this works: The Entry Score (this Excel) and the Live Management System (Section 9) are two separate systems that work together. This calculator handles the first gate โ should you even consider buying?
Step 1: Paste daily OHLCV data into the spreadsheet โ the formulas auto-compute MACD, RSI, ATR, SMA20, Volume Ratio โ the Technical Score tells you โ BUY (โฅ55) or โ REJECT (<55). Step 2: If the score says BUY, the live intraday system takes over โ managing the position with trailing stops, take-profits, time stops, and news exits (see Section 9).
The score filters out bad setups. The live system protects and exits good ones.