The Quasimodo trading strategy is a chart pattern that consists of a series of swing highs and lows that breaks the characteristics of an existing trend.
What Does Quasimodo Mean in Trading? In trading, the Quasimodo definition refers to a reversal pattern that signals a potential change in the trend direction. It indicates a shift from an uptrend to a downtrend (bearish Quasimodo) or a downtrend to an uptrend (bullish Quasimodo).
Note* Some technicians might call this reversal pattern the βOver and Underβ chart pattern.
Quasimodo Pattern Trading Strategy π₯
The Quasimodo pattern is a reversal price action pattern that helps traders identify potential trend reversals. It is also known as the Over and Under Pattern and is used in both forex and stock trading.
π What is the Quasimodo Pattern?
The Quasimodo pattern consists of higher highs (HH), lower lows (LL), and an imbalance in structure that signals a potential trend reversal.
πΉ Bullish Quasimodo Pattern (Buy Signal)
- The market is in a downtrend (Lower Highs & Lower Lows).
- Price creates a Higher High (HH), breaking previous structure.
- Then, a Lower Low (LL) is formed.
- Entry: When price retraces to a key support zone after breaking the structure.
πΉ Confirmation: Look for bullish candlestick patterns like a pin bar, engulfing candle, or doji.
π» Bearish Quasimodo Pattern (Sell Signal)
- The market is in an uptrend (Higher Highs & Higher Lows).
- Price creates a Lower Low (LL), breaking previous structure.
- Then, a Higher High (HH) is formed.
- Entry: When price retraces to a key resistance level after breaking structure.
π» Confirmation: Look for bearish candlestick patterns like a bearish engulfing, pin bar, or shooting star.
π How to Trade the Quasimodo Pattern
1οΈβ£ Identify Market Structure
- Look for a strong trend reversal with a break of structure.
- Confirm a shift from higher highs to lower lows (or vice versa).
2οΈβ£ Mark Key Levels
- Identify support & resistance zones for possible retracements.
- Use Fibonacci retracements (50% – 78.6%) for extra confluence.
3οΈβ£ Wait for Price Confirmation
- Price should return to the Quasimodo level (previous broken structure).
- Look for candlestick confirmation before entering.
4οΈβ£ Set Stop-Loss & Take-Profit
β
Stop-Loss (SL): Above/below the Quasimodo level (5-10 pips buffer).
β
Take-Profit (TP): Near the next support/resistance zone.
β
Risk-to-Reward Ratio: Aim for at least 1:2 or 1:3 RR.
π Example of Quasimodo Strategy
π Bullish Quasimodo Example
- Downtrend creates Lower Highs & Lower Lows.
- Price breaks a key resistance and makes a Higher High (HH).
- Price retraces to a previous structure zone (support).
- Look for bullish reversal candles and enter a BUY trade.
π Bearish Quasimodo Example
- Uptrend creates Higher Highs & Higher Lows.
- Price breaks a key support and forms a Lower Low (LL).
- Price retraces to a resistance zone.
- Look for bearish reversal candles and enter a SELL trade.
π Tools to Improve Accuracy
πΉ Fibonacci Levels β Look for retracements to 50% – 78.6% for confluence.
πΉ RSI Indicator β Check for overbought (70) or oversold (30) conditions.
πΉ Volume Analysis β Strong volume confirms breakout and Quasimodo validity.
π Pro Tips for Quasimodo Trading
β
Combine with Support & Resistance, RSI, and Fibonacci levels.
β
Trade only on higher timeframes (H1, H4, Daily) for higher accuracy.
β
Wait for confirmation before entering a trade.
β
Avoid trading in ranging markets (low volatility).
Python script to detect Quasimodo patterns in live market data? ππ
Here’s a Python script to detect Quasimodo patterns in historical market data using pandas, numpy, and TA-Lib (for technical analysis). This script fetches forex/stock data from Yahoo Finance, identifies potential Quasimodo patterns, and plots them for visualization.
A “Quasimodo” pattern in trading, also called an “Over and Under” pattern, is a price action reversal structure with a series of higher highs and higher lows (for bearish reversals) or lower lows and lower highs (for bullish reversals).
Hereβs a Python script to detect Quasimodo patterns in live market data using TA-Lib and ccxt (for live exchange data). It checks for a series of higher highs (HH) and higher lows (HL) followed by a break of structure.
Features of the script:
β
Fetches live market data from Binance
β
Identifies Quasimodo pattern based on price structure
β
Uses pandas & TA-Lib for analysis
β
Can be modified for different timeframes & assets
Python Code:
You’ll need to install dependencies first:
bashCopyEditpip install ccxt pandas numpy ta-lib
Now, hereβs the script:
pythonCopyEditimport ccxt
import pandas as pd
import numpy as np
# Initialize Binance API (No API Key needed for public data)
exchange = ccxt.binance()
# Parameters
symbol = "BTC/USDT"
timeframe = "5m" # Change to "1h", "15m", etc.
lookback = 50 # Number of candles to analyze
def fetch_market_data(symbol, timeframe, limit=100):
"""Fetch OHLCV market data from Binance"""
ohlcv = exchange.fetch_ohlcv(symbol, timeframe, limit=limit)
df = pd.DataFrame(ohlcv, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume'])
df['timestamp'] = pd.to_datetime(df['timestamp'], unit='ms') # Convert timestamp
return df
def identify_quasimodo(df):
"""Detect Quasimodo Pattern"""
highs = df['high'].values
lows = df['low'].values
closes = df['close'].values
for i in range(4, len(df)):
HH1 = highs[i-4]
HL1 = lows[i-3]
HH2 = highs[i-2]
HL2 = lows[i-1]
BOS = lows[i] # Break of structure level
if HH2 > HH1 and HL2 > HL1 and BOS < HL1: # Bearish Quasimodo
print(f"Bearish Quasimodo detected at {df['timestamp'][i]}")
if HH2 < HH1 and HL2 < HL1 and BOS > HH1: # Bullish Quasimodo
print(f"Bullish Quasimodo detected at {df['timestamp'][i]}")
# Run the detection
df = fetch_market_data(symbol, timeframe, lookback)
identify_quasimodo(df)
How It Works:
- It fetches recent candlestick data (OHLCV) from Binance
- It checks for the Quasimodo structure:
- Bearish QM: Higher highs (HH), higher lows (HL), then a break of structure (BOS) downward
- Bullish QM: Lower highs (LH), lower lows (LL), then a BOS upward
- Prints detected patterns with timestamps
Next Steps & Improvements:
πΉ Add alerts (Telegram, email, etc.)
πΉ Store detected patterns in a database
πΉ Visualize with matplotlib or plotly
πΉ Use machine learning for more accurate detection