Ichimoku Kinko Hyo Tenkan Kijun sen Multi Filter
- Göstergeler
- Sürüm: 2.6
- Güncellendi: 3 Ekim 2026
- Etkinleştirmeler: 5
TK CROSS MULTI FILTERS - TECHNICAL SPECIFICATION AND OPERATIONAL MANUAL
Indicator Type: Trend Momentum and Equilibrium Filtered Signal System
Platform: MetaTrader 5 (MQL5)
Data Buffers: 4 Output Buffers (Tenkan-sen, Kijun-sen, Buy Arrow, Sell Arrow)
Operation Model: Closed Bar Signal Confirmation (Bar 1), Non-Repainting Execution
1. OVERVIEW AND MATHEMATICAL FOUNDATION
TK Cross Multi Filters is an algorithmic technical analysis indicator engineered for MetaTrader 5, designed to identify directional momentum transitions and equilibrium shifts across liquid financial instruments. The core calculation engine is established upon the dynamic interaction between Tenkan-sen (Conversion Line) and Kijun-sen (Base Line), key components of the Ichimoku Kinko Hyo charting framework. Unlike standard moving averages that compute simple or exponential averages of closing prices, Tenkan-sen and Kijun-sen calculate the exact midpoint of price extremes over defined lookback windows, reflecting authentic price equilibrium and cyclical velocity.
Mathematical Formulations of Core Lines:
- Tenkan-sen (Conversion Line) = (Highest High(n) + Lowest Low(n)) / 2, where n = InpTenkan (Default: 9 periods). It tracks short-term momentum and price midpoint dynamics.
- Kijun-sen (Base Line) = (Highest High(m) + Lowest Low(m)) / 2, where m = InpKijun (Default: 26 periods). It establishes medium-term equilibrium and dynamic benchmark levels.
Core Crossover Logic:
- Bullish Crossover (BUY): Occurs when Tenkan-sen crosses above Kijun-sen: (TenkanBuffer[i] > KijunBuffer[i]) && (TenkanBuffer[i+1] <= KijunBuffer[i+1]).
- Bearish Crossover (SELL): Occurs when Tenkan-sen crosses below Kijun-sen: (TenkanBuffer[i] < KijunBuffer[i]) && (TenkanBuffer[i+1] >= KijunBuffer[i+1]).
Conventional crossover algorithms frequently produce false triggers during choppy, sideways, or low-volatility market regimes. To resolve this structural limitation, TK Cross Multi Filters incorporates a modular multi-tier matrix of 14 discrete statistical, momentum, and structural confirmation filters. Each filter acts as an independent logical gate. An arrow and alert are generated only when the core crossover aligns with all active confirmation filters.
2. SIGNAL GENERATION, VALIDITY, AND NON-REPAINTING SPECIFICATION
2.1 Non-Repainting Execution Architecture:
- Real-Time Execution vs. Historical Stability: The indicator evaluates signals across completed candles. Alerts (Pop-Up, Sound, Push Notification, Email) trigger strictly at bar index 1 (the completed candle).
- Because closed bars have immutable OHLCV data, plotted arrows remain fixed on historical bars and will not disappear, repaint, or shift position in subsequent periods.
- Current Active Candle (Bar 0): The indicator updates line calculations dynamically on bar 0, but signal confirmation is pinned to bar index 1 to eliminate false triggers during intraday price oscillations.
- Anti-Spam Signal Latching: The system tracks alert timestamps (last_buy_alert_time, last_sell_alert_time). Each candle can trigger at most one notification, eliminating repetitive alert spam.
2.2 Signal Geometry:
- Buy Signal: Plotted below the candle low at: Low[i] - (InpArrowOffsetPips * PipSize). Plot Index 2, Arrow code 233 (Aqua up-arrow).
- Sell Signal: Plotted above the candle high at: High[i] + (InpArrowOffsetPips * PipSize). Plot Index 3, Arrow code 234 (Red down-arrow).
3. COMPREHENSIVE FILTER MATRIX SPECIFICATION
The indicator integrates 14 modular filtering subsystems that can be activated independently or in combination:
3.1 Ichimoku Senkou Span B Cloud Filter (UseSenkouFilter):
- Logic: Calculates 52-period midpoint: (Highest High(52) + Lowest Low(52)) / 2, displaced forward.
- BUY Condition: Close[i] > SenkouB[i] (Price above cloud baseline).
- SELL Condition: Close[i] < SenkouB[i] (Price below cloud baseline).
3.2 RSI Dynamic Level Crossover Filter (Use_RSI_Cross_Filter):
- Logic: RSI calculated over RSI_Length (Default: 14) on RSI_Price_Source.
- BUY Condition: RSI[i] > Oversold (30) && RSI[i+1] <= Oversold (Momentum recovery).
- SELL Condition: RSI[i] < Overbought (70) && RSI[i+1] >= Overbought (Momentum exhaustion).
3.3 Average Directional Index Trend Strength Filter (Use_ADX_Filter):
- Logic: Measures directional movement strength over ADX_Period (Default: 10).
- Validation: ADX[i] >= ADX_Min_Level (Default: 20.0). Blocks signals during dormant or consolidating market conditions.
3.4 Single Moving Average Directional Filter (Use_MA_Filter):
- Logic: Moving Average calculated over MA_Period (Default: 50, Method: SMA).
- BUY Condition: Close[i] > MA[i].
- SELL Condition: Close[i] < MA[i]. Ensures alignment with baseline trend direction.
3.5 Long-Period RSI 75 Momentum Filter (Use_RSI75_Filter):
- Logic: Long-cycle RSI over RSI_Filter_Period (Default: 75) evaluated against center level 50.0.
- BUY Condition: RSI75[i] > 50.0.
- SELL Condition: RSI75[i] < 50.0. Validates macro structural cycle momentum.
3.6 Dual Moving Average Alignment Filter (Use_DoubleMA_Filter):
- Logic: Fast MA (MA_A_Period: 30 EMA) compared against Slow MA (MA_B_Period: 140 EMA).
- BUY Condition: MA_A[i] > MA_B[i].
- SELL Condition: MA_A[i] < MA_B[i]. Confirms broader trend alignment.
3.7 Awesome Oscillator Multi-Mode Filter (Use_AO_Filter):
- Volume Threshold (Use_AO_Volume_Filter): BUY requires AO[i] >= AO_Buy_Min (4.0); SELL requires AO[i] <= AO_Sell_Max (-4.0).
- Color/Slope (Use_AO_Color_Filter): BUY requires AO[i] > AO[i+1]; SELL requires AO[i] < AO[i+1].
- Zero Baseline (Use_AO_Zero_Filter): BUY requires AO[i] > AO[i+1] && AO[i] > 0; SELL requires AO[i] < AO[i+1] && AO[i] < 0.
3.8 Parabolic SAR Trailing Filter (Use_SAR_Filter):
- Logic: Parabolic SAR (Step: 0.02, Maximum: 0.2).
- BUY Condition: Close[i] > SAR[i] (SAR points below price).
- SELL Condition: Close[i] < SAR[i] (SAR points above price).
3.9 Heiken Ashi Candlestick Filter (Use_HeikenAshi_Filter):
- Logic: Calculates synthetic Heiken Ashi candlestick values: HA_Close = (Open+High+Low+Close)/4; HA_Open = (HA_Open[prev]+HA_Close[prev])/2.
- BUY Condition: HA_Close[i] > HA_Open[i] (Bullish candle body).
- SELL Condition: HA_Close[i] < HA_Open[i] (Bearish candle body).
3.10 CCI Trend Filter (Use_CCI_Filter):
- Logic: Commodity Channel Index over CCI_Period (Default: 50).
- BUY Condition: CCI[i] > 0.
- SELL Condition: CCI[i] < 0. Price position relative to statistical mean.
3.11 CCI Overbought / Oversold Filter (Use_CCI_OBOS_Filter):
- Logic: Fast CCI over CCI_OBOS_Period (Default: 14) against extreme boundaries.
- BUY Condition: CCI[i] > CCI_Overbought (+100.0).
- SELL Condition: CCI[i] < CCI_Oversold (-100.0). Confirms momentum expansion.
3.12 RVI Trend Filter (Use_RVI_Filter):
- Logic: Relative Volatility Index over RVI_Period (Default: 75).
- BUY Condition: RVI[i] > 0.
- SELL Condition: RVI[i] < 0. Measures directional volatility bias.
3.13 RVI Signal Line Cross Filter (Use_RVI_Signal_Filter):
- Logic: Compares RVI Main Line against Signal Line over RVI_Signal_Period (Default: 20).
- BUY Condition: RVI_Main[i] > RVI_Signal[i].
- SELL Condition: RVI_Main[i] < RVI_Signal[i]. Confirms directional oscillator cross.
3.14 MACD Histogram & Zero Filters:
- Histogram (Use_MACD_Filter): BUY requires MACD_Main - MACD_Signal > 0; SELL requires MACD_Main - MACD_Signal < 0.
- Zero Level (Use_MACD_Zero_Filter): BUY requires MACD_Main > 0; SELL requires MACD_Main < 0.
3.15 Rolling Support & Resistance Filter (Use_SR_Filter):
- Logic: Scans highest high and lowest low over SR_Period (Default: 50) with tolerance band (SR_Zone_Points: 80 points).
- BUY Condition: Price touches or penetrates dynamic support zone: (Low[i] <= Support + Zone && Low[i] >= Support - Zone) || (Low[i] < Support && High[i] > Support).
- SELL Condition: Price touches or penetrates dynamic resistance zone: (High[i] >= Resistance - Zone && High[i] <= Resistance + Zone) || (High[i] > Resistance && Low[i] < Resistance).
3.16 ZigZag Fibonacci Retracement Filter (Use_Fib_Filter):
- Logic: Detects structural swing points via ZigZag algorithm (Depth: 12, Deviation: 5, Backstep: 3).
- BUY & SELL Condition: Signal candle must intersect the golden ratio retracement zone between Fib_Level_1 (0.382) and Fib_Level_2 (0.618).
4. COMPLETE INPUT PARAMETERS DOCUMENTATION
Every input parameter available in the MetaTrader 5 Inputs dialog is detailed below:
4.1 Core TK Cross Settings:
- InpTenkan (Type: int, Default: 9, Range: 1-500) -> Lookback period for Tenkan-sen calculation: (Highest High + Lowest Low) / 2.
- InpKijun (Type: int, Default: 26, Range: 1-500) -> Lookback period for Kijun-sen calculation: (Highest High + Lowest Low) / 2.
- InpShowArrows (Type: bool, Default: true) -> Enables or disables graphical signal arrow plots on chart.
- InpArrowOffsetPips (Type: double, Default: 5.0, Units: Pips) -> Distance in pips between signal arrows and candle High/Low.
4.2 Filter Configuration Groups:
- Mode_Group (Type: string, Default: "=== FILTER MODE ===") -> Section label.
- Ichimoku_Group (Type: string, Default: "=== ICHIMOKU SENKOU SPAN B FILTER ===") -> Section label.
- UseSenkouFilter (Type: bool, Default: false) -> Toggles Senkou Span B macro trend filter.
- IchimokuTenkan (Type: int, Default: 9) -> Internal Tenkan period for Ichimoku handle.
- IchimokuKijun (Type: int, Default: 26) -> Internal Kijun period for Ichimoku handle.
- IchimokuSenkou (Type: int, Default: 52) -> Lookback period for Senkou Span B calculation.
- IchimokuDisplacement (Type: int, Default: 26) -> Forward displacement offset for cloud baseline.
- RSI_Group (Type: string, Default: "=== RSI CROSS FILTER ===") -> Section label.
- Use_RSI_Cross_Filter (Type: bool, Default: false) -> Toggles RSI dynamic crossover threshold filter.
- RSI_Length (Type: int, Default: 14) -> Calculation period for Relative Strength Index.
- RSI_Price_Source (Type: ENUM_APPLIED_PRICE, Default: PRICE_CLOSE) -> Applied price constant for RSI.
- Oversold (Type: double, Default: 30.0) -> Lower threshold; Buy requires RSI crossing above this level.
- Overbought (Type: double, Default: 70.0) -> Upper threshold; Sell requires RSI crossing below this level.
- ADX_Group (Type: string, Default: "=== ADX FILTER ===") -> Section label.
- Use_ADX_Filter (Type: bool, Default: false) -> Toggles ADX trend strength filter.
- ADX_Period (Type: int, Default: 10) -> Calculation lookback period for Directional Movement Index.
- ADX_Min_Level (Type: double, Default: 20.0) -> Minimum ADX value required to approve signals.
- MA_Group (Type: string, Default: "=== SINGLE MA FILTER ===") -> Section label.
- Use_MA_Filter (Type: bool, Default: false) -> Toggles single Moving Average trend filter.
- MA_Period (Type: int, Default: 50) -> Averaging period of the single Moving Average.
- MA_Method (Type: ENUM_MA_METHOD, Default: MODE_SMA) -> Smoothing method (SMA, EMA, SMMA, LWMA).
- MA_Shift (Type: int, Default: 0) -> Horizontal bar shift offset.
- RSI75_Group (Type: string, Default: "=== RSI 75 FILTER ===") -> Section label.
- Use_RSI75_Filter (Type: bool, Default: false) -> Toggles 75-period RSI macro trend filter.
- RSI_Filter_Period (Type: int, Default: 75) -> Lookback period for macro RSI. Evaluated against 50.0 level.
- DoubleMA_Group (Type: string, Default: "=== DOUBLE MA FILTER ===") -> Section label.
- Use_DoubleMA_Filter (Type: bool, Default: false) -> Toggles dual moving average trend alignment filter.
- MA_A_Period (Type: int, Default: 30) -> Period of the fast moving average.
- MA_A_Method (Type: ENUM_MA_METHOD, Default: MODE_EMA) -> Smoothing method for fast moving average.
- MA_A_Applied (Type: ENUM_APPLIED_PRICE, Default: PRICE_CLOSE) -> Applied price for fast moving average.
- MA_A_Shift (Type: int, Default: 0) -> Bar shift for fast moving average.
- MA_B_Period (Type: int, Default: 140) -> Period of the slow moving average.
- MA_B_Method (Type: ENUM_MA_METHOD, Default: MODE_EMA) -> Smoothing method for slow moving average.
- MA_B_Applied (Type: ENUM_APPLIED_PRICE, Default: PRICE_CLOSE) -> Applied price for slow moving average.
- MA_B_Shift (Type: int, Default: 0) -> Bar shift for slow moving average.
- AO_Group (Type: string, Default: "=== AWESOME OSCILLATOR FILTER ===") -> Section label.
- Use_AO_Filter (Type: bool, Default: false) -> Primary toggle switch for Awesome Oscillator filter.
- Use_AO_Volume_Filter (Type: bool, Default: false) -> Toggles absolute threshold check for AO.
- AO_Buy_Min (Type: double, Default: 4.0) -> Minimum numerical AO value for Buy signals.
- AO_Sell_Max (Type: double, Default: -4.0) -> Maximum numerical AO value for Sell signals.
- Use_AO_Color_Filter (Type: bool, Default: false) -> Requires rising slope for Buy, falling slope for Sell.
- Use_AO_Zero_Filter (Type: bool, Default: false) -> Requires positive rising AO for Buy, negative falling AO for Sell.
- SAR_Group (Type: string, Default: "=== PARABOLIC SAR FILTER ===") -> Section label.
- Use_SAR_Filter (Type: bool, Default: false) -> Toggles Parabolic SAR filter.
- SAR_Step (Type: double, Default: 0.02) -> Acceleration factor step size.
- SAR_Maximum (Type: double, Default: 0.2) -> Maximum acceleration factor limit.
- HA_Group (Type: string, Default: "=== HEIKEN ASHI FILTER ===") -> Section label.
- Use_HeikenAshi_Filter (Type: bool, Default: false) -> Toggles Heiken Ashi candle body confirmation filter.
- CCI_Group (Type: string, Default: "=== CCI TREND FILTER ===") -> Section label.
- Use_CCI_Filter (Type: bool, Default: false) -> Toggles CCI zero-line trend filter.
- CCI_Period (Type: int, Default: 50) -> Calculation period for CCI trend.
- CCI_Applied (Type: ENUM_APPLIED_PRICE, Default: PRICE_CLOSE) -> Applied price constant.
- CCI_OBOS_Group (Type: string, Default: "=== CCI OB & OS FILTER ===") -> Section label.
- Use_CCI_OBOS_Filter (Type: bool, Default: false) -> Toggles fast CCI overbought/oversold breakout filter.
- CCI_OBOS_Period (Type: int, Default: 14) -> Calculation period for fast CCI.
- CCI_OBOS_Applied (Type: ENUM_APPLIED_PRICE, Default: PRICE_CLOSE) -> Applied price constant.
- CCI_Overbought (Type: double, Default: 100.0) -> Upper boundary threshold.
- CCI_Oversold (Type: double, Default: -100.0) -> Lower boundary threshold.
- RVI_Group (Type: string, Default: "=== RVI TREND FILTER ===") -> Section label.
- Use_RVI_Filter (Type: bool, Default: false) -> Toggles Relative Volatility Index zero-line filter.
- RVI_Period (Type: int, Default: 75) -> Lookback period for RVI trend.
- RVI_Signal_Group (Type: string, Default: "=== RVI SIGNAL FILTER ===") -> Section label.
- Use_RVI_Signal_Filter (Type: bool, Default: false) -> Toggles RVI main vs signal line crossover filter.
- RVI_Signal_Period (Type: int, Default: 20) -> Lookback period for RVI signal line.
- MACD_Group (Type: string, Default: "=== MACD SIGNAL FILTER ===") -> Section label.
- Use_MACD_Filter (Type: bool, Default: false) -> Toggles MACD histogram direction filter.
- MACD_FastEMA (Type: int, Default: 12) -> Fast EMA period for MACD.
- MACD_SlowEMA (Type: int, Default: 26) -> Slow EMA period for MACD.
- MACD_SignalSMA (Type: int, Default: 9) -> Signal line SMA period for MACD.
- MACD_Applied (Type: ENUM_APPLIED_PRICE, Default: PRICE_CLOSE) -> Applied price constant.
- MACD_Zero_Group (Type: string, Default: "=== MACD LEV 0 FILTER ===") -> Section label.
- Use_MACD_Zero_Filter (Type: bool, Default: false) -> Toggles MACD zero-level baseline filter.
- SR_Group (Type: string, Default: "=== SUPPORT & RESISTANCE FILTER ===") -> Section label.
- Use_SR_Filter (Type: bool, Default: false) -> Toggles rolling Support & Resistance filter.
- SR_Period (Type: int, Default: 50) -> Lookback bar count for dynamic S/R detection.
- SR_Zone_Points (Type: double, Default: 80.0, Units: Points) -> Tolerance zone width in broker points.
- Fib_Group (Type: string, Default: "=== FIBONACCI FILTER ===") -> Section label.
- Use_Fib_Filter (Type: bool, Default: false) -> Toggles ZigZag Fibonacci retracement filter.
- Fib_Level_1 (Type: double, Default: 0.382) -> Lower golden ratio retracement level (38.2%).
- Fib_Level_2 (Type: double, Default: 0.618) -> Upper golden ratio retracement level (61.8%).
- ZigZag_Depth (Type: int, Default: 12) -> Depth setting for swing point detection.
- ZigZag_Deviation (Type: int, Default: 5, Units: Points) -> Price deviation threshold for swing legs.
- ZigZag_Backstep (Type: int, Default: 3, Units: Bars) -> Minimum bar separation between swing points.
- Alert_Group (Type: string, Default: "=== ALERT & SOUND SETTINGS ===") -> Section label.
- Use_Alert (Type: bool, Default: true) -> Toggles terminal pop-up alert dialog box.
- Use_Sound (Type: bool, Default: true) -> Toggles local sound playback.
- Use_Notification (Type: bool, Default: true) -> Toggles push notifications to MetaTrader mobile apps.
- Use_Mail (Type: bool, Default: false) -> Toggles email alerts via terminal SMTP.
- SoundFile_Buy (Type: string, Default: "alert.wav") -> Sound file played on Buy signals.
- SoundFile_Sell (Type: string, Default: "alert2.wav") -> Sound file played on Sell signals.
5. TRADING RECOMMENDATIONS AND OPERATIONAL SPECIFICATIONS
5.1 Instruments and Asset Coverage:
- Currency Pairs: Highly liquid major and minor FX pairs (EURUSD, GBPUSD, USDJPY, AUDUSD, USDCAD, NZDUSD, EURJPY, GBPJPY).
- Precious Metals: XAUUSD (Gold), XAGUSD (Silver).
- Indices: US30, US500, USTEC, GER40.
- Energy and Crypto: USOIL, BTCUSD, ETHUSD.
5.2 Timeframe Recommendations:
- Scalping: M1, M5. Recommended filters: ADX Filter (threshold 22) + Heiken Ashi Filter.
- Intraday Trading: M15, M30, H1. Recommended filters: Double MA Filter (30/140) + RSI Cross Filter.
- Swing Trading: H4, D1. Recommended filters: Senkou Span B Filter + Fibonacci Retracement Filter + MACD Filter.
5.3 Account Types and Execution Environment:
- Account Compatibility: Compatible with both Hedging and Netting accounts on MetaTrader 5.
- Spread Sensitivity: Low spread accounts (ECN/STP/Raw Spread) are advised for lower timeframes (M1-M15).
- VPS Recommendation: A low-latency Windows VPS is recommended if 24/7 push notifications are utilized.
6. STRATEGIC TEMPLATES AND FILTER COMBINATION BLUEPRINTS
Traders can configure customized setups by selecting specialized filter combinations:
6.1 Trend Following Momentum Template:
- Configuration: Core TK Cross + Double MA Filter (30/140 EMA) + ADX Filter (threshold 22) + MACD Histogram Filter.
- Application: Captures continuation waves during established trends while filtering out sideways consolidations.
6.2 Fibonacci Pullback Value Template:
- Configuration: Core TK Cross + Fibonacci Filter (38.2% - 61.8%) + Parabolic SAR Filter + Heiken Ashi Filter.
- Application: Identifies value entries within trend pullbacks, offering structured stop loss levels based on swing extremes.
6.3 Dynamic Support/Resistance Reversal Template:
- Configuration: Core TK Cross + SR Filter (50 bars, 80 points) + RSI Cross Filter (30/70 levels) + AO Color Filter.
- Application: Validates mean-reversion signals when price rejects structural horizontal boundaries with confirmed momentum.
7. PERFORMANCE, RESOURCE OPTIMIZATION, AND EA INTEGRATION
- Incremental Calculation: Uses start = rates_total - prev_calculated + 1 to calculate only new incoming bars, keeping CPU utilization low.
- Indicator Handle Management: All sub-indicator handles are initialized during OnInit() and systematically released via IndicatorRelease() during OnDeinit(), preventing memory leaks.
- Expert Advisor Integration (iCustom): EA developers can read indicator buffers directly:
* Buffer 0: Tenkan-sen numeric value.
* Buffer 1: Kijun-sen numeric value.
* Buffer 2: Buy Arrow value (contains entry price coordinate on Buy; EMPTY_VALUE otherwise).
* Buffer 3: Sell Arrow value (contains entry price coordinate on Sell; EMPTY_VALUE otherwise).
8. SETUP AND INSTALLATION PROCEDURE
1. Open MetaTrader 5, select File -> Open Data Folder.
2. Open MQL5 -> Indicators folder.
3. Place the compiled indicator file (TK_Cross_Multi_Filters.ex5) inside this folder.
4. Refresh the Navigator window (Ctrl+N), drag the indicator onto your active chart.
5. In the Inputs tab, configure parameters and enable desired filters.
6. To receive push notifications on mobile devices, enable Push Notifications under Tools -> Options -> Notifications and input your MetaQuotes ID.
7. To enable email alerts, configure your SMTP server under Tools -> Options -> Email.
9. FREQUENTLY ASKED QUESTIONS
- Does the indicator repaint? No. Signal arrows and alerts evaluate completed closed bars. Once bar 1 closes, arrows and buffer values remain permanent.
- Can multiple filters be active simultaneously? Yes. All enabled filters must be satisfied concurrently. Activating 2 to 3 complementary filters is recommended for balanced signal frequency.
- How can an EA read the signals? Check Buffer 2 (Buy) or Buffer 3 (Sell) at bar index 1. If the buffer does not equal EMPTY_VALUE, a signal has been confirmed.
10. RISK DISCLAIMER
Trading foreign exchange, indices, commodities, and digital assets involves significant risk and may not be suitable for all investors. Leverage can work against you as well as for you. Past performance and indicator backtest results do not indicate future performance. This software is an analytical and operational tool designed to assist in technical analysis; it does not provide financial advice or promise returns. Always test thoroughly on a demo account before live trading.
