OPEN-SOURCE SCRIPT
20MA / 200 MA Konvergenz & Elephant Bar Filter

The script creates a Momentum Filter designed to identify stocks that are currently exhibiting a transition from long-term price stability to short-term explosive volatility.
1. 🧘 Long-Term Stability Logic (Convergence)
The first part of the script identifies assets in a state of tight consolidation. This suggests that market participants have reached a temporary equilibrium, creating pent-up energy for a future trend.
A. Moving Average (MA) Proximity
The script checks if the fast MA (20 periods) and the slow MA (200 periods) are very close together.
It calculates the percentage difference, filtering for stocks where the separation between the two MAs is less than 2%. This defines the narrow range.
This condition confirms that the short-term and long-term price trends are essentially flat and aligned.
B. Price Nearness to the Long-Term MA
It further ensures that the current closing price is also within a tight range (e.g., less than 2%) of the 200-period MA.
This confirms the asset is actively trading at the center of the consolidation zone, simulating the "parallel" alignment of the MAs.
2. 💥 Explosive Breakout Logic (The Large Candle)
The second part of the script looks for the catalyst—an event that signals a sudden shift in supply and demand, ending the period of calm.
A. Above-Average Body Size
The script calculates the average absolute size of the candle body (the distance between open and close) over the last 20 periods.
It filters for stocks where the current candle body is at least three times (3x) larger than that historical average. This is the core signal of a powerful, convinced price move.
B. High Body-to-Range Ratio
To ensure the move was decisive and met little resistance, the script verifies that the candle body accounts for at least 85% of the candle's total range (high minus low).
This eliminates candles with long wicks (shadows), which would indicate volatility but a lack of directional conviction.
🎯 Summary
The combined screening identifies assets that have maintained long-term stability (MA convergence) but have just experienced a high-conviction, low-resistance breakout (Large Candle), indicating that a new, strong trend may be initiating.
1. 🧘 Long-Term Stability Logic (Convergence)
The first part of the script identifies assets in a state of tight consolidation. This suggests that market participants have reached a temporary equilibrium, creating pent-up energy for a future trend.
A. Moving Average (MA) Proximity
The script checks if the fast MA (20 periods) and the slow MA (200 periods) are very close together.
It calculates the percentage difference, filtering for stocks where the separation between the two MAs is less than 2%. This defines the narrow range.
This condition confirms that the short-term and long-term price trends are essentially flat and aligned.
B. Price Nearness to the Long-Term MA
It further ensures that the current closing price is also within a tight range (e.g., less than 2%) of the 200-period MA.
This confirms the asset is actively trading at the center of the consolidation zone, simulating the "parallel" alignment of the MAs.
2. 💥 Explosive Breakout Logic (The Large Candle)
The second part of the script looks for the catalyst—an event that signals a sudden shift in supply and demand, ending the period of calm.
A. Above-Average Body Size
The script calculates the average absolute size of the candle body (the distance between open and close) over the last 20 periods.
It filters for stocks where the current candle body is at least three times (3x) larger than that historical average. This is the core signal of a powerful, convinced price move.
B. High Body-to-Range Ratio
To ensure the move was decisive and met little resistance, the script verifies that the candle body accounts for at least 85% of the candle's total range (high minus low).
This eliminates candles with long wicks (shadows), which would indicate volatility but a lack of directional conviction.
🎯 Summary
The combined screening identifies assets that have maintained long-term stability (MA convergence) but have just experienced a high-conviction, low-resistance breakout (Large Candle), indicating that a new, strong trend may be initiating.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.