OPEN-SOURCE SCRIPT
Apex Price Patterns & Candlestick Engine [Pineify]

Apex Price Patterns & Candlestick Engine [Pineify]
Apex Price Patterns & Candlestick Engine combines EMA trend context, confirmed swing structure, and selected candlestick formations. It filters pattern labels by regime: bullish patterns print only when the fast EMA is above the slow EMA, and bearish patterns print only when the fast EMA is below the slow EMA.
Key Features
How It Works
The script calculates a fast EMA and slow EMA. Their relationship defines trend state and controls candle coloring, the dashboard, and signal eligibility.
Market structure comes from ta.pivothigh() and ta.pivotlow(). A swing confirms only after the selected number of bars has passed on both sides, creating a known delay but keeping labels stable. Pivot highs mark HH or LH; pivot lows mark HL or LL.
The candle engine measures range, body width, wick percentages, and average body size. Wick/body imbalance detects hammers and shooting stars. Engulfing logic requires an opposite-color prior candle and meaningful current body. Morning and evening stars use a three-candle sequence.
How the Components Work Together
EMA trend defines bias, pivots define structure, and candle patterns provide timing. A bullish label after an HL in an EMA uptrend may highlight a pullback rejection. A bearish label after an LH in an EMA downtrend may highlight a failed rally.
Trading Ideas and Insights
Signals are context aids, not standalone trade instructions.
Unique Aspects
How to Use
Customization
Conclusion
This indicator is for traders who read trend, structure, and candles together. Its value is showing when EMA direction, confirmed pivots, and proportion-based candlestick patterns are aligned.
Apex Price Patterns & Candlestick Engine combines EMA trend context, confirmed swing structure, and selected candlestick formations. It filters pattern labels by regime: bullish patterns print only when the fast EMA is above the slow EMA, and bearish patterns print only when the fast EMA is below the slow EMA.
Key Features
- Fast/slow EMA filter for bullish, bearish, or neutral trend state
- Confirmed HH, HL, LH, and LL labels from pivot highs and lows
- Trend-aligned hammer, shooting star, engulfing, morning star, and evening star labels
- Trend candle coloring, EMA plots, dashboard, and alerts
How It Works
The script calculates a fast EMA and slow EMA. Their relationship defines trend state and controls candle coloring, the dashboard, and signal eligibility.
Market structure comes from ta.pivothigh() and ta.pivotlow(). A swing confirms only after the selected number of bars has passed on both sides, creating a known delay but keeping labels stable. Pivot highs mark HH or LH; pivot lows mark HL or LL.
The candle engine measures range, body width, wick percentages, and average body size. Wick/body imbalance detects hammers and shooting stars. Engulfing logic requires an opposite-color prior candle and meaningful current body. Morning and evening stars use a three-candle sequence.
How the Components Work Together
EMA trend defines bias, pivots define structure, and candle patterns provide timing. A bullish label after an HL in an EMA uptrend may highlight a pullback rejection. A bearish label after an LH in an EMA downtrend may highlight a failed rally.
Trading Ideas and Insights
- Use bullish labels near HL structure as possible trend-continuation context
- Use bearish labels near LH structure as possible downtrend-continuation context
- Compare HH/HL or LH/LL sequences against the EMA state to spot agreement or conflict
Signals are context aids, not standalone trade instructions.
Unique Aspects
- Pattern labels are trend-filtered instead of printed everywhere
- Structure uses confirmed pivots rather than raw highs and lows
- Trend, latest structure, and EMA relationship are summarized together
How to Use
- Add the indicator and check the dashboard trend state
- Read recent HH/HL/LH/LL labels to judge structure
- Watch for trend-aligned candle labels near recent swing areas
- Set alerts for pattern or structure events
Customization
- Fast EMA Length (default: 20) — Short trend filter; lower values react faster
- Slow EMA Length (default: 50) — Baseline trend filter; higher values change slower
- Swing Pivot Length (default: 10) — Bars required on both sides of a swing
- Visual Toggles — Show or hide labels, candle coloring, and dashboard
Conclusion
This indicator is for traders who read trend, structure, and candles together. Its value is showing when EMA direction, confirmed pivots, and proportion-based candlestick patterns are aligned.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
🚀🚀🚀 Pineify - pineify.app
Essential Toolkit for Every Trader
- AI Pine Script Generator
- Finance AI Agent
- AI Stock Picker
- Pine Script Visual Editor
- Invited indicators
- Strategy Optimizer
- Trading Journal
- Backtest Report
Essential Toolkit for Every Trader
- AI Pine Script Generator
- Finance AI Agent
- AI Stock Picker
- Pine Script Visual Editor
- Invited indicators
- Strategy Optimizer
- Trading Journal
- Backtest Report
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.
Скрипт с открытым кодом
В истинном духе TradingView, создатель этого скрипта сделал его открытым исходным кодом, чтобы трейдеры могли проверить и убедиться в его функциональности. Браво автору! Вы можете использовать его бесплатно, но помните, что перепубликация кода подчиняется нашим Правилам поведения.
🚀🚀🚀 Pineify - pineify.app
Essential Toolkit for Every Trader
- AI Pine Script Generator
- Finance AI Agent
- AI Stock Picker
- Pine Script Visual Editor
- Invited indicators
- Strategy Optimizer
- Trading Journal
- Backtest Report
Essential Toolkit for Every Trader
- AI Pine Script Generator
- Finance AI Agent
- AI Stock Picker
- Pine Script Visual Editor
- Invited indicators
- Strategy Optimizer
- Trading Journal
- Backtest Report
Отказ от ответственности
Информация и публикации не предназначены для предоставления и не являются финансовыми, инвестиционными, торговыми или другими видами советов или рекомендаций, предоставленных или одобренных TradingView. Подробнее читайте в Условиях использования.