OPEN-SOURCE SCRIPT
Quasimodo Pattern Strategy Back Test [TradingFinder] QM Trading

🔵Introduction
The QM pattern, also known as the Quasimodo pattern, is one of the popular patterns in price action, and it is often used by technical analysts. The QM pattern is used to identify trend reversals and provides a very good risk-to-reward ratio. One of the advantages of the QM pattern is its high frequency and visibility in charts.
Additionally, due to its strength, it is highly profitable, and as mentioned, its risk-to-reward ratio is very good. The QM pattern is highly popular among traders in supply and demand, and traders also use this pattern.
The Price Action QM pattern, like other Price Action patterns, has two types: Bullish QM and Bearish QM patterns. To identify this pattern, you need to be familiar with its types to recognize it.
🔵Identifying the QM Pattern
🟣Bullish QM
In the bullish QM pattern, as you can see in the image below, an LL and HH are formed. As you can see, the neckline is marked as a dashed line. When the price reaches this range, it will start its upward movement.

🟣Bearish QM
The Price Action QM pattern also has a bearish pattern. As you can see in the image below, initially, an HH and LL are formed. The neckline in this image is the dashed line, and when the LL is formed, the price reaches this neckline. However, it cannot pass it, and the downward trend resumes.

🔵How to Use
The Quasimodo pattern is one of the clearest structures used to identify market reversals. It is built around the concept of a structural break followed by a pullback into an area of trapped liquidity. Instead of relying on lagging indicators, this pattern focuses purely on price action and how the market reacts after exhausting one side of liquidity. When understood correctly, it provides traders with precise entry points at the transition between trend phases.
🟣Bullish Quasimodo
A bullish Quasimodo forms after a clear downtrend when sellers start losing control. The market continues to make lower lows until a sudden higher high appears, signaling that buyers are entering with strength. Price then pulls back to retest the previous low, creating what is known as the Quasimodo low.

This area often becomes the final trap for sellers before the market shifts upward. A visible rejection or displacement from this zone confirms bullish momentum. Traders usually place entries near this level, stops below the low, and targets at previous highs or the next resistance zone. Combining the setup with demand zones or Fair Value Gaps increases its accuracy.
🟣Bearish Quasimodo
A bearish Quasimodo forms near the top of an uptrend when buyers begin to lose strength. The market continues to make higher highs until a sudden lower low breaks the bullish structure, showing that selling pressure is entering the market. Price then retraces upward to retest the previous high, forming the Quasimodo high, where breakout buyers are often trapped.

Once rejection appears at this level, it indicates a likely reversal. Traders can enter short near this area, with stop-losses placed above the high and targets near the next support or previous lows. The setup gains more reliability when aligned with supply zones, SMT divergence, or bearish Fair Value Gaps.
🔵Setting
Pivot Period: You can use this parameter to use your desired period to identify the QM pattern. By default, this parameter is set to the number 5.
Take Profit Mode: You can choose your desired Take Profit in three ways. Based on the logic of the QM strategy, you can select two Take Profit levels, TP1 and TP2. You can also choose your take profit based on the Reward to Risk ratio. You must enter your desired R/R in the Reward to Risk Ratio parameter.



Stop Loss Refine: The loss limit of the QM strategy is based on its logic on the Head pattern. You can refine it using the ATR Refine option to prevent Stop Hunt. You can enter your desired coefficient in the Stop Loss ATR Adjustment Coefficient parameter.


Reward to Risk Ratio: If you set Take Profit Mode to R/R, you must enter your desired R/R here. For example, if your loss limit is 10 pips and you set R/R to 2, your take profit will be reached when the price is 20 pips away from your entry point.
Stop Loss ATR Adjustment Coefficient: If you set Stop Loss Refine to ATR Refine, you must adjust your loss limit coefficient here. For example, if your buy position's loss limit is at the price of 1000, and your ATR is 10, if you set Stop Loss ATR Adjustment Coefficient to 2, your loss limit will be at the price of 980.
Entry Level Validity: Determines how long the Entry level remains valid. The higher the level, the longer the entry level will remain valid. By default it is 2 and it can be set between 2 and 15.
🔵Results
The following examples show the backtest results of the Quasimodo (QM) strategy in action. Each image is based on specific settings for the symbol, timeframe, and input parameters, illustrating how the QM logic can generate signals under different market conditions. The detailed configuration for each backtest is also displayed on the image.
⚠Important Note: Even with identical settings and the same symbol, results may vary slightly across different brokers due to data feed variations and pricing differences.
Default Properties of Backtests:

XAUUSD | TimeFrame: 5min | Duration: 1 Year:

BTCUSD | TimeFrame: 5min | Duration: 1 Year:

US30 | TimeFrame: 5min | Duration: 1 Year:

QQQ | TimeFrame: 5min | Duration: 5 Year:


EURUSD | TimeFrame: 5min | Duration: 5 Year:

US500 | TimeFrame: 5min | Duration: 5 Year:

