
이 전략은 123 형태 반전과 쉽게 이동하는 두 가지 전략을 결합하여 가격의 전환점을 포착하여 거래를하는 것을 목표로합니다. 123 형태 반전 전략은 주가 가격이 3 일 연속으로 특정 패턴을 형성할 때 신호를 냅니다. 쉽게 이동하는 (EOM) 전략은 가격과 거래량 변화를 사용하여 시장 동력을 판단합니다. 이 두 가지 전략은 가격의 기술적 형태와 시장 동력을 고려하여 거래 신호의 정확성을 향상시킵니다.
이 전략은 두 부분으로 구성되어 있습니다.
두 신호를 합쳐, Easy of Movement과 123 형태가 동시에 다중 신호를 할 때, 다중 포지션을 열고, Easy of Movement과 123 형태가 동시에 공백 신호를 할 때, 공백 포지션을 열는다.
이 전략은 다음과 같은 장점을 가지고 있습니다.
가격 기술 형태와 시장 동력을 결합하여 신호의 정확성을 향상시킵니다.
123 형태 역전 포착 전환점, 쉽게 이동 트렌드 움직임을 판단, 둘은 상호 보완
Stoch 지표는 정리 과정에서 반복적으로 평점을 피합니다.
거래 논리는 간단하고 명확하며 실행이 쉽습니다.
사용자 정의 가능한 매개 변수, 다른 시장 환경에 적응
이 전략에는 몇 가지 위험도 있습니다.
너무 많은 변수 설정에 의존하고, 변수가 잘못되면 거래 빈도 또는 표가 누락됩니다.
여러 필터 조건이 함께 사용되어 신호 생성 주파수가 너무 낮을 수 있다.
시장의 변동에 민감한 이동 가능한 지표, 잘못된 신호를 유발할 수 있다.
실적은 다소 낮아지면서 포지션 규모를 조절해야 한다.
유행 주식에만 적용되며, 시장을 정리하는 데 적합하지 않습니다.
이 전략은 다음과 같은 측면에서 최적화될 수 있습니다.
최적화 매개 변수, 필터링 조건의 엄격성을 조정, 거래 주파수 및 신호 품질의 균형을 맞추기
단독 손실을 엄격하게 통제하는 Stop Loss 전략에 참여하십시오.
트렌드 필터링과 함께 역대 거래를 피하십시오.
자금 관리 모듈을 추가하여 변동율에 따라 역동적으로 위치를 조정합니다.
기계학습 방법을 사용하여 매개 변수를 최적화하여 시장에 동적으로 적응합니다.
이 전략은 가격 기술 지표와 시장 동력 지표를 통합하여 전환점을 포착하면서 트렌드 품질을 확인하는 데 높은 실전 가치를 갖는다. 그러나 거래 빈도, 단편 손실 및 역동 조작의 위험을 제어하는 데 주의를 기울여야 한다. 매개 변수 최적화, 손실 방지 전략, 트렌드 필터링 등의 방법을 통해 전략의 안정성과 수익성을 더욱 향상시킬 수 있다. 이 전략 아이디어는 명확하고 쉽게 구현할 수 있으며, 수량 거래자가 연구하고 계속 개선할 가치가 있다.
/*backtest
start: 2023-10-15 00:00:00
end: 2023-11-14 00:00:00
period: 1h
basePeriod: 15m
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
//@version=4
////////////////////////////////////////////////////////////
// Copyright by HPotter v1.0 14/04/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 indicator gauges the magnitude of price and volume movement.
// The indicator returns both positive and negative values where a
// positive value means the market has moved up from yesterday's value
// and a negative value means the market has moved down. A large positive
// or large negative value indicates a large move in price and/or lighter
// volume. A small positive or small negative value indicates a small move
// in price and/or heavier volume.
// A positive or negative numeric value. A positive value means the market
// has moved up from yesterday's value, whereas, a negative value means the
// market has moved down.
//
// 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
EOM(BuyZone, SellZone) =>
pos = 0
xHigh = high
xLow = low
xVolume = volume
xHalfRange = (xHigh - xLow) * 0.5
xMidpointMove = mom(xHalfRange, 1)
xBoxRatio = iff((xHigh - xLow) != 0, xVolume / (xHigh - xLow), 0)
nRes = iff(xBoxRatio != 0, 1000000 * ((xMidpointMove - xMidpointMove[1]) / xBoxRatio), 0)
pos := iff(nRes > BuyZone, 1,
iff(nRes < SellZone, -1, nz(pos[1], 0)))
pos
strategy(title="Combo Backtest 123 Reversal & Ease of Movement (EOM)", shorttitle="Combo", overlay = true)
Length = input(14, minval=1)
KSmoothing = input(1, minval=1)
DLength = input(3, minval=1)
Level = input(50, minval=1)
//-------------------------
BuyZone = input(4000, minval=1)
SellZone = input(-4000)
reverse = input(false, title="Trade reverse")
posReversal123 = Reversal123(Length, KSmoothing, DLength, Level)
posEOM = EOM(BuyZone, SellZone)
pos = iff(posReversal123 == 1 and posEOM == 1 , 1,
iff(posReversal123 == -1 and posEOM == -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 )