Skip to main content

StrategyScalpingFast2 Strategy Analysis

Strategy ID: #398 (391st of 465 strategies)
Strategy Type: Multi-Timeframe Scalping Strategy + Parameterized Configurable System
Timeframe: 1 minute (1m) + Resampled 5-minute trend confirmation


I. Strategy Overview

StrategyScalpingFast2 is an enhanced upgraded version of StrategyScalpingFast, improved based on the ReinforcedSmoothScalp strategy. While retaining the original scalping core logic, it adds multi-timeframe trend confirmation and parameterized configuration system, making the strategy more flexible and tunable.

Core Characteristics

FeatureDescription
Buy ConditionParameterized buy signal, supports 4 optional conditions
Sell ConditionParameterized sell signal, supports 5 optional conditions
Protection MechanismTiered ROI profit taking + fixed stop loss 32.6%
Timeframe1m execution + 5m resampled trend confirmation
Dependenciestalib, qtpylib, technical, numpy
Special FeaturesParameterized buy/sell conditions, multi-timeframe, resampled SMA trend filter

II. Strategy Configuration Analysis

2.1 Basic Risk Parameters

# ROI exit table (tiered profit taking)
minimal_roi = {
"0": 0.082, # After 0 minutes, 8.2% profit target
"18": 0.06, # After 18 minutes, 6% profit target
"51": 0.012, # After 51 minutes, 1.2% profit target
"123": 0 # After 123 minutes, sell at any profit
}

# Stop loss setting
stoploss = -0.326 # 32.6% fixed stop loss

# Sell signal configuration
use_sell_signal = False # Don't use custom sell signal

Design Rationale:

  • Tiered ROI: Decreasing profit targets over time, adapting to different market conditions
  • Large stop loss space: 32.6% stop loss gives the strategy greater fluctuation tolerance
  • Conservative profit taking: Longer holding time means lower profit threshold, ensuring eventual exit

2.2 Buy Parameter Configuration

buy_params = {
"mfi-value": 19, # MFI threshold
"fastd-value": 29, # FastD threshold
"fastk-value": 19, # FastK threshold
"adx-value": 30, # ADX threshold
"mfi-enabled": False, # MFI condition enabled
"fastd-enabled": False, # FastD condition enabled
"adx-enabled": False, # ADX condition enabled
"fastk-enabled": False, # FastK condition enabled
}

2.3 Sell Parameter Configuration

sell_params = {
"sell-mfi-value": 89, # Sell MFI threshold
"sell-fastd-value": 72, # Sell FastD threshold
"sell-fastk-value": 68, # Sell FastK threshold
"sell-adx-value": 86, # Sell ADX threshold
"sell-cci-value": 157, # Sell CCI threshold
"sell-mfi-enabled": True, # MFI sell condition enabled
"sell-fastd-enabled": True, # FastD sell condition enabled
"sell-adx-enabled": True, # ADX sell condition enabled
"sell-cci-enabled": False, # CCI sell condition enabled
"sell-fastk-enabled": False, # FastK sell condition enabled
}

III. Buy Conditions Explained

3.1 Core Buy Logic

The strategy uses a base conditions + optional conditions flexible architecture:

# Base conditions (must meet)
conditions.append(dataframe["volume"] > 0) # Has volume
conditions.append(dataframe['open'] < dataframe['ema_low']) # Price below EMA lower band
conditions.append(dataframe['resample_sma'] < dataframe['close']) # Resampled SMA confirms trend

# Optional conditions (enabled based on parameters)
if self.buy_params['adx-enabled']:
conditions.append(dataframe["adx"] < self.buy_params['adx-value'])
if self.buy_params['mfi-enabled']:
conditions.append(dataframe['mfi'] < self.buy_params['mfi-value'])
if self.buy_params['fastk-enabled']:
conditions.append(dataframe['fastk'] < self.buy_params['fastk-value'])
if self.buy_params['fastd-enabled']:
conditions.append(dataframe['fastd'] < self.buy_params['fastd-value'])
if self.buy_params['fastk-enabled'] == True & self.buy_params['fastd-enabled'] == True:
conditions.append(qtpylib.crossed_above(dataframe['fastk'], dataframe['fastd']))

3.2 Condition Classification

