이 전략은 두 가지의 양적 거래 전략의 조합으로, 보다 정확한 신뢰할 수 있는 거래 신호를 생성하기 위한 것이다. 첫 번째 전략은 가격 반동에 기초하고, 두 번째 전략은 거래량 분석에 기초한다. 조합 신호는 수익 가능성을 효과적으로 향상시킨다.
이 전략은 두 부분으로 구성되어 있습니다.
STO 지표를 사용하여 반전 신호를 판단하십시오. 2일 종결 가격 상승과 STO 느린 선이 50보다 낮을 때 더 많이하십시오. 2일 종결 가격 하락과 STO 빠른 선이 50보다 높을 때 공백하십시오.
일정한 주기 내의 거래량과 가격의 관계를 계산하고, 다공방향을 판단하고,均線平滑処理을 한다.
두 부분의 전략이 같으면 더 많이 하고, 같으면 아무것도 하지 않는다.
조합 신호는 신호 품질을 향상 시킬 수 있으며, 이 중 어느 전략이든 가짜 신호가 발생할 확률을 크게 줄일 수 있다.
위험은 다음과 같은 방법으로 줄일 수 있습니다.
이 전략은 다음과 같은 부분에서 최적화될 수 있습니다.
K값, D값 등의 변수를 조정하여 최적의 조합을 찾습니다.
MACD, BOLL 등에 대한 보조 판단
다른 주기적 변수를 테스트하여 보다 안정적인 판단을 얻습니다.
예를 들어, 외형이 발생했을 때 다시 들어갑니다.
다른 품종의 파라미터는 반드시 동일하지 않습니다. 개별적으로 테스트해야 합니다.
이 전략은 반전과 교역량을 조합하여 두 가지 유형의 전략을 상호 검증하여 신호의 품질과 정확성을 효과적으로 향상시킬 수 있습니다. 그러나 또한 매개 변수 최적화, 보조 기술 지표 등에 주의를 기울이는 것이 전략 효과를 개선하는 데 필요합니다. 우리는 수익 결과를 지속적으로 테스트하고 매개 변수 규칙을 조정하고 실장에서 검증하여 진정으로 안정적이고 신뢰할 수있는 조합 전략을 얻을 수 있습니다. 이것은 많은 시간과 노력이 필요하지만 수익도 눈에 띄게됩니다.
/*backtest
start: 2023-09-13 00:00:00
end: 2023-09-20 00:00:00
period: 15m
basePeriod: 5m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 21/10/2020
// This is combo strategies for get a cumulative signal.
//
// First strategy
// This System was created from the Book "How I Tripled My Money In The
// Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
// The strategy buys at market, if close price is higher than the previous close
// during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
// The strategy sells at market, if close price is lower than the previous close price
// during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
//
// Second strategy
// This is another version of FVE indicator that we have posted earlier
// in this forum.
// This version has an important enhancement to the previous one that`s
// especially useful with intraday minute charts.
// Due to the volatility had not been taken into account to avoid the extra
// complication in the formula, the previous formula has some drawbacks:
// The main drawback is that the constant cutoff coefficient will overestimate
// price changes in minute charts and underestimate corresponding changes in
// weekly or monthly charts.
// And now the indicator uses adaptive cutoff coefficient which will adjust to
// all time frames automatically.
//
// WARNING:
// - For purpose educate only
// - This script to change bars colors.
////////////////////////////////////////////////////////////
Reversal123(Length, KSmoothing, DLength, Level) =>
vFast = sma(stoch(close, high, low, Length), KSmoothing)
vSlow = sma(vFast, DLength)
pos = 0.0
pos := iff(close[2] < close[1] and close > close[1] and vFast < vSlow and vFast > Level, 1,
iff(close[2] > close[1] and close < close[1] and vFast > vSlow and vFast < Level, -1, nz(pos[1], 0)))
pos
FVI(Samples,Perma,Cintra,Cinter) =>
pos = 0
xhl2 = hl2
xhlc3 = hlc3
xClose = close
xIntra = log(high) - log(low)
xInter = log(xhlc3) - log(xhlc3[1])
xStDevIntra = stdev(sma(xIntra, Samples) , Samples)
xStDevInter = stdev(sma(xInter, Samples) , Samples)
xVolume = volume
TP = xhlc3
TP1 = xhlc3[1]
Intra = xIntra
Vintra = xStDevIntra
Inter = xInter
Vinter = xStDevInter
CutOff = Cintra * Vintra + Cinter * Vinter
MF = xClose - xhl2 + TP - TP1
FveFactor = iff(MF > CutOff * xClose, 1,
iff(MF < -1 * CutOff * xClose, -1, 0))
xVolumePlusMinus = xVolume * FveFactor
Fvesum = sum(xVolumePlusMinus, Samples)
VolSum = sum(xVolume, Samples)
xFVE = (Fvesum / VolSum) * 100
xEMAFVE = ema(xFVE, Perma)
pos :=iff(xFVE > xEMAFVE, 1,
iff(xFVE < xEMAFVE, -1, nz(pos[1], 0)))
pos
strategy(title="Combo Backtest 123 Reversal & Volatility Finite Volume Elements", shorttitle="Combo", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
Samples = input(22, minval=1)
Perma = input(40, minval=1)
Cintra = input(0.1)
Cinter = input(0.1)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posFVI = FVI(Samples,Perma,Cintra,Cinter)
pos = iff(posReversal123 == 1 and posFVI == 1 , 1,
iff(posReversal123 == -1 and posFVI == -1, -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)
if (possig == 0)
strategy.close_all()
barcolor(possig == -1 ? #b50404: possig == 1 ? #079605 : #0536b3 )