
이 전략은 평균선과 변동률에 기반한 자기 적응 거래 시스템으로, 지수 이동 평균 ((EMA) 와 평균 실제 파동 (ATR) 을 결합하여 동적 거래 채널을 구축하고, 가격이 상하 채널을 접촉할 때 거래한다. 전략의 핵심 아이디어는 시장의 자연적인 변동성을 포착하고, 수평 상위 정리에서 우수한 성능을 발휘하는 것이다.
이 전략은 세 가지 핵심 기술 지표를 사용합니다.
거래 통로의 계산 방법은 다음과 같습니다.
이 시스템은 가격이 상행선을 터치할 때 공백을 시작하고, 하행선을 터치할 때 더 많은 것을 시작합니다. 2:1의 리스크/수익비율을 사용하는 것이 좋습니다.
이것은 합리적으로 설계된 평균 회귀 거래 시스템으로, 기술 지표 조합을 통해 시장의 변동 기회를 포착한다. 전략의 장점은 자율성과 객관성이다. 그러나 적용할 때 트렌드 환경의 영향과 파라미터 최적화에 주의를 기울여야 한다. 제안된 최적화 방향을 통해 전략의 안정성과 수익성을 더욱 향상시킬 수 있다. 전략은 격렬한 변동이 있지만 추세가 보이지 않는 시장 환경에서 사용하기에 적합하며, 실전 거래 전에 충분한 피드백과 파라미터 최적화가 권장된다.
/*backtest
start: 2022-02-11 00:00:00
end: 2025-02-08 08:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"BTC_USDT"}]
*/
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © rolguergf34585
//@version=5
strategy("Grupo ROG - Cash Bands", overlay=true)
PeriodoATR = input.int(defval=14,title="Período ATR")
PeriodoMedia = input.int(defval=10,title="Período Média Móvel")
PeriodoFiltro = input.int(defval=30,title="Período Média Filtro")
Mult = input.float(defval=0.5,title="Multiplicador",step=0.1)
Casas_Decimais = input.int(defval=5,title="Casas Decimais")
ema = ta.ema(close,PeriodoMedia)
filtro = ta.ema(close,PeriodoFiltro)
atr = ta.atr(PeriodoATR)
upper = math.round(ema+atr*Mult,Casas_Decimais)
basis = ema
lower = math.round(ema-atr*Mult,Casas_Decimais)
tendencia = lower>filtro?1:upper<filtro?-1:0
plot(upper,color=color.red)
plot(lower,color=color.green)
//plot(filtro,color=color.white)
barcolor(tendencia==1?color.green:tendencia==-1?color.red:color.white)
longCondition = true//tendencia==1 //and close < lower[1]
shortCondition = true//tendencia==-1 //and close > upper[1]
// if (strategy.position_size>0)
// strategy.exit("Long", limit=upper[0])
// if (strategy.position_size<0)
// strategy.exit("Short", limit=lower[0])
if (longCondition)
strategy.entry("Long", strategy.long, limit=lower[0])
if (shortCondition)
strategy.entry("Short", strategy.short, limit=upper[0])