Cập nhật

[blackcat] L1 Relative Energy Index

1 035
█ OVERVIEW

The REI (Relative Energy Index) Enhanced Indicator is a sophisticated technical analysis tool that measures market energy and momentum through a unique calculation method. This enhanced version adds visual improvements, signal tracking, and a comprehensive status table to help traders identify potential entry and exit points with greater precision.

█ CONCEPTS

This indicator utilizes the Relative Energy Index methodology to identify overbought and oversold conditions, trend changes, and potential reversal points in the market. The REI calculation compares current price movements with historical data to determine market energy levels.

Key principles:
• Energy expansion and contraction patterns indicate potential trend changes
• Crossovers between fast and slow lines provide timely trading signals
• Reference lines at ±0.6 help identify extreme market conditions
• Signal strength assessment helps filter out weak movements

█ HOW TO USE

1 — Add the indicator to your chart as a separate pane below the main price chart
2 — Configure the display settings according to your preferences
3 — Monitor the status table for real-time market conditions
4 — Watch for crossover signals between the fast (blue) and slow (orange) lines

Input Parameters
• Show Status Table: Toggle the information table display on/off
• Enable Alerts: Activate alert notifications for signals
• Table Position: Choose where to display the status table on the chart

█ SIGNALS

Visual Elements
• Fast Line (Blue): The primary REI calculation line
• Slow Line (Orange): The delayed REI line for signal confirmation
• Green Reference Line (-0.6): Oversold threshold
• Red Reference Line (0.6): Overbought threshold
• Background Colors: Green for bullish zones, red for bearish zones
• Signal Labels: "B" for buy signals, "S" for sell signals with REI values

Trading Signals
• Golden Cross: Fast line crosses above slow line (potential buy signal)
• Death Cross: Fast line crosses below slow line (potential sell signal)
• Overbought Zone: REI value above 0.6 (potential reversal down)
• Oversold Zone: REI value below -0.6 (potential reversal up)

█ STATUS TABLE

The status table provides real-time information about:
• REI Value: Current numerical value of the indicator
• Trend: Current market direction (Bullish/Bearish/Neutral)
• Last Signal: Most recent signal type and timing
• Zone: Current market condition (Overbought/Oversold/Normal)
• Strength: Signal strength assessment (Strong/Medium/Weak)

█ LIMITATIONS

• Like all technical indicators, REI can produce false signals in choppy markets
• Best used in conjunction with other technical analysis tools
• May lag behind sudden market movements due to its calculation method
• Performance varies across different timeframes and market conditions

█ NOTES

• The indicator works best on trending markets with clear directional movement
• Consider using longer timeframes for more reliable signals
• The status table updates in real-time to reflect current market conditions
• Multiple alert conditions are available for different signal types

═════════════════════════════════════════════════════════════════════════
For questions or feedback, use comments section below.
Phát hành các Ghi chú
█ OVERVIEW

L1 Relative Energy Index (REI) measures the directional energy of price expansion in a fully normalized -1 to +1 oscillator, and turns every raw cross into a governed, alert-ready trade signal. V2 adds a position state machine, zero-line exits, ATR-based TP/SL reference levels, optional re-entry anchors and a higher-timeframe direction gate.

█ CONCEPTS

The REI core compares recent candles against reference candles from several bars back. When price makes a genuine expansion (or contraction) relative to those references, the bar's range change is signed and accumulated; otherwise it is filtered out. The net signed energy is then normalized by the total absolute energy over the same window, so the reading always oscillates around zero regardless of symbol or volatility.

Key principles:
• Directional energy: only structurally meaningful bars contribute to the reading
• Normalization: the value stays comparable across symbols and timeframes
• Governance: raw crosses are arbitrated by a position state machine, so entry, exit and re-entry signals never contradict each other

█ HOW TO USE

1 — Add the indicator to any chart (it opens in a separate panel). Defaults reproduce the classic REI behavior.
2 — Read entries from the E (long) and S (short) labels; exits from the orange XL/XS markers; re-entries from teal RL / maroon RS labels.
3 — Use the dashboard table for the current position state, zone, strength and the live TP/SL price references.
4 — Create alerts from the ten built-in alert conditions, or enable dynamic alerts for messages that include price, REI value, TP and SL.

Input Parameters
• REI Core: reference line levels (-0.6 / +0.6), smoothing length, accumulation window, slow-line offset, strength thresholds
• Signal Governance: short signals on/off, flip vs. close-only behavior, zero-line exit, same-bar exclusivity, cooldown bars
• Risk: ATR length, SL/TP multipliers (xATR), show/hide levels
• Re-entry: enable switch (off by default), anchor window, breakout source (Close or High/Low)
• MTF Gate: enable switch (off by default), higher timeframe, HTF EMA length
• Visual: dashboard, table position, backgrounds, legacy dots, gradient line coloring

█ FEATURES

• Bidirectional signals with a strict state machine (long / short / flat, one transition per bar)
• Zero-line exits that close positions when momentum flips sign
• ATR-based TP/SL reference prices shown in the table and exposed to alert messages
• Optional re-entry after an exit, anchored to the exit-bar extreme
• Optional higher-timeframe direction gate using a non-repainting HTF reading
• Cooldown control to suppress whipsaw chains in ranging markets
• Ten alert conditions plus close-confirmed dynamic alerts

█ SIGNALS

Visual Elements
• Fast line: the REI reading, gradient-colored green to red across the reference band
• Slow line: the signal line; crosses between the two generate entries
• E / S labels: long and short entries (with the REI value at trigger)
• XL / XS orange markers: position exits (reverse cross or zero-line exit)
• RL / RS labels: optional re-entry after an exit breakout
• Background: light green/red while a position is open; light OB/OS tint when flat
• Table: Position, REI value, Trend, Last Signal, Zone, Strength, TP/SL

█ IMPLEMENTATION NOTES

Built on ta.ema, math.sum, ta.crossover/crossunder, ta.atr and request.security (HTF gate uses the closed HTF bar with lookahead to avoid repainting). Division is zero-protected, early-history comparisons are na-safe, and all alert() calls are once-per-bar-close confirmed. The dashboard refreshes only on the last bar for performance.

█ LIMITATIONS

• The reference structure assumes one candle per period; behavior on non-standard chart types (Renko, Heikin Ashi) is unverified
• Cross-based signals lag by construction; use the zero-line exit or TP/SL references to protect profits
• In tight ranges, enable the cooldown or the MTF gate to reduce false entries
• TP/SL levels are references for an oscillator panel, not exchange orders

█ NOTES

• V2 keeps full backward compatibility: with Flip on and Cooldown at 0, entries match V1
• Feedback is welcome in the comments section.

═════════════════════════════════════════════════════════════════════════
For questions or feedback, use comments section below.
Feel free to use and modify — attribution appreciated.

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.