Condition GroupConditionDefault StatusDescription
Base Conditionsvolume > 0RequiredEnsures there's volume
Base Conditionsopen < ema_lowRequiredPrice below EMA lower band
Base Conditionsresample_sma < closeRequired5-minute trend up confirmation
Optional ConditionsADX < 30DisabledTrend strength filter
Optional ConditionsMFI < 19DisabledMoney flow oversold
Optional ConditionsFastK < 19DisabledStochastic K oversold
Optional ConditionsFastD < 29DisabledStochastic D oversold
Optional ConditionsK crosses above DDisabledGolden cross confirmation

3.3 Multi-Timeframe Trend Confirmation

This is the most important upgrade of StrategyScalpingFast2 compared to the original:

# Resample factor
resample_factor = 5 # 1 minute * 5 = 5 minute trend

# Calculate 5-minute SMA
tf_res = timeframe_to_minutes(self.timeframe) * self.resample_factor # = 5
df_res = resample_to_interval(dataframe, tf_res) # Resample to 5 minutes
df_res['sma'] = ta.SMA(df_res, 50, price='close') # 50-period SMA
dataframe = resampled_merge(dataframe, df_res, fill_na=True) # Merge back to 1 minute

# Trend confirmation condition
dataframe['resample_sma'] < dataframe['close'] # Price above 5-minute SMA

Significance: Only buy when price is above the 5-minute SMA, ensuring trend-following trading, avoiding counter-trend bottom fishing.


IV. Sell Logic Explained

4.1 Sell Signal Structure

# Base condition
conditions.append(dataframe['open'] >= dataframe['ema_high']) # Price touches EMA upper band

# Optional conditions
if self.sell_params['sell-fastd-enabled']:
conditions.append(
(qtpylib.crossed_above(dataframe['fastk'], self.sell_params['sell-fastk-value'])) |
(qtpylib.crossed_above(dataframe['fastd'], self.sell_params['sell-fastd-value']))
)
if self.sell_params['sell-mfi-enabled']:
conditions.append(dataframe['mfi'] > self.sell_params['sell-mfi-value'])
if self.sell_params['sell-adx-enabled']:
conditions.append(dataframe["adx"] < self.sell_params['sell-adx-value'])

4.2 Default Sell Conditions

Based on default configuration, sell conditions are:

ConditionThresholdPurpose
open >= ema_high-Price touches EMA upper band
fastk crosses above 68 or fastd crosses above 7268/72Stochastic overbought
MFI > 8989Money flow overbought
ADX < 8686Trend strength weakening

4.3 Tiered ROI Mechanism

Time RangeROI TargetDescription
0-18 minutes8.2%Pursuing high returns
18-51 minutes6%Slightly lower target
51-123 minutes1.2%Even lower target
After 123 minutesAny profitSell as long as profitable

Design Philosophy: Longer holding time means lower profit requirements, ensuring eventual exit.


V. Technical Indicator System

5.1 Core Indicators

CategoryIndicatorParametersPurpose
TrendEMAPeriod 5Price envelope
TrendSMA (resampled)Period 505-minute trend confirmation
OscillatorStochastic Fast5, 3, 0, 3, 0Overbought/oversold
Trend StrengthADXDefaultTrend momentum
Money FlowMFIDefaultMoney flow
OscillatorCCIPeriod 20Overbought/oversold
TrendRSIPeriod 14Calculated (not used)
VolatilityBollinger Bands20, 2Chart display

5.2 Resampling System

# Resampling configuration
timeframe = '1m' # Execution timeframe
resample_factor = 5 # Resample factor

# Actual usage: 1-minute data → 5-minute trend confirmation

Advantages:

  • Execute trades on 1-minute timeframe
  • Use 5-minute trend to filter signals
  • Reduce false signals, improve win rate

VI. Risk Management Features

6.1 Tiered Profit Taking Mechanism

minimal_roi = {
"0": 0.082, # 8.2%
"18": 0.06, # 6%
"51": 0.012, # 1.2%
"123": 0 # Any
}
  • High target start: Initially pursuing 8.2% return
  • Time decreasing: Lower profit expectations over holding time
  • Ensured exit: After 123 minutes, any profit is acceptable

6.2 Large Stop Loss Design

stoploss = -0.326  # 32.6%
  • Giving space: 32.6% stop loss space, avoiding being stopped by normal fluctuations
  • Risk warning: Such a large stop loss needs appropriate position management

6.3 Parameterized Risk Control

