
반전 교차 포착 전략은 반전 거래와 지표 교차를 결합한 복합 전략이다. 그것은 우선 가격 반전 형태를 사용하여 거래 신호를 생성하고, 그 다음 무작위 지표의 다공간 교차와 결합하여 필터링하여 단기 시장의 반전 기회를 포착한다.
이 전략은 다음의 두 가지 세부 전략으로 구성됩니다.
이 복합 전략은 두 가지 하위 전략의 신호를 판단하고, 두 가지 하위 전략의 거래 신호가 일치하면 실제 거래 신호를 생성한다.
이 전략은 반전과 지표의 교차를 결합하여 가격과 지표 정보를 통합적으로 판단하여 가짜 신호를 효과적으로 필터링하고 잠재적인 반전 기회를 활용하여 수익률을 높일 수 있습니다.
구체적인 장점은 다음과 같습니다.
이 전략에는 위험도 있습니다.
이러한 위험은 지표 파라미터를 조정하거나 손실을 막는 장치를 설정하는 등의 방법으로 제어 할 수 있습니다.
이 전략은 다음과 같은 차원에서 최적화될 수 있습니다.
역전환 교차 포획 전략은 여러 전략의 장점을 통합적으로 사용하며, 위험을 통제하는 전제 하에, 강력한 수익 능력을 갖는다. 지속적인 최적화 및 개선으로 자신의 스타일에 맞는 효율적인 전략을 만들 수 있으며, 변화하는 시장 환경에 적응할 수 있다.
/*backtest
start: 2024-01-09 00:00:00
end: 2024-01-16 00:00:00
period: 10m
basePeriod: 1m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 15/09/2021
// 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 back testing strategy generates a long trade at the Open of the following
// bar when the %K line crosses below the %D line and both are above the Overbought level.
// It generates a short trade at the Open of the following bar when the %K line
// crosses above the %D line and both values are below the Oversold level.
//
// 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
StochCross(Length, DLength,Oversold,Overbought) =>
pos = 0.0
vFast = stoch(close, high, low, Length)
vSlow = sma(vFast, DLength)
pos := iff(vFast < vSlow and vFast > Overbought and vSlow > Overbought, 1,
iff(vFast >= vSlow and vFast < Oversold and vSlow < Oversold, -1, nz(pos[1], 0)))
pos
strategy(title="Combo Backtest 123 Reversal & Stochastic Crossover", shorttitle="Combo", overlay = true)
line1 = input(true, "---- 123 Reversal ----")
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
line2 = input(true, "---- Stochastic Crossover ----")
LengthSC = input(7, minval=1)
DLengthSC = input(3, minval=1)
Oversold = input(20, minval=1)
Overbought = input(70, minval=1)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posmStochCross = StochCross(LengthSC, DLengthSC,Oversold,Overbought)
pos = iff(posReversal123 == 1 and posmStochCross == 1 , 1,
iff(posReversal123 == -1 and posmStochCross == -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 )