Skip to main content

StrategyScalpingFast Strategy Analysis

Strategy ID: #397 (397th of 465 strategies)
Strategy Type: Fast Scalping Strategy + Oversold Reversal Capture
Timeframe: 1 minute (1m) primary + 5 minute (5m) auxiliary


I. Strategy Overview

StrategyScalpingFast is a lightweight strategy focused on ultra-short-term scalping. It uses EMA envelopes to determine relative price position, combined with multiple oversold indicators (Stochastic Fast, CCI, MFI) to capture reversal opportunities in extreme oversold zones. The strategy code is concise and efficient, suitable for high-frequency trading scenarios.

Core Characteristics

FeatureDescription
Buy Condition1 composite buy signal with 5 sub-conditions for strict filtering
Sell Condition1 composite sell signal with EMA upper band breakout + overbought confirmation
Protection MechanismFixed stop loss at 10%, no trailing stop
Timeframe1m execution + 5m auxiliary reference
Dependenciestalib, qtpylib

II. Strategy Configuration Analysis

2.1 Basic Risk Parameters

# ROI exit table
minimal_roi = {
"0": 0.01 # 1% profit target
}

# Stop loss setting
stoploss = -0.10 # 10% fixed stop loss

# Trailing stop
trailing_stop = False # Not enabled

Design Rationale:

  • Short profit target: 1% ROI goal is typical for scalping strategies, prioritizing quick profit realization
  • Moderate stop loss: 10% stop loss provides tolerance for price fluctuations, avoiding noise-triggered stops
  • No trailing stop: Simplifies exit logic, relies on signals to trigger sells

2.2 Order Type Configuration

use_sell_signal = False      # Don't use sell signal
sell_profit_only = True # Only sell when profitable
ignore_roi_if_buy_signal = False # Buy signal doesn't override ROI
ignore_buying_expired_candle_after = 0 # Execute immediately

III. Buy Conditions Explained

3.1 Core Buy Logic

The strategy uses a multi-dimensional oversold confirmation entry mechanism, where all conditions must be met simultaneously:

# Buy condition combination
(
(dataframe['open'] < dataframe['ema_low']) & # Price below EMA lower band
(dataframe['adx'] > 30) & # Sufficient trend strength
(dataframe['mfi'] < 30) & # Money flow oversold
(
(dataframe['fastk'] < 30) & # Fast K oversold
(dataframe['fastd'] < 30) & # Fast D oversold
(qtpylib.crossed_above(dataframe['fastk'], dataframe['fastd'])) # K crosses above D
) &
(dataframe['cci'] < -150) # CCI extreme oversold
)

3.2 Condition Breakdown Analysis

#ConditionThresholdLogic
1open < ema_low-Opening price below EMA lower band, price at relatively low position
2ADX > 3030Trend strength indicator, ensures sufficient momentum
3MFI < 3030Money flow index oversold, capital outflow near limit
4fastk < 30 & fastd < 3030Stochastic both lines oversold
5fastk crosses above fastd-Golden cross confirmation, oversold reversal signal
6CCI < -150-150Commodity channel index extreme oversold

3.3 Condition Synergy Analysis

This is a strict multi-confirmation system:

  1. Position confirmation: EMA lower band determines relative price position
  2. Momentum confirmation: ADX ensures trend strength
  3. Money flow confirmation: MFI indicates capital flow direction
  4. Technical confirmation: Stochastic golden cross as entry trigger
  5. Extreme confirmation: CCI ensures extreme oversold state

Trigger Probability: Due to 6 conditions being required simultaneously, trigger frequency is low, but signal quality is high.


IV. Sell Logic Explained

4.1 Sell Signal Structure

# Sell condition combination
(
(
(dataframe['open'] >= dataframe['ema_high']) # Price touches EMA upper band
) |
(
(qtpylib.crossed_above(dataframe['fastk'], 70)) | # Fast K enters overbought
(qtpylib.crossed_above(dataframe['fastd'], 70)) # Fast D enters overbought
)
) & (dataframe['cci'] > 150) # CCI confirms overbought

4.2 Sell Logic Analysis

Trigger ScenarioCondition CombinationSignal Meaning
Scenario 1open >= ema_high AND CCI > 150Price reaches upper band, overbought confirmed
Scenario 2fastk crosses above 70 AND CCI > 150Stochastic overbought, CCI confirms
Scenario 3fastd crosses above 70 AND CCI > 150Stochastic D line overbought, CCI confirms

4.3 Sell Logic Features

  • OR gate design: Any one of three overbought signals triggers, improving sell sensitivity
  • CCI mandatory: Regardless of scenario, CCI must be above 150 to trigger sell
  • Symmetric design: Buy uses CCI < -150, sell uses CCI > 150, perfect symmetry

V. Technical Indicator System

5.1 Core Indicators

CategoryIndicatorParametersPurpose
TrendEMAPeriod 5Price envelope, relative position
Trend StrengthADXDefaultConfirm trend momentum
OscillatorStochastic Fast5, 3, 0, 3, 0Overbought/oversold
OscillatorCCIPeriod 20Extreme overbought/oversold confirmation
Money FlowMFIDefaultMoney flow direction
TrendRSIPeriod 14Calculated (not used in signals)
VolatilityBollinger Bands20, 2Chart display
TrendMACDDefaultCalculated (not used in signals)

