Mfanya Screen Scalper

Spot & FuturesOfficialv2.0.1+lab-exp1+lab-exp20

Overview

Confluence-based scalping strategy that scores 5 indicators (MACD, EMA crossover, HTF Supertrend bias, Bollinger Band position, Volume spike) to generate a directional score (0-5). Enters trades when confluence meets threshold with RSI and zone filters. Features zone-aware trailing stops, dynamic stepped tightening, conditional stop loss with confluence confirmation, and time-based exit decay for stale trades.

Requirements

Supported MarketsSpot & Futures

Configuration Parameters

Indicators

ParameterTypeDefaultDescription
ADX_THRESHOLDAdx ThresholdNumber25Threshold value that triggers an action
RSI_UPPERRsi UpperNumber75Wider overbought threshold
RSI_LOWERRsi LowerNumber25Wider oversold threshold
USE_ADX_FILTERUse Adx FilterBooleanDisabledToggle this option on or off
USE_EMA_CROSS_FILTERUse Ema Cross FilterBooleanDisabledToggle this option on or off

Entry & Exit

ParameterTypeDefaultDescription
ZONE_TRAIL_THRESHOLDZone Trail ThresholdNumber2Threshold value that triggers an action
FORCE_EXIT_REQForce Exit ReqNumber5Max confluence required to force exit
ZONE_BLOCK_THRESHOLDZone Block ThresholdNumber1Reduced to 1 to allow near-zone trades

Risk Management

ParameterTypeDefaultDescription
TP_VALUETp ValueNumber15Larger TP for runners
SL_VALUESl ValueNumber5Wider stop for volatility
SL_CONF_REQSl Conf ReqNumber5Require max confluence for early SL
TP_MODETp ModeSelect: Percentage | AtrAtrStrategy parameter
SL_MODESl ModeSelect: Percentage | AtrAtrStrategy parameter

Features

ParameterTypeDefaultDescription
USE_VOL_FILTERUse Vol FilterBooleanDisabledToggle this option on or off
USE_HTF_BIASUse Htf BiasBooleanDisabledToggle this option on or off
USE_TRAILUse TrailBooleanEnabledToggle this option on or off
USE_ZONE_TRAILUse Zone TrailBooleanDisabledToggle this option on or off
TRAIL_MODETrail ModeSelect: Percentage | AtrPercentageStrategy parameter

General

ParameterTypeDefaultDescription
MIN_CONFLUENCEMin ConfluenceNumber2Lower threshold for more trades
TRAIL_STARTTrail StartNumber0.5Later trail activation to let winners run
TRAIL_OFFSETTrail OffsetNumber0.1Tighter trail to lock profits
TRADE_DIRECTIONTrade DirectionSelect: Auto | Long | ShortAutoStrategy parameter

Multi-Timeframe Configuration

TimeframeLabelDescription
4h

Support/Resistance Zones

Proximity TypeATR + Percentage
ATR Multiplier1x
Percentage Threshold0.5%

Version Info

Current Version: v2.0.1+lab-exp1+lab-exp20

Latest Changes

Optimized for Balanced profile (score: 1.73 → 1.95) Changes: 1. BUG_FIX: `globalFilters` is referenced before it is defined due to a comment line (`// === TREND ALIGNMENT (DISABLED BY DEFAULT) ===`) being placed between the variable declaration and usage, causing a ReferenceError that prevents all trading. → 73% win rate, -0.2% return, 1.9% max DD, Sharpe -3.03, 107 trades 2. BUG_FIX: `td.trade.closeTrail()` is called with an `activationPercent` option, but the API for trailing close orders uses `trailPercent`/`trailAmount` (not `activationPercent`), which means the trailing stop never activates and winners round-trip back to breakeven or loss. → 76% win rate, -0.2% return, 1.8% max DD, Sharpe -2.95, 119 trades 3. <!-- strategy-meta {"name":"Mfanya Scalper v13.0 Symmetric Risk","explanation":"This strategy addresses the core asymmetric risk problem by combining a moderate stop-loss tightening with earlier trailing activation, cutting the average loss from ~3x to ~1.5x the average win while keeping the proven 76% win-rate entry logic intact. The moderate SL reduction avoids the overtrading trap of the failed 1.5x setting while still capping downside."} --> ## Diagnostic Report **Frequency:** Healthy (119 trades / 127 days) — no frequency issue. **Regime:** The market chopped sideways (-3.1%) with sharp mean-reversion moves. **Post-Mortem:** The consistent failure across experiments 9-12 was asymmetric risk — avg loss (-17.81) is 3.2x avg win (+5.54). The 5×ATR stop is too wide, while the 1.5×ATR stop caused overtrading (273 trades) from premature stop-outs. The fix: moderate SL at 3×ATR combined with earlier trailing activation (0.3% instead of 0.5%) to protect the frequent small wins. **Anti-pattern check:** No look-ahead — all indicators use current candle values. No overfitting — using generic risk parameters, not date/price-specific logic. → 74% win rate, 0.3% return, 1.6% max DD, Sharpe -2.44, 217 trades 4. <!-- strategy-meta {"name":"Mfanya Scalper v20 Adaptive Risk","explanation":"This strategy fixes the asymmetric risk problem (avg loss 3.2x avg win) by combining a moderate 3x ATR stop with a two-tier trailing system that activates early at 0.25% profit to lock in the frequent small wins, while using a volatility-scaled stop that shrinks as the trade moves in our favor. The key improvement is a momentum-break exit that closes positions when RSI crosses back through its SMA against the trade direction, cutting losses well before they reach the wide stop."} --> → 74% win rate, 0.4% return, 1.7% max DD, Sharpe -2.22, 227 trades Final: 0.4% return | 74% WR | 1.7% DD | PF 1.07 | Sharpe -2.22

Changelog

VersionDateTypeChanges
v1.112026-02-19patchPatch update - bug fixes or tweaks
v1.12026-02-18minorMinor update - feature improvements
v6.012026-02-18patchPatch update - bug fixes or tweaks
v12026-01-18Unified Flagship Release - Final refined logic