Strategies

KlawTrade ships with two built-in rule-based strategies that can run independently or together. Each strategy generates signals with a confidence score, which then pass through the 14-check risk management gate before any order is placed.

Momentum Strategy

The momentum strategy identifies stocks with strong upward price trends using a combination of moving average crossovers, momentum oscillators, and a long-term trend filter. It aims to enter positions early in a trend and ride them until momentum fades.

Indicators

  • SMA Crossover -- 20-period SMA crossing above the 50-period SMA confirms short-term trend direction
  • RSI (14) -- Relative Strength Index must be below 70, confirming momentum without overbought conditions
  • MACD (12/26/9) -- MACD line above the signal line confirms accelerating momentum
  • SMA 200 Trend Filter -- price must be above the 200-period SMA, ensuring the long-term trend is bullish
  • ATR (14) -- Average True Range used for stop-loss and take-profit placement

Buy Conditions

All four conditions must be met simultaneously for a buy signal to trigger:

  1. SMA 20 is above SMA 50
  2. RSI is below 70 (not overbought)
  3. MACD line is above the signal line
  4. Price is above SMA 200

Close Conditions

The position is closed when any of the following occur:

  • SMA 20 crosses below SMA 50
  • RSI rises above 80 (overbought)
  • Price drops below SMA 50

Risk Parameters

  • Stop loss -- 2x ATR below the entry price
  • Take profit -- 3x ATR above the entry price (minimum 2:1 reward-to-risk ratio)

Mean Reversion Strategy

The mean reversion strategy identifies oversold stocks that are likely to bounce back toward their average price. It uses Bollinger Bands to detect price extremes and oscillators to confirm oversold conditions.

Indicators

  • Bollinger Bands (20, 2σ) -- 20-period SMA with 2 standard deviation bands to identify when price has moved to an extreme
  • RSI (14) -- confirms oversold conditions below 30
  • Stochastic RSI (14) -- provides additional oversold confirmation when below 0.2 (normalized 0-1 scale)

Buy Conditions

All three conditions must be met for a buy signal:

  1. Price drops below the lower Bollinger Band
  2. RSI is below 30
  3. Stochastic RSI is below 0.2

Close Conditions

The position is closed when any of the following occur:

  • Price rises above the upper Bollinger Band
  • RSI rises above 70
  • Stochastic RSI rises above 0.8

Take Profit Target

The primary take profit target is the Bollinger midband (20-period SMA), which represents the "mean" the price is expected to revert to. If the midband target does not provide at least a 2:1 reward-to-risk ratio, the system falls back to 3x ATR above entry.