5.2 Timeframe Configuration

timeframe = '1m'           # Primary execution timeframe
timeframe_support = '5m' # Support timeframe (reserved)
timeframe_main = '5m' # Main trend timeframe (reserved)

Note: Although 5-minute auxiliary timeframe is defined, it's not actually used in current code; all calculations are done on 1-minute timeframe.


VI. Risk Management Features

6.1 Fixed Stop Loss Mechanism

stoploss = -0.10  # 10% stop loss
  • Moderate stop loss space: 10% stop loss gives the strategy enough fluctuation tolerance
  • Prevent deep losses: Avoid excessive losses from single trades

6.2 Quick ROI Profit Taking

minimal_roi = {"0": 0.01}  # 1% profit taking
  • Quick profit: 1% target fits scalping strategy characteristics
  • Reduce holding risk: Quick profit realization, avoid profit giveback

6.3 Signal-Level Risk Control

Risk ControlImplementation
Trend filteringADX > 30 ensures sufficient momentum
Extreme oversoldCCI < -150 ensures not catching falling knife
Multiple confirmation6 conditions simultaneously reduce false signals

VII. Strategy Advantages and Limitations

✅ Advantages

  1. Concise code: ~100 lines of code, easy to understand and maintain, low computational overhead
  2. Strict signals: 6-layer confirmation, high signal quality, few false signals
  3. Symmetric design: Buy oversold (-150) and sell overbought (+150) form perfect symmetry
  4. Fast turnover: 1% ROI + 1-minute timeframe, high capital turnover efficiency
  5. Hardware friendly: Simple indicator calculations, low VPS requirements

⚠️ Limitations

  1. Low trigger frequency: Multiple conditions simultaneously met less often
  2. No trailing stop: May exit early in trending markets
  3. Wide stop loss: 10% stop loss may be too large for scalping
  4. Unused auxiliary timeframe: 5m timeframe defined but not actually used
  5. Extreme market risk: Crash markets may trigger stops frequently

VIII. Applicable Scenario Recommendations

Market EnvironmentRecommendationNotes
Ranging✅ SuitableOversold reversal performs well in ranging markets
Slow uptrend⚠️ CautiousMay sell too early in trending markets
Crashing❌ Not suitableHigh risk of catching falling knife
High volatility⚠️ CautiousNoise may cause false signals

IX. Applicable Market Environment Details

StrategyScalpingFast is a lightweight scalping strategy. Based on its code architecture, it's best suited for oversold bounce opportunities in ranging markets, while performing poorly in trending and extreme volatility conditions.

9.1 Strategy Core Logic

  • Oversold reversal: Enter at extreme oversold, wait for bounce profit
  • Quick profit taking: 1% profit target, accumulating small gains
  • Multiple confirmation: 6 indicators coordinate confirmation, improving signal quality

9.2 Performance in Different Market Environments

Market TypeRatingAnalysis
📈 Sideways ranging⭐⭐⭐⭐⭐Best battlefield for oversold reversal, high signal quality
🔄 Mild trend⭐⭐⭐☆☆Can catch pullback opportunities, but may sell too early
📉 One-way decline⭐⭐☆☆☆Oversold may deepen, high stop loss risk
⚡️ High volatility⭐⭐☆☆☆More noise, increased false signals

9.3 Key Configuration Recommendations

ConfigurationRecommendedNotes
Stop loss-0.05 ~ -0.10Can appropriately tighten
ROI0.008 ~ 0.015Adjust based on trading pair
Trading pairsMajor pairsBetter liquidity pairs have less noise

X. Important Note: The Cost of Complexity

10.1 Learning Cost

The strategy code is concise, beginners can quickly understand its logic. However, understanding the meaning and synergy of each indicator is needed.

10.2 Hardware Requirements

Number of PairsMinimum RAMRecommended RAM
1-10 pairs1GB2GB
10-30 pairs2GB4GB
30+ pairs4GB8GB

10.3 Backtesting vs Live Trading Differences

The strategy may perform well in backtesting, but live trading requires attention to:

  • Slippage impact: 1-minute timeframe high-frequency trading, slippage costs are significant
  • Latency impact: Network delay may cause entry price deviation
  • Liquidity: Small coins may not execute quickly

10.4 Manual Trading Recommendations

Not recommended to manually replicate this strategy because:

  1. Requires real-time monitoring of multiple indicators
  2. 1-minute timeframe has extremely short reaction time
  3. Low signal trigger frequency, high waiting cost

XI. Summary

StrategyScalpingFast is a concise and efficient ultra-short-term scalping strategy. Its core value lies in:

  1. Lightweight code: 100 lines of code implements complete strategy, low maintenance cost
  2. Strict signals: 6-layer confirmation mechanism, guaranteed signal quality
  3. Symmetric elegance: Buy and sell logic symmetric, easy to understand and optimize

For quantitative traders, this is a strategy suitable as a scalping strategy starter template. Parameters (like CCI threshold, ADX threshold) can be adjusted to adapt to different market environments. However, sufficient backtesting and simulation testing must be done before live trading.