
自動適応反曲線正切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の1つの指標にのみ依存し,多次元的な市場分析が欠けている. *解決方法*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")