Skip to content

Latest commit

 

History

History
236 lines (146 loc) · 9.1 KB

双轨快速量化反转交易策略Dual-Track-Fast-Quantitative-Reversal-Trading-Strategy.md

File metadata and controls

236 lines (146 loc) · 9.1 KB

Name

双轨快速量化反转交易策略Dual-Track-Fast-Quantitative-Reversal-Trading-Strategy

Author

ChaoZhang

Strategy Description

IMG [trans]

概述

本策略是一个基于价格通道、布林带、快速RSI指标的双轨反转交易策略。它结合了通道指标识别趋势,布林带识别支撑阻力,以及快速RSI判断超买超卖的信号,实现高效的反转交易。

策略原理

该策略主要基于以下几个指标进行交易决策:

  1. 价格通道:计算一定周期内的最高价和最低价,并绘制通道中轴。价格突破通道时产生交易信号。

  2. 布林带:中轴为价格通道中轴,通过计算价格与中轴的偏离标准差构建上下轨。价格与布林带上下轨互动时产生交易信号。

  3. 快速RSI(2周期):判断价格的超买超卖情况,RSI低于5时做多,高于95时做空。

  4. CryptoBottom指标:判断价格是否跌破支持位,与快速RSI结合实现高概率做多。

根据价格突破通道、布林带时机做,以及RSI超买超卖时机做多做空,即构成该策略的核心交易逻辑。

策略优势

该策略具有以下几个优势:

  1. 双轨系统,提高信号准确率。价格通道判断大趋势,布林带识别精确支持阻力位,两者结合提升信号质量。

  2. 快速RSI指标判断超买超卖,抓住反转时机。RSI参数为2,能快速判断反转节点。

  3. CryptoBottom加快多头信号确定。跌破支持位时快速判断底部特征,避免多头信号漏失。

  4. 策略参数设置合理,容易优化。参数组合简单明了,适合参数优化。

策略风险

该策略也存在一些风险:

  1. 布林带参数设定不当,可能错过较大行情或产生假信号。

  2. 双轨互动模式复杂,需要一定技术积累正确判断。

  3. 反转失败风险仍然存在,无法完全避免行情再次拉回的概率。

  4. 参数优化困难,最优参数可能因市场环境改变而失效。

策略优化方向

该策略可以从以下几个方向进行优化:

  1. 优化布林带的参数,使上下轨更贴近价格,提高信号准确率。

  2. 增加止损策略,在亏损达到一定比例时止损,有效控制风险。

  3. 结合更多指标,判断趋势、支持阻力位,减少假信号。

  4. 增加机器学习算法,自动优化参数,使之能应对市场环境变化。

总结

本策略整合价格通道、布林带和快速RSI指标,构建双轨反转交易体系。在判断大趋势的同时,快速抓住支持阻力与超买超卖机会。参数设置简单直接,容易理解和优化。能够有效识别反转机会,适合量化交易。

||

Overview

This is a dual-track reversal trading strategy based on price channel, Bollinger bands and fast RSI indicator. It combines channel index to identify trends, Bollinger bands to recognize support and resistance levels, and fast RSI to detect overbought and oversold signals, in order to achieve efficient reversal trading.

Strategy Logic

The strategy mainly relies on the following indicators to make trading decisions:

  1. Price Channel: Calculates the highest and lowest price over a certain period and plots the channel centerline. Trade signals are generated when the price breaks through the channel.

  2. Bollinger Bands: The centerline is the price channel centerline. The upper and lower bands are calculated based on the standard deviation of the deviation of the price from the centerline. Trade signals are generated when the price interacts with the Bollinger bands.

  3. Fast RSI (Period = 2): Determines overbought and oversold situations for the price. Goes long when RSI falls below 5, goes short when RSI rises above 95.

  4. CryptoBottom Indicator: Determines if the price has broken through the support level. Combined with fast RSI to generate high probability long signals.

According to the timing of price breaking through the channels and Bollinger bands to make trades, and going long or short based on overbought and oversold indications of RSI, the core trading logic of this strategy is formed.

Advantages of the Strategy

This strategy has the following advantages:

  1. Dual-track system increases signal accuracy. Price channel judges major trends and Bollinger bands identify precise support and resistance levels. The combination enhances signal quality.

  2. Fast RSI indicator captures reversal opportunities by detecting overbought and oversold. The RSI period is set to be 2 so it can quickly identity reversal nodes.

  3. CryptoBottom speeds up confirmation of long signals. Breaking through support levels allows fast judgment of bottom characteristics and avoids missing long signals.

  4. Reasonable parameter settings and easy to optimize. Simple and intuitive parameter combinations make it easy for parameter optimization.

