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提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。