Strategy vault / Trend following
Quantitative Trend Tracking Strategy Based on Multiple Technical Indicators
This strategy combines multiple technical indicators such as Bollinger Bands, Stochastic Oscillator, and Relative Strength Index to set buy and sell signals for long-term trend tracking operations on crypto assets…

Overview
This strategy combines multiple technical indicators such as Bollinger Bands, Stochastic Oscillator, and Relative Strength Index to set buy and sell signals for long-term trend tracking operations on crypto assets. The strategy is named "Multi-factor Crypto Quantitative Strategy".
Strategy Principle
The strategy first sets the calculation parameters for indicators like Bollinger Bands, Stochastic Oscillator, and RSI. The buy signal is defined as: close below the Bollinger Lower Band, K line below 20 and above D line, RSI below 30. When all three conditions are met at the same time, go long. The sell signal is partially defined as: K line above 70 and below 70 in the previous period (golden cross dead cross), and there is RSI divergence. When these two conditions are met, close 50% of the position.
Advantage Analysis
This strategy combines multiple indicators to judge the market condition and avoids misjudgment caused by a single indicator. Bollinger Bands to judge whether it is oversold, Stochastic Oscillator to judge whether it is oversold, and RSI to judge whether it is overoversold. The combined effects of multiple indicators can effectively identify market bottoms for accurate long. In addition, the strategy also uses RSI divergence to judge potential trend reversals to avoid late stop loss. Therefore, this strategy can better seize low buy high sell opportunities.
Risk Analysis
This strategy relies on parameter optimization. If the parameters are set improperly, it will fail to correctly identify bottoms and peaks. In addition, there may be incorrect combinations between indicators. For example, Bollinger Bands identify oversold, but other indicators do not reach the corresponding conditions. All these situations can lead to unnecessary losses. Finally, the strategy does not consider the maximum drawdown and position management, which also needs optimization.
Optimization Directions
Test and optimize indicator parameters to find the best parameter combination.
Add maximum drawdown control to pause trading when reaching the threshold.
Add a position management module to dynamically adjust positions based on market conditions. The initial position is smaller and can be increased later.
Add a stop loss strategy. When the market direction is incorrectly determined, set a reasonable stop loss point to control single loss.
Summary
The overall idea of this strategy is clear. Through the judgment of multiple indicators, it has a strong ability to capture bottoms and peaks. But some parameters and modules still have room for optimization. With proper adjustments, it can become a stable profit quantitative strategy.
Source Pine Script
/*backtest
start: 2024-01-14 00:00:00
end: 2024-01-21 00:00:00
period: 1m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=5
strategy("Stratégie d'Entrée et de Sortie Longue", overlay=true)
// Paramètres des indicateurs
longueurBollinger = 20
stdDevBollinger = 2
longueurStochastic = 14
smoothK = 3
smoothD = 3
longueurRSI = 14
// Bollinger Bands
basis = ta.sma(close, longueurBollinger)
dev = ta.stdev(close, longueurBollinger)
lowerBand = basis - stdDevBollinger * dev
// Stochastic Oscillator
k = ta.sma(ta.stoch(close, high, low, longueurStochastic), smoothK)
d = ta.sma(k, smoothD)
// RSI
rsi = ta.rsi(close, longueurRSI)
// Logique des autres indicateurs (à compléter)
// Conditions d'entrée (à définir)
conditionBollinger = close < lowerBand
conditionStochastic = k < 20 and k > d
conditionRSI = rsi < 30
// Autres conditions (Braid Filter, VolumeBIS, Price Density...)
conditionEntree = conditionBollinger and conditionStochastic and conditionRSI // et autres conditions
// Exécution du trade (entrée)
if (conditionEntree)
strategy.entry("Long Position", strategy.long)
// Conditions de sortie
stochCrossOver70 = k > 70 and k[1] <= 70
// Simplification de la détection de divergence baissière
// (Cette méthode est basique et devrait être raffinée pour une analyse précise)
highsRising = high > high[1]
lowsRising = low > low[1]
rsiFalling = rsi < rsi[1]
divergenceBearish = highsRising and lowsRising and rsiFalling
// Clôturer la moitié de la position
if (stochCrossOver70 and divergenceBearish)
strategy.close("Long Position", qty_percent = 50)
Published by ChaoZhang on the FMZ strategy square · last modified 2024-01-22. Collected in the Quant Trading Vault. Unvalidated research: re-test with your own data and costs before trusting it.
Build this with AgenKit
A spec is not a trading system. Paste this into your coding agent and AgenKit runs a specialist team — architecture, test-first build, risk gates, review — with paper trading on by default.
/agenkit build a production-grade trading bot with a backtest engine, risk controls and paper trading by default from strategies/Quantitative-Trend-Tracking-Strategy-Based-on-Multiple-Technical-Indicators.md- npx agenkit install engineering-kit in your project
- Paste the command into your agent and approve each phase
- Get tests, backtest, risk controls and a paper-trading switch
Understand it first
Before you run this, read the lesson behind the idea and how to backtest it honestly. Specs like this one are the survivors of an unknown number of trials; deflate their results accordingly.
Related specs
- Multi Indicator Trend Divergence Quantitative Trading StrategyPine Script · Trend following · 1d
- Multi Technical Indicator Moving Average Crossover Trend Following Quantitative Trading StrategyPine Script · Trend following · 1h
- Triple SuperTrend Quantitative Trading StrategyPine Script · Trend following · 1d
- Enhanced Moving Average Crossover Sakkoulas Trading StrategyPine Script · Trend following · 1h
- Trend Following Strategy Based on Multiple IndicatorsPine Script · Trend following · 2h
- Multi Indicator Golden Swing Trading StrategyPine Script · Trend following · 45m