mcpField
V
viper-strategy

viper-strategy

github.com/senpi-aiOther14051 installsUpdated today
Repository

About viper-strategy

viper-strategy is a range-trading skill for the Senpi trading environment. It scans assets with high open interest and defines selective entries, risk limits, and High Water Mode stop management.

Key features

  1. 01Scans for range setups every 5 minutes
  2. 02Filters with Bollinger Bands, RSI, and volume
  3. 03Enters longs at support and shorts at resistance
  4. 04Uses High Water Mode trailing stops
  5. 05Sets position and daily risk limits

Use cases

  1. 01Finding setups in low-volatility ranging markets
  2. 02Entering long or short positions from strategy signals
  3. 03Managing position exits and trading risk

MCP support

The skill requires checking Senpi MCP and references MCP helpers in its scripts; the input does not specify the tools exposed.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/senpi-ai/senpi-skills --skill viper-strategy

After installing, type/viper-strategyin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

README.md
runtime.yaml
config/
viper-config.json
references/
skill-attribution.md
scripts/
viper-scanner.py
viper_config.py

Details

From the project README

VIPER v2.1 — Range-Bound Liquidity Sniper

The chop predator. When every momentum strategy is sitting idle because nothing is trending, VIPER is working.

+6.2% ROI and climbing. Second-best performer on the Senpi Predators tracker.

What VIPER Does

VIPER scans the top 25 assets by USD-weighted open interest every 5 minutes. It looks for assets stuck in a range — price bouncing between support and resistance — and enters at the boundaries:

  • Long at support when price is at the bottom of a tight Bollinger Band range, RSI is oversold, and volume is declining (sellers exhausting)
  • Short at resistance when price is at the top of a tight range, RSI is overbought, and volume is declining (buyers exhausting)

The edge: range-bound markets are predictable. Support holds, resistance holds, and the bounce is mechanical. VIPER catches that bounce.

MANDATORY: DSL High Water Mode

VIPER MUST use DSL High Water Mode. This is not optional.

Spec: https://github.com/Senpi-ai/senpi-skills/blob/main/dsl-dynamic-stop-loss/dsl-high-water-spec%201.0.md

When creating DSL state files for any VIPER position, you MUST include:

{
  "lockMode": "pct_of_high_water",
  "phase2TriggerRoe": 5,
  "tiers": [
    {"triggerPct": 5,  "lockHwPct": 30, "consecutiveBreachesRequired": 3},
    {"triggerPct": 10, "lockHwPct": 50, "consecutiveBreachesRequired": 2},
    {"triggerPct": 15, "lockHwPct": 70, "consecutiveBreachesRequired": 2},
    {"triggerPct": 20, "lockHwPct": 85, "consecutiveBreachesRequired": 1}
  ]
}

If tiers or lockMode is missing from the state file, the DSL engine falls back to flat 1.5% retrace and High Water Mode is silently disabled. Always verify the state file contains these fields after creation.

FALLBACK (until DSL engine supports pct_of_high_water): Use tiersLegacyFallback from config.

Entry Requirements

SignalRequirement
Bollinger Band width< 4% (tight range)
ATR< 1.5% (low volatility)
RSIOversold (< 35) for longs, overbought (> 65) for shorts
VolumeDeclining (sellers/buyers exhausting)
OI (USD-weighted)≥ $5M (liquid enough to trade)
Min score5

All filters must pass. If any fails, skip. VIPER is selective — most scans produce zero signals.

DSL Configuration

Phase 1 — Structural Invalidation Only
SettingValue
Hard timeoutDisabled (0)
Weak peak cutDisabled (0)
Dead weightDisabled (0)
Floor base1.5% notional

No time exits. If the range breaks, the floor catches it. If the range holds, patience wins.

Phase 2 — High Water Mode
TierTrigger ROELock (% of HW)Breaches
15%30%3
210%50%2
315%70%2
420%+85%1 (infinite trail)

Phase 2 triggers at +5% ROE (lower than momentum skills — range profits are smaller, start protecting earlier).

Stagnation TP

5% ROE stale for 30 minutes → close. Range bounces play out quickly. If the profit stalls, take it.

Margin & Position Sizing

SettingValue
Margin per trade28% of account
Max positions3
LeverageDefault 10x

3 slots × 28% = 84% utilization. VIPER deploys capital aggressively because range entries have higher win rates.

Risk Management

RuleValue
Max entries/day8
Daily loss limit8%
Max drawdown18%
Max single loss5% of account
Max consecutive losses4 → 20 min cooldown

Cron Architecture

CronIntervalSessionPurpose
Scanner5 minisolatedRange detection + entry signals
DSL v53 minisolatedHigh Water Mode trailing stops

Both MUST be isolated sessions with agentTurn. Use NO_REPLY for idle cycles.

Notification Policy

ONLY alert: Position OPENED (asset, direction, support/resistance level, score), position CLOSED (DSL or structural exit), risk triggered, critical error. NEVER alert: Scanner found nothing, DSL routine, any reasoning. All crons isolated. NO_REPLY for idle cycles.

Bootstrap Gate

On EVERY session, check config/bootstrap-complete.json. If missing:

  1. Verify Senpi MCP
  2. Create scanner cron (5 min, isolated) and DSL cron (3 min, isolated)
  3. Write config/bootstrap-complete.json
  4. Send: "🐍 VIPER is online. Scanning for range-bound setups. Silence = nothing is ranging."

Optional: Trading Strategy Variant

VIPER is proven at +6.2% ROI as-is. One variant is available:

StrategyWhat ChangesWhen To Consider
MAMBAVIPER entries + High Water Mode with wider tiersWhen you want to capture range breakouts that escape into trends

Start with vanilla VIPER. MAMBA is the upgrade path for capturing more from breakout trades.

Expected Behavior

MetricExpected
Trades/day3-8
Win rate~60-65% (range entries are predictable)
Avg winner5-15% ROE
Avg loser-8 to -12% ROE
Fee drag/day$8-20
Profit factorTarget 1.2-1.5

Files

FilePurpose
scripts/viper-scanner.pyRange detection + entry signals
scripts/viper_config.pyShared config, MCP helpers, state I/O
config/viper-config.jsonAll configurable variables with DSL High Water tiers + legacy fallback
DSL v5 (shared)Trailing stop engine — MUST be configured with High Water Mode

License

MIT — Built by Senpi (https://senpi.ai). Source: https://github.com/Senpi-ai/senpi-skills


Skill Attribution

When creating a strategy, include skill_name and skill_version in the call. See references/skill-attribution.md for details.

Comments

Markdown supported