
이것은 복합적인 구매 신호 최적화 전략으로, 여러 가지 기술 분석 지표와 그래프 형태를 결합하여 시장에서 구매 기회를 식별한다. 이 전략의 핵심 특징은 거래자가 구매 신호를 유발하기 위해 충족해야 할 최소한의 조건 수를 설정할 수 있도록 허용하는 고도로 사용자 정의 가능함이다. 이러한 유연한 설계는 전략이 다양한 시장 환경과 개인 거래 선호도에 적응할 수 있도록 하며, 의사 결정의 객관성과 체계성을 유지한다.
이 전략은 다차원적인 기술 분석 구조에 기반을 두고 있으며, 다음과 같은 9개의 핵심 조건을 종합적으로 평가합니다.
전략은 충족되는 조건의 수를 계산하여, 충족되는 조건의 수가 사용자가 설정한 최소 임계값을 달성하거나 초과할 때 구매 신호를 유발한다. 최소 2개의 조건이 충족되는 것으로 기본 설정되어 있지만 사용자는 자신의 위험 선호와 시장 환경에 따라 이 임계값을 조정할 수 있다.
이 전략은 다음과 같은 몇 가지 중요한 장점을 가지고 있습니다.
이 전략은 합리적으로 설계되었지만, 다음과 같은 잠재적인 위험들이 있습니다.
이러한 위험을 줄이기 위해, 거래자는 다음과 같이 권장됩니다: 1) 다양한 시장 주기에 따라 최소 조건의 수를 조정하십시오; 2) 적절한 중지 및 수익 전략을 추가하십시오; 3) 다양한 시장 환경에서 전략의 성능을 테스트하십시오; 4) 가짜 신호를 줄이기 위해 필터링 조건을 추가하는 것을 고려하십시오.
코드의 심층적인 분석을 바탕으로, 이 전략의 잠재적인 최적화 방향은 다음과 같습니다.
이러한 최적화 조치는 전략의 안정성과 적응력을 크게 향상시킬 수 있습니다. 특히 다른 시장 환경의 전환 과정에서 말이죠.
다차원 기술 지표 교차 확인 구매 신호 최적화 전략은 다양한 기술 지표와 가격 형태를 종합적으로 분석하여 잠재적 인 구매 기회를 식별하는 포괄적이고 유연한 거래 시스템입니다. 그것의 핵심 장점은 개인 위험 선호와 시장 조건에 따라 전략의 민감도를 조정할 수 있는 사용자 정의 및 다차원 확인 메커니즘에 있습니다.
이 전략에는 파라미터 민감성 및 완벽한 탈퇴 메커니즘의 부재와 같은 몇 가지 고유한 위험이 있지만, 이러한 문제는 제안된 최적화 방향, 특히 동적 무게 시스템을 추가하고 탈퇴 논리를 개선함으로써 효과적으로 해결 될 수 있습니다. 전체적으로, 이것은 합리적으로 구성된, 논리적으로 명확한 구매 신호 생성 프레임워크입니다.
이 전략의 진정한 가치는 단지 신호를 생성하는 능력을 구입하는 데 있지 않고, 거래자가 개인 거래 스타일에 더 적합한 완전한 거래 시스템을 개발하기 위해 계속 반복하고 개선할 수 있는 확장 가능한 프레임 워크를 제공한다는 것입니다.
/*backtest
start: 2024-08-10 00:00:00
end: 2024-12-10 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"ETH_USDT"}]
*/
//@version=5
strategy("My Buy Signal Strategy", overlay=true)
min_conditions = input.int(2, "Minimum Conditions", minval=1, maxval=9)
// Condition 1: 50-day MA crosses above 200-day MA
ma50 = ta.sma(close, 50)
ma200 = ta.sma(close, 200)
condition1 = ta.crossover(ma50, ma200)
// Condition 2: RSI < 40 and rising
rsi_value = ta.rsi(close, 14)
condition2 = rsi_value < 40 and rsi_value > rsi_value[1]
// Condition 3: MACD line crosses above signal line
[macd_line, signal_line, hist] = ta.macd(close, 12, 26, 9)
condition3 = ta.crossover(macd_line, signal_line)
// Condition 5: Stochastic %K crosses above %D from below 30
stoch_length = 14
smooth_k = 3
smooth_d = 3
stoch_raw = ta.stoch(high, low, close, stoch_length)
k = ta.sma(stoch_raw, smooth_k)
d = ta.sma(k, smooth_d)
condition5 = ta.crossover(k, d) and k[1] < 30
// Condition 6: Price at Fibonacci retracement levels and showing reversal signs
swing_low = ta.lowest(low, 260)
swing_high = ta.highest(high, 260)
fib382 = swing_high - 0.382 * (swing_high - swing_low)
fib50 = swing_high - 0.5 * (swing_high - swing_low)
fib618 = swing_high - 0.618 * (swing_high - swing_low)
close_within_fib382 = close >= fib382 - 0.01 * close and close <= fib382 + 0.01 * close
close_within_fib50 = close >= fib50 - 0.01 * close and close <= fib50 + 0.01 * close
close_within_fib618 = close >= fib618 - 0.01 * close and close <= fib618 + 0.01 * close
condition6 = (close_within_fib382 or close_within_fib50 or close_within_fib618) and close > open
// Condition 7: Parabolic SAR dots are below the price bars
psar = ta.sar(0.02, 0.02, 0.2)
condition7 = psar < close
// Condition 8: ADX > 15 and rising, with +DI > -DI
[di_plus, di_minus, _] = ta.dmi(14, 14)
dx = 100 * math.abs(di_plus - di_minus) / (di_plus + di_minus)
adx_val = ta.rma(dx, 14)
condition8 = adx_val > 15 and adx_val > adx_val[1] and di_plus > di_minus
// Condition 9: Volume increases during price rises
avg_volume = ta.sma(volume, 20)
condition9 = close > open and volume > avg_volume
// Condition 10: Price forms bull reversal patterns (Hammer, Inverted Hammer, Morning Star)
isHammer = close > open and (high - close) <= (close - open) and (open - low) >= 1.5 * (close - open)
isInvertedHammer = close > open and (high - close) >= 1.5 * (close - open) and (open - low) <= (close - open)
isMorningStar = close[2] < open[2] and math.abs(close[1] - open[1]) < (open[2] - close[2]) * 0.75 and close > open and close > close[1] and open[1] < close[2]
condition10 = isHammer or isInvertedHammer or isMorningStar
// Count the number of conditions met
count = (condition1 ? 1 : 0) + (condition2 ? 1 : 0) + (condition3 ? 1 : 0) + (condition5 ? 1 : 0) + (condition6 ? 1 : 0) + (condition7 ? 1 : 0) + (condition8 ? 1 : 0) + (condition9 ? 1 : 0) + (condition10 ? 1 : 0)
// Buy signal if count >= min_conditions
buy_signal = count >= min_conditions
if (buy_signal)
strategy.entry("Buy", strategy.long)