
该策略是一个基于双速率变化量动量指标的交易策略。策略通过计算多个不同周期的变化量,构建一个综合的动量指标,并以其波动判断市场趋势,产生交易信号。
该策略的核心指标是双速率变化量动量指标(Dual Rate of Change Momentum Indicator),简称DRCMI。它由多个不同周期的变化量的加权平均构成。具体来说,包括6周期、10周期、15周期和20周期的变化量。其中,6周期和10周期变化量的权重为1;15周期变化量权重为2;20周期变化量权重为3。这样,更长周期的变化量具有更大的权重。
综合多个周期的变化量,可以同时反映市场的短期和较长期的动量。当DRCMI为正时,表示短期和长期趋势均为上升;当为负时,表示短期和长期均为下降。DRCMI的波动幅度也反映了市场动量的力度。
根据DRCMI的多空周期性特点,策略判断行情趋势,产生交易信号。当DRCMI上穿0轴时,做多;当DRCMI下穿0轴时,做空。
该策略主要有以下优势:
该策略也存在一些风险:
为控制风险,建议设置止损,优化指标参数,并辅助其他技术指标。
该策略可从以下几个方面进行优化:
该策略通过构建DRCMI指标,整合多周期动量特征,判断行情趋势,以获利。策略简单实用,效果明显。但PARAMETER设置和止损保护仍需优化,与其他技术指标配合使用效果更佳。
/*backtest
start: 2023-10-23 00:00:00
end: 2023-11-22 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=2
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 20/09/2017
// This indicator really is the KST indicator presented by Martin Pring.
// the KST indicator is a weighted summed rate of change oscillator that
// is designed to identify meaningful turns. Various smoothed rate of change
// indicators can be combined to form different measurements of cycles.
//
// You can change long to short in the Input Settings
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
strategy(title="MovROC (KST indicator)", shorttitle="MovROC (KST indicator)")
reverse = input(false, title="Trade reverse")
hline(0, color=purple, linestyle=line)
xROC6 = sma(roc(close, 6), 10)
xROC10 = sma(roc(close, 10), 10)
xROC15 = sma(roc(close, 15), 9)
xROC20 = sma(roc(close, 20), 15)
nRes = xROC6 + (2 * xROC10) + (3 * xROC15) + (4 * xROC20)
pos = iff(nRes > 0, 1,
iff(nRes < 0, -1, nz(pos[1], 0)))
possig = iff(reverse and pos == 1, -1,
iff(reverse and pos == -1, 1, pos))
if (possig == 1)
strategy.entry("Long", strategy.long)
if (possig == -1)
strategy.entry("Short", strategy.short)
barcolor(possig == -1 ? red: possig == 1 ? green : blue )
plot(nRes, color=blue, title="MovROC (KST indicator)")