Risks of the Strategy

There are also some risks for this strategy:

  1. Improper parameter settings for Bollinger bands may miss significant price moves or generate false signals.

  2. The interaction patterns between the dual tracks can be complex, requiring some technical sophistication for accurate judgments.

  3. The risk of failed reversals still exists since the probability of price getting pulled back cannot be eliminated.

  4. Difficulty in parameter optimization. The optimal parameters may become ineffective if market conditions change.

Optimization Directions

The strategy can be improved in the following aspects:

  1. Optimize the parameters of Bollinger bands to make the upper and lower bands closer to the price, improving the accuracy of trade signals.

  2. Add stop loss mechanisms to cut losses when they reach certain threshold percentages. This effectively controls risks.

  3. Incorporate more indicators to determine trend, support and resistance levels to reduce false signals.

  4. Introduce machine learning algorithms to auto-tune the parameters so that they can adapt to changing market environments.

Conclusion

This strategy integrates price channel, Bollinger bands and fast RSI indicator to construct a dual-track reversal trading system. While judging major trends, it also quickly seizes support, resistance and overbought/oversold opportunities. The parameter settings are simple and direct, easy to understand and optimize. It can effectively identify reversal chances and suits algorithmic trading.

[/trans]

Strategy Arguments

Argument Default Description
v_input_1 true Long
v_input_2 true Short
v_input_3 20 Period
v_input_4 true Use ColorBar
v_input_5 true Use CryptoBottom
v_input_6 true Use RSI
v_input_7 false Show Bands
v_input_8 false Show Background

Source (PineScript)

/*backtest
start: 2022-12-18 00:00:00
end: 2023-11-30 05:20:00
period: 1d
basePeriod: 1h
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/


//@version=2
strategy("Noro's Bands Strategy v1.3", shorttitle = "NoroBands str 1.3", overlay=true, default_qty_type = strategy.percent_of_equity, default_qty_value=100.0, pyramiding=0)

//Settings
needlong = input(true, defval = true, title = "Long")
needshort = input(true, defval = true, title = "Short")
len = input(20, defval = 20, minval = 2, maxval = 200, title = "Period")
color = input(true, "Use ColorBar")
usecb = input(true, "Use CryptoBottom")
usersi = input(true, "Use RSI")
needbb = input(false, defval = false, title = "Show Bands")
needbg = input(false, defval = false, title = "Show Background")
src = close

//Fast RSI
fastup = rma(max(change(src), 0), 2)
fastdown = rma(-min(change(src), 0), 2)
fastrsi = fastdown == 0 ? 100 : fastup == 0 ? 0 : 100 - (100 / (1 + fastup / fastdown))

//CryptoBottom
mac = sma(close, 10)
lencb = abs(close - mac)
sma = sma(lencb, 100)
max = max(open, close)
min = min(open, close)

//PriceChannel
lasthigh = highest(src, len)
lastlow = lowest(src, len)
center = (lasthigh + lastlow) / 2

//dist
dist = abs(src - center)
distsma = sma(dist, len)
hd = center + distsma
ld = center - distsma

//Trend
trend = close < ld and high < hd ? -1 : close > hd and low > ld ? 1 : trend[1]

//Lines
colo = needbb == false ? na : black
plot(hd, color = colo, linewidth = 1, transp = 0, title = "High band")
plot(center, color = colo, linewidth = 1, transp = 0, title = "center")
plot(ld, color = colo, linewidth = 1, transp = 0, title = "Low band")

//Background
col = needbg == false ? na : trend == 1 ? lime : red
bgcolor(col, transp = 80)

//Signals
up = trend == 1 and ((close < open or color == false) or close < hd) ? 1 : 0
dn = trend == -1 and ((close > open or color == false) or close > ld) ? 1 : 0 
up2 = close < open and lencb > sma * 3 and min < min[1] and fastrsi < 10 ? 1 : 0 //CryptoBottom
//dn2 = close > open and len > sma * 3 and max > max[1] and fastrsi > 90 ? 1 : 0 //CryptoBottom
up3 = fastrsi < 5 ? 1 : 0
//dn3 = fastrsi > 99 ? 1 : 0

longCondition = up == 1 or (up2 == 1 and usecb == true) or (up3 == 1 and usersi == true)
if (longCondition)
    strategy.entry("Long", strategy.long, needlong == false ? 0 : na)

shortCondition = dn == 1
if (shortCondition)
    strategy.entry("Short", strategy.short, needshort == false ? 0 : na)

Detail

https://www.fmz.com/strategy/435898

Last Modified

2023-12-19 15:59:36