
Heikin Ashi HighLow 채널 동적 평행 거래 전략은 Heikin Ashi 라인 종전 가격과 동적 평행을 비교하여 거래 신호를 생성하는 전략이다. 이 전략은 쌍평행을 사용하여 채널을 형성하고, 라인 종전 가격 돌파 채널에 따라 경로 상하로 구매 및 판매 작업을 수행한다.
이 전략은 Heikin Ashi 가닥 기술 지표에 기초한다. Heikin Ashi 가닥은 시장 소음을 필터링하여 트렌드를 식별한다. 이 전략은 고점이 형성된 lenh 주기 평균선을 통로 상반도로, 낮은점이 형성된 lenl 주기 평균선을 통로 하반도로 사용한다.
구체적으로, 전략은 먼저 높은 낮은 지점의 각각의 간단한 이동 평균을 계산하여 채널을 구성한다. 높은 지점의 이동 평균 mah는 채널 상궤, 낮은 지점의 이동 평균 mal는 채널 하궤이다. 그리고 Heikin Ashi 선의 종전 가격과 채널 상궤 하궤를 비교하여 거래 신호를 생성한다. 선의 종전 가격 이상이 있다면, 구매 신호를 생성한다.
위험에 따라, 손실 제도를 설정할 수 있으며, 또는 다른 지표와 결합하여 브레이크 신호를 확인하여 잘못된 신호로 인해 불필요한 손실을 방지할 수 있습니다.
Heikin Ashi HighLow 채널 동적 일직선 거래 전략은 전체적으로 논리적으로 명확하고, 간단하게 작동할 수 있다. 이 전략은 Heikin Ashi 배선 기술의 장점을 최대한 활용하여 트렌드를 식별하고, 쌍 일직선 동적 채널 판단을 지원하는 저항을 설정한다. 매개 변수를 최적화하고, 신호 필터링 메커니즘을 추가하고, 스톱 손실 전략을 설정하는 등의 방법을 통해 이 전략을 더욱 개선하고, 거래 위험을 줄일 수 있다.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © shiner_trading
// [email protected]
//@version=4
strategy("Hi-Lo Channel Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, initial_capital=500, default_qty_value=100, currency="USD")
lenh = input(5, "High-Based MA")
lenl = input (5, "Low-Based MA")
ha = input(true, "Use Heikin Ashi OHCL values (on real chart)?")
ha_h = security(heikinashi(syminfo.tickerid), timeframe.period, high)
ha_l = security(heikinashi(syminfo.tickerid), timeframe.period, low)
ha_c = security(heikinashi(syminfo.tickerid), timeframe.period, close)
float mah = na
float mal = na
longCondition = false
shortCondition = false
/// HA is the check mark box in the configuration.
/// IF "Use Heikin Ashi OHCL values?" is true, then the strategy will use the Heikin Ashi close values
// and therefore give the same buy/sell signals regardless of what chart you are viewing.
/// That being said, if "Use Heikin Ashi OHCL values?" is FALSE, yet you are viewing Heikin Ashi candles on your chart,
// then logically you will also get the same buy/sell signals
if ha == true
mah := sma(ha_h, lenh)
mal := sma(ha_l, lenl)
longCondition := ha_c > mah
shortCondition := ha_c < mal
if ha == false
mah := sma(high, lenh)
mal := sma(low, lenl)
longCondition := close > mah
shortCondition := close < mal
plot(mah, color=color.green)
plot(mal, color=color.red)
if (longCondition)
strategy.entry("Buy", 100)
if (shortCondition)
strategy.close("Buy")