OPEN-SOURCE SCRIPT
The Octopus - Pullback Long Entry [EMA+MACD]

Description:
Welcome to the Pullback Long Entry [EMA+MACD] indicator! If you love catching the perfect dip during a solid uptrend, this tool is designed exactly for you. Built with daytraders and trend-following investors in mind, this script takes the guesswork out of "buying the dip" by combining classic momentum indicators with smart price-action detection.
🚀 How It Works
Instead of chasing breakouts, this strategy waits for the market to take a breather. It scans for a specific sequence of red candles (a pullback) within an established trend. Once a pullback is detected, it uses the confluence of EMA crossovers and MACD momentum to pinpoint the exact moment the buyers step back in.
✨ Key Features
Smart Pullback Detection: Automatically counts red candles within a customizable lookback window to identify a genuine dip rather than just market noise.
Multi-Tiered Signals: The indicator provides three levels of entry signals directly on your chart:
▲ Strong Long: The ultimate setup. Triggered by a confirmed pullback combining an EMA crossover and bullish MACD momentum.
△ Medium Long (long?): A calculated aggressive entry. Triggered by the first green candle after a sequence of red candles, backed by MACD support.
◇ Early Alert: A quick heads-up signal when the MACD histogram flips green while a pullback is still active. Time to put the ticker on your watchlist!
Dynamic Take Profit Levels: Automatically plots 3 customizable Take Profit (TP) lines (e.g., 0.20%, 0.50%, 1.00%) on your chart as soon as a Strong Long signal hits, helping you secure gains mechanically.
Ironclad Trend Filters: Optional toggles to ensure you only take long positions when the price is above the VWAP or the 200 EMA—keeping you strictly on the right side of the macro trend.
Real-Time Dashboard: A sleek, built-in HUD (Heads Up Display) table in the corner of your chart. It shows you exactly which conditions are currently met and gives the setup a dynamic "Score" out of 10.
⚙️ Fully Customizable
Every trader is different, so everything in this script is adaptable to your timeframe and style:
Tweak the fast/slow/trend EMA lengths.
Adjust MACD parameters.
Define your own "pullback" criteria (number of minimum red candles and lookback window).
Set your own Take Profit percentages and display lengths.
Move or hide the dashboard as needed.
🔔 Built-In Alerts
You don't need to stare at the screen all day. The script includes custom alert conditions for Strong Longs, Medium Longs, and Early Alerts so you can be notified exactly when your setup is ready to fire.
Add it to your chart, customize your parameters, and let's catch those perfect pullbacks! Happy trading! 📈
*** Disclaimer: This script is for educational and informational purposes only. Always backtest your strategies and manage your risk appropriately.
Welcome to the Pullback Long Entry [EMA+MACD] indicator! If you love catching the perfect dip during a solid uptrend, this tool is designed exactly for you. Built with daytraders and trend-following investors in mind, this script takes the guesswork out of "buying the dip" by combining classic momentum indicators with smart price-action detection.
🚀 How It Works
Instead of chasing breakouts, this strategy waits for the market to take a breather. It scans for a specific sequence of red candles (a pullback) within an established trend. Once a pullback is detected, it uses the confluence of EMA crossovers and MACD momentum to pinpoint the exact moment the buyers step back in.
✨ Key Features
Smart Pullback Detection: Automatically counts red candles within a customizable lookback window to identify a genuine dip rather than just market noise.
Multi-Tiered Signals: The indicator provides three levels of entry signals directly on your chart:
▲ Strong Long: The ultimate setup. Triggered by a confirmed pullback combining an EMA crossover and bullish MACD momentum.
△ Medium Long (long?): A calculated aggressive entry. Triggered by the first green candle after a sequence of red candles, backed by MACD support.
◇ Early Alert: A quick heads-up signal when the MACD histogram flips green while a pullback is still active. Time to put the ticker on your watchlist!
Dynamic Take Profit Levels: Automatically plots 3 customizable Take Profit (TP) lines (e.g., 0.20%, 0.50%, 1.00%) on your chart as soon as a Strong Long signal hits, helping you secure gains mechanically.
Ironclad Trend Filters: Optional toggles to ensure you only take long positions when the price is above the VWAP or the 200 EMA—keeping you strictly on the right side of the macro trend.
Real-Time Dashboard: A sleek, built-in HUD (Heads Up Display) table in the corner of your chart. It shows you exactly which conditions are currently met and gives the setup a dynamic "Score" out of 10.
⚙️ Fully Customizable
Every trader is different, so everything in this script is adaptable to your timeframe and style:
Tweak the fast/slow/trend EMA lengths.
Adjust MACD parameters.
Define your own "pullback" criteria (number of minimum red candles and lookback window).
Set your own Take Profit percentages and display lengths.
Move or hide the dashboard as needed.
🔔 Built-In Alerts
You don't need to stare at the screen all day. The script includes custom alert conditions for Strong Longs, Medium Longs, and Early Alerts so you can be notified exactly when your setup is ready to fire.
Add it to your chart, customize your parameters, and let's catch those perfect pullbacks! Happy trading! 📈
*** Disclaimer: This script is for educational and informational purposes only. Always backtest your strategies and manage your risk appropriately.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。