OPEN-SOURCE SCRIPT
Quasimodo Pattern Structure By EmirTradeHub

Quasimodo Pattern Structure with Dynamic Entry, Stop & Take Profit
This indicator detects Bullish and Bearish Quasimodo market structure patterns and automatically creates a complete trade management structure including Entry, Stop Level, TP-1 and TP-2 levels.
The script is designed to help traders visually track structural reversals and possible reaction zones using a clean and fully automated pattern workflow.
━━━━━━━━━━━━━━━━━━
FEATURES
━━━━━━━━━━━━━━━━━━
• Automatic Bullish and Bearish Quasimodo pattern detection
• Dynamic A → B → C → D structure drawing
• Automatic Entry level generation
• Dynamic Stop Level tracking
• Automatic TP-1 and TP-2 levels
• Pattern expiration system
• Trade result tracking system
• Historical pattern visualization
• Fully customizable visual settings
• Integrated alert system
━━━━━━━━━━━━━━━━━━
ALERT SYSTEM
━━━━━━━━━━━━━━━━━━
The indicator includes built-in TradingView alert conditions for all major events.
Available alerts:
• Bullish Quasimodo Detected
• Bearish Quasimodo Detected
• Entry Triggered
• TP-1 Hit
• Take Profit Hit
• Stopped out
• Pattern expired
These alerts can be used for:
• Notifications
• Webhooks
• Automation systems
• Trade monitoring workflows
━━━━━━━━━━━━━━━━━━
HOW THE PATTERN WORKS
━━━━━━━━━━━━━━━━━━
Bearish Quasimodo Structure:
The indicator searches for a Higher High followed by a Lower Low structure shift.
After the structural shift forms, the script tracks the retracement level and creates an Entry zone.
Bullish Quasimodo Structure:
The indicator searches for a Lower Low followed by a Higher High structure shift.
After the structural shift forms, the script tracks the retracement level and creates an Entry zone.
The structure is automatically monitored after the D point is confirmed.
━━━━━━━━━━━━━━━━━━
ENTRY SYSTEM
━━━━━━━━━━━━━━━━━━
The Entry level is based on the A structure point.
When price returns to the Entry level, the script automatically activates the trade structure.
Before Entry occurs:
• TP levels are not active
• Stop Level is not active
If price never reaches the Entry level within the specified timeout period, the pattern becomes invalid and the script prints:
“Pattern expired”
━━━━━━━━━━━━━━━━━━
STOP & TAKE PROFIT SYSTEM
━━━━━━━━━━━━━━━━━━
Stop Level:
The Stop Level is dynamically created using the C structure point.
Take Profit Levels:
TP-1 and TP-2 levels are automatically generated from the pattern structure.
Trade Result Logic:
• If price directly hits Stop Level:
“Stopped out”
• If TP-1 is reached and price later hits Stop:
“TP-1 hit then stopped out”
• If TP-2 is reached:
“Take Profit Hit”
The script also stops extending trade management lines once the trade is completed.
━━━━━━━━━━━━━━━━━━
VISUAL SYSTEM
━━━━━━━━━━━━━━━━━━
Entry Line:
Blue colored dynamic Entry line.
Take Profit Lines:
Green TP-1 and TP-2 lines.
Stop Line:
Red Stop Level line.
All major visual elements can be customized from the settings panel:
• Line colors
• Line widths
• Text sizes
• Result label sizes
━━━━━━━━━━━━━━━━━━
SETTINGS
━━━━━━━━━━━━━━━━━━
ZigZag Settings
Left Bars
Controls pivot sensitivity on the left side.
Right Bars
Controls pivot confirmation on the right side.
━━━━━━━━━━━━━━━━━━
Other Settings
Quasimodo Mode
Choose Bullish, Bearish or Both pattern types.
Entry Timeout Bars
Maximum number of bars allowed before the pattern expires.
━━━━━━━━━━━━━━━━━━
Position Entry Visual Settings
Entry Line Color
Changes Entry line color.
Entry Line Width
Changes Entry line thickness.
Entry Text Size
Changes Entry line text size.
Entry Label Size
Changes Entry candle label size.
━━━━━━━━━━━━━━━━━━
Stop Visual Settings
Stop Line Color
Changes Stop Level line color.
Stop Line Width
Changes Stop Level line thickness.
Stop Text Size
Changes Stop Level text size.
━━━━━━━━━━━━━━━━━━
Take Profit Visual Settings
TP Line Color
Changes TP line color.
TP Line Width
Changes TP line thickness.
TP Text Size
Changes TP line text size.
━━━━━━━━━━━━━━━━━━
Trade Result Visual Settings
Result Label Size
Changes the size of trade result labels such as:
• Pattern expired
• Stopped out
• TP-1 hit then stopped out
• Take Profit Hit
━━━━━━━━━━━━━━━━━━
IMPORTANT NOTES
━━━━━━━━━━━━━━━━━━
This script uses pivot-based market structure logic.
Patterns are confirmed only after pivot confirmation occurs.
Because of this, structural signals can appear with confirmation delay.
The indicator is designed for analytical and educational purposes and should not be considered financial advice.
Past performance does not guarantee future results.
This indicator detects Bullish and Bearish Quasimodo market structure patterns and automatically creates a complete trade management structure including Entry, Stop Level, TP-1 and TP-2 levels.
The script is designed to help traders visually track structural reversals and possible reaction zones using a clean and fully automated pattern workflow.
━━━━━━━━━━━━━━━━━━
FEATURES
━━━━━━━━━━━━━━━━━━
• Automatic Bullish and Bearish Quasimodo pattern detection
• Dynamic A → B → C → D structure drawing
• Automatic Entry level generation
• Dynamic Stop Level tracking
• Automatic TP-1 and TP-2 levels
• Pattern expiration system
• Trade result tracking system
• Historical pattern visualization
• Fully customizable visual settings
• Integrated alert system
━━━━━━━━━━━━━━━━━━
ALERT SYSTEM
━━━━━━━━━━━━━━━━━━
The indicator includes built-in TradingView alert conditions for all major events.
Available alerts:
• Bullish Quasimodo Detected
• Bearish Quasimodo Detected
• Entry Triggered
• TP-1 Hit
• Take Profit Hit
• Stopped out
• Pattern expired
These alerts can be used for:
• Notifications
• Webhooks
• Automation systems
• Trade monitoring workflows
━━━━━━━━━━━━━━━━━━
HOW THE PATTERN WORKS
━━━━━━━━━━━━━━━━━━
Bearish Quasimodo Structure:
The indicator searches for a Higher High followed by a Lower Low structure shift.
After the structural shift forms, the script tracks the retracement level and creates an Entry zone.
Bullish Quasimodo Structure:
The indicator searches for a Lower Low followed by a Higher High structure shift.
After the structural shift forms, the script tracks the retracement level and creates an Entry zone.
The structure is automatically monitored after the D point is confirmed.
━━━━━━━━━━━━━━━━━━
ENTRY SYSTEM
━━━━━━━━━━━━━━━━━━
The Entry level is based on the A structure point.
When price returns to the Entry level, the script automatically activates the trade structure.
Before Entry occurs:
• TP levels are not active
• Stop Level is not active
If price never reaches the Entry level within the specified timeout period, the pattern becomes invalid and the script prints:
“Pattern expired”
━━━━━━━━━━━━━━━━━━
STOP & TAKE PROFIT SYSTEM
━━━━━━━━━━━━━━━━━━
Stop Level:
The Stop Level is dynamically created using the C structure point.
Take Profit Levels:
TP-1 and TP-2 levels are automatically generated from the pattern structure.
Trade Result Logic:
• If price directly hits Stop Level:
“Stopped out”
• If TP-1 is reached and price later hits Stop:
“TP-1 hit then stopped out”
• If TP-2 is reached:
“Take Profit Hit”
The script also stops extending trade management lines once the trade is completed.
━━━━━━━━━━━━━━━━━━
VISUAL SYSTEM
━━━━━━━━━━━━━━━━━━
Entry Line:
Blue colored dynamic Entry line.
Take Profit Lines:
Green TP-1 and TP-2 lines.
Stop Line:
Red Stop Level line.
All major visual elements can be customized from the settings panel:
• Line colors
• Line widths
• Text sizes
• Result label sizes
━━━━━━━━━━━━━━━━━━
SETTINGS
━━━━━━━━━━━━━━━━━━
ZigZag Settings
Left Bars
Controls pivot sensitivity on the left side.
Right Bars
Controls pivot confirmation on the right side.
━━━━━━━━━━━━━━━━━━
Other Settings
Quasimodo Mode
Choose Bullish, Bearish or Both pattern types.
Entry Timeout Bars
Maximum number of bars allowed before the pattern expires.
━━━━━━━━━━━━━━━━━━
Position Entry Visual Settings
Entry Line Color
Changes Entry line color.
Entry Line Width
Changes Entry line thickness.
Entry Text Size
Changes Entry line text size.
Entry Label Size
Changes Entry candle label size.
━━━━━━━━━━━━━━━━━━
Stop Visual Settings
Stop Line Color
Changes Stop Level line color.
Stop Line Width
Changes Stop Level line thickness.
Stop Text Size
Changes Stop Level text size.
━━━━━━━━━━━━━━━━━━
Take Profit Visual Settings
TP Line Color
Changes TP line color.
TP Line Width
Changes TP line thickness.
TP Text Size
Changes TP line text size.
━━━━━━━━━━━━━━━━━━
Trade Result Visual Settings
Result Label Size
Changes the size of trade result labels such as:
• Pattern expired
• Stopped out
• TP-1 hit then stopped out
• Take Profit Hit
━━━━━━━━━━━━━━━━━━
IMPORTANT NOTES
━━━━━━━━━━━━━━━━━━
This script uses pivot-based market structure logic.
Patterns are confirmed only after pivot confirmation occurs.
Because of this, structural signals can appear with confirmation delay.
The indicator is designed for analytical and educational purposes and should not be considered financial advice.
Past performance does not guarantee future results.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
EmirTradeHub
X: x.com/emirtradehub?s=21
Telegram: @EmirTradeHub
X: x.com/emirtradehub?s=21
Telegram: @EmirTradeHub
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.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
EmirTradeHub
X: x.com/emirtradehub?s=21
Telegram: @EmirTradeHub
X: x.com/emirtradehub?s=21
Telegram: @EmirTradeHub
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.