
자기 적응형 반비상직선 CCI 동력 거래 전략은 기술 지표 기반의 양자 거래 시스템으로, 핵심은 Kıvanc Özbilgiç가 개발한 IFTCCI 지표에 의존한다. 이 전략은 정확한 하락 수준을 설정하여 지표가 -1에서 + 1 사이에 오동할 때 구매 및 판매 신호를 생성한다. 지표가 낮은 지점 ((-0.95 이하) 에서 위쪽으로 특정 하락점을 돌파할 때 구매 신호를 유발한다. 지표가 높은 지점 ((-0.95 이상) 에서 아래쪽으로 특정 하락점을 돌파할 때 판매 신호를 유발한다.
이 전략의 핵심은 IFTCCI 지표입니다.
구체적인 계산 공식은 다음과 같습니다.
v1 = 0.1 * (CCI(close, period) / 4)
v2 = WMA(v1, wma_period)
IFTCCI = (e^(2*v2) - 1) / (e^(2*v2) + 1)
정책의 실행 논리는 다음과 같은 몇 가지 핵심 부분으로 나뉘어져 있습니다.
구매 조건:
판매 조건:
상태 추적:
전체 전략은 백분율 자금 관리를 채택하고, 거래마다 100%의 사용 가능한 자금을 사용하며, 부채가 금지되어 있다. 전략은 각 K 라인이 형성될 때 실시간으로 신호를 계산하고, 시장의 동력을 적시에 포착하도록 한다.
명확한 입출장 규칙전략: 정확한 수적 하락에 기반한 명확한 거래 신호를 제공하여 주관적인 판단을 피하고 거래 결정을 객관적이고 규율적으로 만듭니다.
동적 위험 관리 장치: 내장된 스톱 메커니즘은 단일 거래의 손실을 효과적으로 제한하고, 시장의 역동성이 기본 범위를 초과하면 자동으로 탈퇴하여 자금의 안전을 보호합니다.
시장의 적응력:IFTCCI 지표는 역 쌍 곡선 정교 전환을 통해 지표 값이 -1에서 + 1 사이로 오동하는 등 자연스러운 통일성 특성을 지니고 있으며, 다양한 변동성 시장 환경에 적합하다.
신호를 부드럽게 하고, 가짜 돌파구를 줄여라.: 가중된 이동 평균을 사용하여 원시 CCI를 부드럽게 처리하여 잡음과 가짜 신호를 효과적으로 줄이고 거래 신호의 신뢰성을 향상시킵니다.
지능형 재입학: 시장이 퇴출 후 다시 원래의 경향으로 돌아왔을 때, 재입장 메커니즘은 시스템을 기회를 다시 잡을 수 있게 하고, 전략의 수익성을 높일 수 있다.
시각화 효과도 좋네요.전략: 차트에서 명확한 배경 색상의 변화를 표시하여 거래자가 시장 상태와 거래 신호를 직관적으로 이해할 수 있도록 도와줍니다.
매개 변수 조정: 모든 핵심 매개 변수들은 입력 인터페이스를 통해 조정될 수 있으며, 이는 전략이 다양한 시장 조건과 개인 위험 선호도에 적응할 수 있도록 합니다.
시장이 흔들리는 가운데 거래가 빈번하다.이 지표는 지진시장에서 하락점 근처에서 자주 변동하여 여러 개의 매매 신호를 생성하여 과도한 거래와 수수료의 침식을 초래할 수 있습니다. 해결 방법: 시간 필터 또는 트렌드 필터와 같은 추가 필터 조건을 추가하여 불안정한 시장에서 거래 빈도를 줄일 수 있습니다.
정해진 스톱더의 문제: 현재 전략은 고정된 수치를 사용한다 ((0.1 단위) 는 상동적인 시장 환경에서 너무 크거나 너무 작을 수 있다. 해결 방법: 시장의 최근 변동적 동성에 따라 중단 거리를 조정할 수 있는 적응형 중지 폭을 설계할 수 있다.
장기적 추세 확인의 부재이 전략은 주로 단기적인 동력을 기반으로 하고 있으며, 장기적인 트렌드 분석과 결합되지 않아 주요 트렌드가 역전될 경우 불필요한 거래가 발생할 수 있다. 해결 방법: 장기 주기 트렌드 지표를 필터로 도입하여 트렌드 방향으로만 거래한다.
재입원 메커니즘의 시간적 위험: 현재 재입장 메커니즘은 고정된 반발폭을 기반으로 하고 있으며, 시장의 가짜 돌파가 발생했을 때 재입장할 수 있다. 해결 방법: 수량 확인이나 다른 기술 지표의 조화 신호와 같은 추가 확인 조건을 추가하십시오.
단일 지표 의존이 전략은 IFTCCI의 한 지표에 의존하는 것으로, 다차원 시장 분석이 부족하다. 해결 방법: RSI, MACD 또는 변동률 지표와 같은 상호 보완적 인 지표 포지션을 도입하여 다각적인 시장 확인을 제공합니다.
다중 시간 프레임 분석 통합: 현재 전략은 단일 시간 프레임에서만 작동하며, 다중 시간 프레임 분석을 통합 할 수 있습니다. 예를 들어, 더 높은 시간 프레임의 IFTCCI 지표를 거래 방향 필터로 사용하여 더 큰 추세 방향으로만 거래하십시오. 이것은 역동적인 거래를 줄이고 승률을 높일 수 있습니다.
동적 절댓값 조정: 고정된 마이너스 ((-0.95⁄0.95) 를 시장의 변동성 동적에 따라 조정된 마이너스로 변경한다. 낮은 변동성 환경에서 더 좁은 마이너스를 사용하고, 높은 변동성 환경에서 더 넓은 마이너스를 사용하여 다양한 시장 조건의 신호 생성 요구에 적응한다.
수량 확인 메커니즘: 트래지엄 분석 컴포넌트를 추가하여 신호가 생성될 때 상당한 트래지엄 지원을 요구하여 낮은 품질의 돌파 신호를 필터링하여 가짜 돌파로 인한 손실을 줄일 수 있습니다.
자금 관리 최적화: 현재 전략은 고정된 퍼센티지를 사용하여 포지션 관리를 하고 있으며, 시장의 변동성과 승률에 기반한 적응형 자금 관리 시스템으로 개선할 수 있으며, 높은 확신도 신호에 포지션을 증가시키고 낮은 확신도 신호에 포지션을 감소시킨다.
기계 학습 강화: 기계 학습 알고리즘을 사용하여 IFTCCI 지표의 변수 (CCI 주기 및 WMA 주기) 에 대한 적응 최적화를 수행하여 다양한 시장 환경에 따라 최적의 변수 조합을 자동으로 조정하여 전략의 적응성을 향상시킵니다.
거래 시간 필터: 거래 시간 필터를 추가하여 시장 개시와 종료 전의 높은 변동성을 피하거나 중요한 경제 데이터가 발표되는 시간을 피하여 갑작스러운 사건으로 인한 예측 불가능한 변동성을 줄이십시오.
상관관계 분석: 다른 시장이나 자산과의 연관성 분석을 도입하여 여러 관련 시장에서 비슷한 신호가 동시에 발생하면 거래 신호의 신뢰도를 높이고 전략의 안정성을 향상시킵니다.
자율적 반중곡절 직교 CCI 동력 거래 전략은 IFTCCI 지표의 하락점을 돌파하여 거래 신호를 생성하는 구조적이고 논리적으로 명확한 양적 거래 시스템이며, 위험을 관리하고 기회를 잡기 위해 스톱 및 재입장 메커니즘을 갖추고 있습니다. 이 전략의 주요 장점은 신호의 명확성, 위험 제어 역동성 및 파라미터 조정성이 강합니다.
그러나, 이 전략은 불안정한 시장의 빈번한 거래, 고정된 손실의 범위의 불연속성, 그리고 장기적인 추세 확인의 부재와 같은 위험에 직면해 있습니다. 다중 시간 프레임 분석을 통합하여, 동적으로 하락값을 조정하고, 거래량 확인을 추가하고, 자금 관리를 최적화하고, 기계 학습 강화를 도입하고, 거래 시간 필터링을 추가하는 등의 방향의 최적화를 통해 전략의 안정성과 수익성을 크게 향상시킬 수 있습니다.
이 전략을 적용하고자 하는 거래자는 먼저 시뮬레이션 환경에서 다양한 변수 조합을 테스트하여 자신의 거래 종류와 위험 선호도에 맞는 최적의 설정을 찾아보고, 이 문서에서 제시된 최적화 방향을 점차 통합하여 더 포괄적이고 안정적인 거래 시스템을 구축하는 것이 좋습니다.
/*backtest
start: 2024-05-27 00:00:00
end: 2025-01-20 00:00:00
period: 1d
basePeriod: 1d
exchanges: [{"eid":"Futures_Binance","currency":"SOL_USDT"}]
*/
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © erkankuskonmaz
//@version=5
strategy("IFTCCI Buy Sell Signal Strategy",
overlay=false,
pyramiding=0,
default_qty_type=strategy.percent_of_equity,
default_qty_value=100,
calc_on_every_tick=true) // NEW LINE: Enables real-time signal generation.
// --- Indicator Settings and Calculations (IFTCCIv2) ---
group_indicator_params = "Indicator Parameters (IFTCCIv2)"
ccilength_param = input.int(5, "CCI Period", group=group_indicator_params)
wmalength_param = input.int(9, title="Smoothing Period (WMA)", group=group_indicator_params)
// IFTCCIv2 Calculation
v1_calc = 0.1 * (ta.cci(close, ccilength_param) / 4)
v2_calc = ta.wma(v1_calc, wmalength_param)
indicator_value_ift = (math.exp(2 * v2_calc) - 1) / (math.exp(2 * v2_calc) + 1)
// --- Strategy Rule Inputs ---
group_entry_rules = "Buy Signal Conditions"
entry_low_prev_max = input.float(-0.95, title="Primary Buy: Previous Bar Max Value", group=group_entry_rules)
entry_low_curr_min = input.float(-0.94, title="Primary Buy: Current Bar Min Value", group=group_entry_rules)
reentry_trigger_units = input.float(0.10, title="Re-entry: Rise from Lowest Value", group=group_entry_rules)
group_exit_rules = "Sell Signal Conditions (Exit Position)"
exit_high_prev_min = input.float(0.95, title="Target Sell: Previous Bar Min Value", group=group_exit_rules)
exit_high_curr_max = input.float(0.94, title="Target Sell: Current Bar Max Value", group=group_exit_rules)
stop_loss_units = input.float(0.10, title="Stop Loss: Drop from Peak Value", group=group_exit_rules)
// --- Indicator Values for Strategy ---
float ind_val = indicator_value_ift
float ind_val_prev = indicator_value_ift[1]
// --- State Tracking Variables ---
var float highest_indicator_since_long_entry = na
var bool track_for_reentry_after_close = false
var float lowest_indicator_since_reentry_tracking_started = na
// --- Update State Logic ---
// 1. Update the highest indicator value since entering long position
if strategy.position_size > 0
if strategy.position_size[1] <= 0
highest_indicator_since_long_entry := ind_val
else
highest_indicator_since_long_entry := math.max(highest_indicator_since_long_entry, ind_val)
else
if strategy.position_size[1] > 0
highest_indicator_since_long_entry := na
// 2. Update re-entry tracking mechanism
if strategy.position_size[1] > 0 and strategy.position_size == 0
track_for_reentry_after_close := true
lowest_indicator_since_reentry_tracking_started := ind_val
else if strategy.position_size > 0
track_for_reentry_after_close := false
lowest_indicator_since_reentry_tracking_started := na
else if track_for_reentry_after_close and strategy.position_size == 0
if not na(lowest_indicator_since_reentry_tracking_started)
lowest_indicator_since_reentry_tracking_started := math.min(lowest_indicator_since_reentry_tracking_started, ind_val)
else
lowest_indicator_since_reentry_tracking_started := ind_val
// --- Buy Conditions (Long Entry) ---
bool can_enter_new_position = strategy.opentrades == 0
// Condition 1: Main Buy Condition
bool condition_main_buy_cross = ind_val_prev <= entry_low_prev_max and ind_val >= entry_low_curr_min
bool main_long_entry_trigger = condition_main_buy_cross and can_enter_new_position
// Condition 2: Re-entry Buy Condition
bool condition_re_entry_trigger = false
if track_for_reentry_after_close and not na(lowest_indicator_since_reentry_tracking_started) and can_enter_new_position
if ind_val >= lowest_indicator_since_reentry_tracking_started + reentry_trigger_units
condition_re_entry_trigger := true
// Combined Buy Condition
bool final_long_entry_condition = main_long_entry_trigger or condition_re_entry_trigger
// --- Sell Conditions (Long Exit) ---
bool currently_in_long_position = strategy.position_size > 0
// Sell Condition 1: Target Sell
bool condition_sell_target = ind_val_prev >= exit_high_prev_min and ind_val <= exit_high_curr_max
// Sell Condition 2: Stop Loss
bool condition_sell_stop_loss = false
if currently_in_long_position and not na(highest_indicator_since_long_entry)
if ind_val <= highest_indicator_since_long_entry - stop_loss_units
condition_sell_stop_loss := true
// Combined Sell Condition
bool final_long_exit_condition = currently_in_long_position and (condition_sell_target or condition_sell_stop_loss)
// --- Strategy Orders ---
if (final_long_entry_condition)
entry_comment = main_long_entry_trigger ? "Buy (Primary)" : "Buy (Re-entry)"
strategy.entry("Buy ID", strategy.long, comment=entry_comment)
if (final_long_exit_condition)
exit_comment = condition_sell_target ? "Sell (Target)" : "Sell (Stop)"
strategy.close("Buy ID", comment=exit_comment)
// --- Plot Indicator and Strategy Markers ---
plot(indicator_value_ift, title="IFTCCI Value", color=color.rgb(0, 0, 0), linewidth=2)
hline(0, "Mid Level", color=color.new(#787b86, 50), linestyle=hline.style_dotted)
hline(0.95, "Upper Reference (+0.95)", color=color.new(#002fff, 10), linestyle=hline.style_dashed)
hline(-0.95, "Lower Reference (-0.95)", color=color.new(#002fff, 10), linestyle=hline.style_dashed)
// Background Coloring on Entry and Exit Signals
color background_color = final_long_entry_condition ? color.new(color.green, 81) : final_long_exit_condition ? color.new(color.red, 81) : na
bgcolor(background_color, title="Signal Background")