The QM pattern, also known as the Quasimodo pattern, is one of the popular patterns in price action, and it is often used by technical analysts. The QM pattern is used to identify trend reversals and provides a very good risk-to-reward ratio. One of the advantages of the QM pattern is its high frequency and visibility in charts.
Additionally, due to its strength, it is highly profitable, and as mentioned, its risk-to-reward ratio is very good. The QM pattern is highly popular among traders in supply and demand, and traders also use this pattern.
The Price Action QM pattern, like other Price Action patterns, has two types: Bullish QM and Bearish QM patterns. To identify this pattern, you need to be familiar with its types to recognize it.
🔵Identifying the QM Pattern
🟣Bullish QM
In the bullish QM pattern, as you can see in the image below, an LL and HH are formed. As you can see, the neckline is marked as a dashed line. When the price reaches this range, it will start its upward movement.
🟣Bearish QM
The Price Action QM pattern also has a bearish pattern. As you can see in the image below, initially, an HH and LL are formed. The neckline in this image is the dashed line, and when the LL is formed, the price reaches this neckline. However, it cannot pass it, and the downward trend resumes.
🔵How to Use
The Quasimodo pattern is one of the clearest structures used to identify market reversals. It is built around the concept of a structural break followed by a pullback into an area of trapped liquidity. Instead of relying on lagging indicators, this pattern focuses purely on price action and how the market reacts after exhausting one side of liquidity. When understood correctly, it provides traders with precise entry points at the transition between trend phases.
🟣Bullish Quasimodo
A bullish Quasimodo forms after a clear downtrend when sellers start losing control. The market continues to make lower lows until a sudden higher high appears, signaling that buyers are entering with strength. Price then pulls back to retest the previous low, creating what is known as the Quasimodo low.
This area often becomes the final trap for sellers before the market shifts upward. A visible rejection or displacement from this zone confirms bullish momentum. Traders usually place entries near this level, stops below the low, and targets at previous highs or the next resistance zone. Combining the setup with demand zones or Fair Value Gaps increases its accuracy.
🟣Bearish Quasimodo
A bearish Quasimodo forms near the top of an uptrend when buyers begin to lose strength. The market continues to make higher highs until a sudden lower low breaks the bullish structure, showing that selling pressure is entering the market. Price then retraces upward to retest the previous high, forming the Quasimodo high, where breakout buyers are often trapped.
Once rejection appears at this level, it indicates a likely reversal. Traders can enter short near this area, with stop-losses placed above the high and targets near the next support or previous lows. The setup gains more reliability when aligned with supply zones, SMT divergence, or bearish Fair Value Gaps.
🔵Setting
Pivot Period: You can use this parameter to use your desired period to identify the QM pattern. By default, this parameter is set to the number 5.
Take Profit Mode: You can choose your desired Take Profit in three ways. Based on the logic of the QM strategy, you can select two Take Profit levels, TP1 and TP2. You can also choose your take profit based on the Reward to Risk ratio. You must enter your desired R/R in the Reward to Risk Ratio parameter.
Stop Loss Refine: The loss limit of the QM strategy is based on its logic on the Head pattern. You can refine it using the ATR Refine option to prevent Stop Hunt. You can enter your desired coefficient in the Stop Loss ATR Adjustment Coefficient parameter.
Reward to Risk Ratio: If you set Take Profit Mode to R/R, you must enter your desired R/R here. For example, if your loss limit is 10 pips and you set R/R to 2, your take profit will be reached when the price is 20 pips away from your entry point.
Stop Loss ATR Adjustment Coefficient: If you set Stop Loss Refine to ATR Refine, you must adjust your loss limit coefficient here. For example, if your buy position's loss limit is at the price of 1000, and your ATR is 10, if you set Stop Loss ATR Adjustment Coefficient to 2, your loss limit will be at the price of 980.
Entry Level Validity: Determines how long the Entry level remains valid. The higher the level, the longer the entry level will remain valid. By default it is 2 and it can be set between 2 and 15.
🔵Results
The following examples show the backtest results of the Quasimodo (QM) strategy in action. Each image is based on specific settings for the symbol, timeframe, and input parameters, illustrating how the QM logic can generate signals under different market conditions. The detailed configuration for each backtest is also displayed on the image.
⚠Important Note: Even with identical settings and the same symbol, results may vary slightly across different brokers due to data feed variations and pricing differences.
Default Properties of Backtests:
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
💎Get instant (Demo/Vip) access here: tradingFinder.com/
✅Get access to our support team: t.me/TFLABS
🧠Free Forex, Crypto & Stock Trading tutorial, same as ICT, Smart Money & Price Action:
tradingfinder.com/education/forex/
✅Get access to our support team: t.me/TFLABS
🧠Free Forex, Crypto & Stock Trading tutorial, same as ICT, Smart Money & Price Action:
tradingfinder.com/education/forex/
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
💎Get instant (Demo/Vip) access here: tradingFinder.com/
✅Get access to our support team: t.me/TFLABS
🧠Free Forex, Crypto & Stock Trading tutorial, same as ICT, Smart Money & Price Action:
tradingfinder.com/education/forex/
✅Get access to our support team: t.me/TFLABS
🧠Free Forex, Crypto & Stock Trading tutorial, same as ICT, Smart Money & Price Action:
tradingfinder.com/education/forex/
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。