
MACD 지표 밑바닥 반전 경고 전략은 MACD 지표의 빠른 느린 선을 분석하여 현재 가격이 역사적인 최고점이나 최저점에 있는지, 반전이 임박하는지 판단하여 시장 가격 움직임을 신속하게 판단합니다.
이 전략은 MACD 표준 지표의 출력에서 빠른 선과 느린 선에 해당하는 데이터를 필터링하고 필터링하여 가격이 반전하기 전의 비판 영역에 들어갔는지 판단하여 구매 또는 판매 신호를 발송합니다.
구체적으로, 전략은 MACD의 빠른 선과 느린 선의 골드 포크와 데드 포크를 계산하여 가격이 상승 추세의 하위 지역 또는 하위 추세의 상위 지역으로 진입하는 것을 판단합니다. 금 포크의 경우, 클로즈 가격이 이전 바의 클로즈 가격보다 높고, 디피드는 이전 바의 디피드 값보다 높으면, 하위 지역으로 진입하는 것으로 판단되며, 하위 반전 경고 신호를 냅니다.
해결책:
MACD 지표의 하위 반전 경고 전략은 MACD 빠른 느린 라인 교차 상황을 분석하여 가격이 반전의 중요한 영역에 진입했는지 판단하여 하위와 상부를 효과적으로 발견하여 거래 의사 결정에 지침을 제공합니다. 그러나 MACD 자체는 판단이 지연되어 정확한 반전 포인트와 반전력을 결정할 수 없습니다. 따라서, 적절한 변수를 조정하고 다른 지표와 결합하여 사용해야 합니다. 이 전략의 효용을 발휘하기 위해 위험을 제어합니다. 머신 학습과 같은 기술을 도입하여 판단 정확도를 더욱 향상시킬 수 있습니다.
/*backtest
start: 2023-11-06 00:00:00
end: 2023-12-06 00:00:00
period: 1h
basePeriod: 15m
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/
// © blackcat1402
//@version=5
strategy("[blackcat] L2 Reversal Labels Strategy", overlay=true, max_bars_back=5000, max_labels_count=500)
[diff, dea, macd] = ta.macd(close,12, 26, 9)
a1 = ta.barssince(ta.crossover(diff,dea)[1])
a2 = ta.barssince(ta.crossunder(diff,dea)[1])
bottom_zone = (close[a1+1]>close) and (diff>diff[a1+1]) and ta.crossover(diff,dea)
top_zone = (close[a2+1]<close) and (diff[a2+1]>diff) and ta.crossunder(diff,dea)
// Plot labels
l0 = top_zone ? label.new(bar_index, high * 1.0, 'Near Top', color=color.new(color.red, 50), textcolor=color.white, style=label.style_label_down, yloc=yloc.price, size=size.small) : bottom_zone ? label.new(bar_index, low * 1.0, 'Near Bottom', color=color.new(color.green, 50), textcolor=color.white, style=label.style_label_up, yloc=yloc.price, size=size.small) : na
if bottom_zone
longmsg = 'Bottom Reversal Soon!'
alert(message=longmsg, freq=alert.freq_once_per_bar_close)
else if top_zone
shortmsg = 'Top Reversal Soon!'
alert(message=shortmsg, freq=alert.freq_once_per_bar_close)
longCondition = bottom_zone
if (longCondition)
strategy.entry("long", strategy.long)
shortCondition = top_zone
if (shortCondition)
strategy.entry("short", strategy.short)