trading

Swing Trading for Engineers: A Systematic Approach That Doesn't Require Watching Charts All Day

How I built a rules-based swing trading system as a full-time engineer. Entry signals, position sizing, stop-loss rules, and the exact tools I use.

April 4, 2026·7 min read·
#swing-trading#stocks#technical-analysis#passive-income#investing

Engineers are actually well-suited to trading — if they take the right approach. The wrong approach is watching charts all day and making emotional decisions. The right approach is building a rules-based system and executing it like a program.

This is my swing trading system: defined inputs, defined outputs, no discretion. 4–6 trades per month. An hour of work per week.

Disclaimer: This is not financial advice. Trading involves significant risk of loss. Past results don't guarantee future performance. Only trade money you can afford to lose.

Why Swing Trading (Not Day Trading)

Day trading is a full-time job with a 90%+ failure rate. You compete against HFT algos with microsecond advantages, professional traders watching 6 screens, and market makers who profit on every fill.

Swing trading holds positions 2–10 days. You're not competing against algos — you're identifying momentum shifts and riding them. You can do it in 30 minutes before work.

The tradeoff: fewer trades, but higher win rate and better risk-adjusted returns than most day traders.

The Setup I Look For

I trade one pattern with slight variations: momentum continuation on a pullback.

The conditions:

  1. Stock is in a defined uptrend (higher highs, higher lows on the daily chart)
  2. Price pulls back 5–15% from recent high
  3. Pullback holds above the 21-day EMA
  4. Volume contracts during the pullback (sellers aren't motivated)
  5. Momentum indicator (RSI) resets to 40–55 range

When all 5 conditions align, I set an entry above the most recent candle's high.

Why this works: Strong trends don't end on light-volume pullbacks. Smart money adds on dips. You're joining them.

Scanning for Setups

I run this scan every Sunday night (takes 20 minutes):

Finviz filters:

  • Market cap > $1B (large enough to be liquid)
  • Price > $10 (avoid penny stocks)
  • Average volume > 500K shares
  • Up 20–100% over the past 6 months (proven uptrend)
  • RSI 40–60 (pulled back, not extended)
  • Price within 10% of 52-week high

This typically returns 30–60 stocks. I manually scan charts for the exact pattern — takes another 20 minutes.

Result: 3–8 high-quality setups per week. I'll take 1–2 trades.

Entry, Stop, and Target

Entry: Buy limit order placed 2 cents above the previous day's high. Only triggers if price breaks out. If it doesn't break out, the order never fills — I move on.

Stop-loss: Below the recent swing low (the low of the pullback). Typical stop: 5–8% below entry.

Position size: Risking 1% of account per trade (more on this below).

Target: I use a 2:1 minimum risk-reward ratio. If my stop is $5 below entry, I need at least $10 upside potential. I set a partial profit target at 1:1 (cover half the position) and let the rest run with a trailing stop.

Example:

  • Stock: hypothetical XYZ Corp
  • Entry: $52.10 (above previous day high of $52.08)
  • Stop: $48.50 (below swing low)
  • Risk: $3.60 per share
  • Position size (1% of $50K account): $500 / $3.60 = 138 shares
  • 1:1 target: $55.70 (sell 69 shares)
  • Trailing stop: moves up as price rises

Position Sizing: The Rule That Keeps You in the Game

This is where engineers get it right and gamblers get it wrong. Position sizing is the most important mechanical skill in trading.

The formula:

Shares = (Account × Risk %) / (Entry − Stop)

If my account is $50,000 and I risk 1% per trade:

  • Max risk = $500
  • Entry $52, stop $48.50 = $3.50 risk per share
  • Shares = $500 / $3.50 = 142 shares
  • Position size = 142 × $52 = $7,384 (14.7% of account)

This ensures that even if 5 trades in a row hit stops (unlikely but possible), I've only lost 5% of my account. I can still recover.

Never risk more than 2% per trade. Most professionals risk 0.5–1%.

The Watchlist Automation

I script my weekly scan using Python + yfinance:

import yfinance as yf
import pandas as pd

def check_setup(ticker: str) -> dict:
    stock = yf.Ticker(ticker)
    hist = stock.history(period="6mo")
    
    if len(hist) < 100:
        return {"ticker": ticker, "setup": False}
    
    # Calculate indicators
    hist['EMA21'] = hist['Close'].ewm(span=21).mean()
    hist['EMA50'] = hist['Close'].ewm(span=50).mean()
    
    delta = hist['Close'].diff()
    gain = (delta.where(delta > 0, 0)).rolling(14).mean()
    loss = (-delta.where(delta < 0, 0)).rolling(14).mean()
    rs = gain / loss
    hist['RSI'] = 100 - (100 / (1 + rs))
    
    latest = hist.iloc[-1]
    prev = hist.iloc[-2]
    
    # Check conditions
    uptrend = latest['Close'] > latest['EMA21'] > latest['EMA50']
    rsi_reset = 40 <= latest['RSI'] <= 58
    near_high = latest['Close'] >= hist['Close'].rolling(20).max().iloc[-1] * 0.90
    
    # Volume contraction on pullback
    avg_vol = hist['Volume'].rolling(20).mean().iloc[-1]
    low_volume = latest['Volume'] < avg_vol * 0.8
    
    setup = uptrend and rsi_reset and near_high and low_volume
    
    return {
        "ticker": ticker,
        "setup": setup,
        "close": round(latest['Close'], 2),
        "rsi": round(latest['RSI'], 1),
        "ema21": round(latest['EMA21'], 2),
    }

# Run on your watchlist
watchlist = ["AAPL", "MSFT", "NVDA", "META", "GOOGL"]  # add your own
results = [check_setup(t) for t in watchlist]
setups = [r for r in results if r['setup']]
print(pd.DataFrame(setups))

This runs in 2 minutes. On Sunday evenings I run it against 100+ tickers and review only the flagged ones.

Trade Management: The Hard Part

Entry: Set the limit order, go to work. Either it fills or it doesn't.

If it fills: Set stop-loss immediately. Not "I'll watch it and cut if needed." A market order sitting in the book, no excuses.

At 1:1 profit target: Sell half. Move stop to breakeven on the remaining half. You're now playing with house money on the second half — worst case is flat on the trade.

Trailing stop (remaining half): Move stop below each new higher low on the daily chart. Let it ride until the trend breaks.

What I never do:

  • Move my stop down because "it's close to bouncing"
  • Add to a losing position
  • Hold through earnings (exit before, re-enter after)
  • Take a trade out of boredom

Rules exist because humans are bad at in-the-moment decisions. The system decides. You execute.

Realistic Expectation Setting

With this system across 2023–2025:

  • Win rate: 52–58% (you don't need 70% to be profitable)
  • Average winner: +8–12% (exits at trailing stop)
  • Average loser: -5–7% (always exits at mechanical stop)
  • Trades per month: 4–6
  • Monthly return: 2–5% in good market conditions

A 52% win rate with 2:1 reward-to-risk is mathematically profitable. You can win 48% of trades and still make money.

The months it doesn't work: high volatility, choppy markets with no trend. I reduce position size and sit out more. Capital preservation > aggressive trading in bad conditions.

The "Set It and Check It" Workflow

Sunday (20 min): Run scan, review charts, identify 3–5 setups, place limit orders for Monday.

Weekday morning (5 min): Check if orders filled overnight, confirm stops are set.

Weekday evening (5 min): Check open positions, update trailing stops if price moved favorably.

Friday (10 min): Review the week, close any positions you don't want to hold over weekend (optional).

Total: 45–60 minutes per week. That's a part-time job that can compound meaningful returns without affecting your primary career.

Building the Habit

The first 3 months are the hardest. You'll make mistakes — taking trades that don't fully meet criteria, moving stops, holding losers too long. That's normal.

Keep a trade journal. After every trade, write:

  • Why you entered (which criteria were met)
  • What you did right
  • What you broke (rules, psychology)
  • What you'd do differently

After 6 months of journaling, patterns emerge. You'll see which types of setups you execute well and which you mess up. You refine the system around your psychological edge.

Trading is a skill that compounds. The engineer who spends 12 months building a disciplined system will outperform someone gambling on tips for 10 years.

Same principles apply as systems engineering: define the system, measure the outputs, iterate based on data. Emotion is a bug.

#swing-trading#stocks#technical-analysis#passive-income#investing
D
DevToCashAuthor

Senior DevOps/SRE Engineer · 10+ years · Professional Trader (IDX, Crypto, US Equities)

I write about real infrastructure patterns and trading strategies I use in production and in live markets. No courses, no affiliate hype — just documentation of what actually works.

More about me →