이동 평균 모멘텀 롱 컨티뉴에이션 트레이딩 전략


생성 날짜: 2023-09-12 16:15:44 마지막으로 수정됨: 2023-09-12 16:15:44
복사: 0 클릭수: 647
avatar of ChaoZhang ChaoZhang
1
집중하다
1617
수행원

이 전략은 평균 선동의 지속된 상황을 관찰하여, 연속적으로 상승하는 단계에서 더 많이 하고, 지속된 후속 동작을 실현한다. 이 전략은 트렌드 추적 종류 전략으로, 다중 상자의 행태의 상승 동력을 지속적으로 캡처하기 위해 고안된다.

전략적 원칙:

  1. 가격 움직임을 반영하기 위해 가중 이동 평균을 계산한다.

  2. 가중 이동 평균이 5일 연속 상승할 때 더 많은 진출을 한다.

  3. 중화 이동 평균이 4일 연속으로 하락했을 때, 여러 번 출전한다.

  4. 지속적인 추세를 판단하여 단기 조정으로 역전되는 것을 피하십시오.

  5. 최대 손실을 설정하고 하루 최대 손실을 제어합니다.

이 전략의 장점:

  1. 이 영상들은 ‘미국’에서 ‘미국’으로 이어지는 ‘미국’의 ‘미국’의 ‘미국’의 ‘미국’의 ‘미국’의 ‘미국’의 ‘미국’의 ‘미국’의 ‘미국’의 ‘미국’의

  2. “일간 연속으로 판단하는 것은 단기 조정 흔들림을 건너뛰는 데 도움이 됩니다”.

  3. 최대 스톱 손실 설정은 꼬리 위험을 제한합니다.

이 전략의 위험은:

  1. 지속되는 중독으로 인한 회수 손실을 제한할 수 없습니다.

  2. 만약 깊이 조정이 이뤄진다면 큰 손실을 초래할 수 있다.

  3. 정지 손실이 너무 느슨하게 설정되어 너무 큰 손실 위험이 있습니다.

결론적으로, 이 전략은 지속되는 상승을 판단한 후 추적하여 시장의 온점을 효과적으로 포착할 수 있다. 그러나 위험의 깊이 회정을 경계해야 하며, 스톱 패러미터를 적절히 조정하고, 충분한 위험 관리를 해야 한다.

전략 소스 코드
/*backtest
start: 2023-01-01 00:00:00
end: 2023-09-11 00:00:00
period: 3d
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/
// © SoftKill21

//@version=4
// strategy("My Script", initial_capital=1000, default_qty_type=strategy.percent_of_equity, default_qty_value=100, commission_type=strategy.commission.percent , commission_value=0.1 )


var candela = 0.0


candela := (high+low+open+close)/4

long = candela > candela[1] and candela[1] > candela[2] and candela[2] > candela[3] and candela[3] > candela[4] and candela[4] > candela[5]
short = candela< candela[1] and candela[1] < candela[2] and candela[2] < candela[3] and candela[3] < candela[4] //and candela[4] < candela[5] 

plot(candela, color=long? color.green : short? color.red : color.white ,linewidth=4)



strategy.entry("long",1,when=long)
//strategy.entry('short',0,when=short)
    
strategy.close("long", when = short)

risk= input(25)
// strategy.risk.max_intraday_loss(risk, strategy.percent_of_equity)
//strategy.close("short", when = not long or short)