Through buy_params and sell_params can flexibly adjust:

  • Adjust buy thresholds to control signal frequency
  • Enable/disable specific conditions
  • Optimize parameters based on market environment

VII. Strategy Advantages and Limitations

✅ Advantages

  1. Parameterized design: Buy/sell conditions configurable, adapting to different markets
  2. Multi-timeframe: 5-minute trend confirmation reduces false signals
  3. Tiered ROI: Flexible profit taking mechanism improves capital efficiency
  4. Modular code: Uses reduce function to combine conditions, clean code
  5. Official recommendation: Suggests running 60+ parallel trades to diversify risk

⚠️ Limitations

  1. Large stop loss risk: 32.6% stop loss is too large for scalping
  2. Conservative default parameters: Most buy conditions disabled by default, may miss opportunities
  3. Increased complexity: 50% more code than original
  4. Technical library dependency: Requires additional dependency installation
  5. Resampling delay: 5-minute confirmation may miss quick reversals

VIII. Applicable Scenario Recommendations

Market EnvironmentRecommended ConfigurationNotes
RangingEnable MFI, FastK/D conditionsIncrease signal frequency
TrendingEnable trend confirmation, rely on SMA filterTrend-following
High volatilityDisable some conditions, reduce signal frequencyReduce false signals
Low volatilityEnable more buy conditionsIncrease trading opportunities

IX. Applicable Market Environment Details

StrategyScalpingFast2 is a parameterized scalping strategy. Based on its code architecture and author recommendations, it's best suited for multi-currency parallel operation, reducing single trading pair risk through diversification.

9.1 Strategy Core Logic

  • Trend filtering: 5-minute SMA confirms overall trend direction
  • Position confirmation: Look for oversold below EMA lower band
  • Parameterized control: Flexibly enable/disable various conditions
  • Tiered profit taking: Adjust return expectations based on holding time

9.2 Performance in Different Market Environments

Market TypeRatingAnalysis
📈 Uptrend⭐⭐⭐⭐⭐5-minute SMA confirms trend, trend-following works well
🔄 Sideways ranging⭐⭐⭐⭐☆Oversold reversal logic effective, but trend filter may miss opportunities
📉 Downtrend⭐⭐☆☆☆SMA filter prevents counter-trend buying, but may trigger stop loss
⚡️ High volatility⭐⭐☆☆☆Noise interference, increased false signals

9.3 Key Configuration Recommendations

ConfigurationRecommendedNotes
Parallel trading pairs60+Author suggests diversification
Stop loss-0.15 ~ -0.20Recommend tightening from 32.6%
Buy MFITrueEnable MFI condition
Buy FastK/DTrueEnable stochastic conditions

X. Important Note: The Cost of Complexity

10.1 Learning Cost

Compared to original StrategyScalpingFast, this version adds:

  • Resampling system
  • Parameterized configuration
  • Condition combination logic

Need to understand more concepts to configure correctly.

10.2 Hardware Requirements

Number of PairsMinimum RAMRecommended RAM
1-20 pairs2GB4GB
20-60 pairs4GB8GB
60+ pairs8GB16GB

10.3 Backtesting vs Live Trading Differences

The strategy author specifically emphasizes:

"We recommend running at least 60 parallel trades to cover inevitable losses"

This means:

  • Single trading pair win rate may not be high
  • Need sufficient capital to support multi-currency operation
  • Diversification reduces single failure impact

10.4 Manual Trading Recommendations

Not recommended to manually replicate this strategy:

  1. Complex parameter configuration, difficult to adjust in real-time
  2. Multi-timeframe needs simultaneous monitoring
  3. Recommended to use quantitative platform for automated execution

XI. Summary

StrategyScalpingFast2 is an enhanced parameterized scalping strategy. Its core value lies in:

  1. Multi-timeframe confirmation: 5-minute trend filtering improves signal quality
  2. Parameterized design: Flexible adjustment for different markets
  3. Tiered profit taking: Time-decreasing ROI improves exit probability
  4. Parallel trade design: Suitable for multi-currency risk diversification

For quantitative traders, this is a strategy suitable as a scalping strategy foundation. Through parameter adjustment can adapt to different market environments, but need to note:

  • Default parameters may be too conservative
  • Stop loss is large, recommend adjusting based on actual situation
  • Need sufficient capital to support multi-currency operation