BjKeyLevels
- インディケータ
- バージョン: 1.60
- アクティベーション: 5
BjKeyLevels.mq5 is a key levels indicator (Bjorgum Key Levels, version 1.60) for MetaTrader 5, built on pivot logic based on higher price extremes.
Purpose and operating principle:
Key zone search — using pivots (swing high/low with leverage setting InpPivotLeft/Right = 7), it finds support and resistance levels. Each level is converted into a zone with a width dependent on the ATR (14) and a multiplier (InpAtrMultiplier = 0.5).
Zone merging — close levels are merged into a single zone (displayed in gold color InpMergedColor ).
Trend filters — basic MA (50 EMA) and HTF 200 MA (H1): signals/arrows are generated only in the direction of the trend. Visualization: translucent rectangular zones (blue for support, red for resistance), labels with price and number of touches, zone extension to the right, zone lifetime control (InpMaxZoneAgeBars), and touch limit (InpMaxTouches = 3).
Signals and alerts:
Retest: price returns to the zone with a rebound in the direction of the trend → arrow and alert (bullish/bearish).
Trap: false breakout of the zone with a return inside → opposite signal.
Recommended SL/TP and R:R ratio are displayed for each signal, and TP/SL rectangles are drawn on the chart.
Alert deduplication (one signal per bar), support for pop-up windows (Alert) and push notifications. Controls and Interface:
The "BjKL: ON/OFF" button at the bottom center of the chart toggles the indicator on/off (the state is saved in global variables and is not reset upon restart).
Optional Dashboard: trend by MA and 200MA, number of active zones, distance to the nearest resistance/support level.
Technical Features:
Works on multiple timeframes (MTF) – zone calculations can be performed on H1 and displayed on the current chart.
Zone status changes only on closed bars (protection against redrawing); on a live bar, only signals.
Incremental recalculation: new zones are processed as confirmed pivot bars appear.
Indicator color scheme: dark background, blue (support), red/crimson (resistance), gold (combined zones), red/green signal arrows.
