Pinbar Detector - MetaTrader 5 Script - MQL5 #1595 - MT4/MT5 Resources


Real author:
This indicator is used to fix Pin Bars in charts. You can read about Pin Bar here .
The Pin Bar pattern consists of three bars: "Left Eye," "Nose," and "Right Eye." The "left eye" must be a growing bar for a Bearish Pin Bar or a falling bar for a Bullish Pin Bar. The "nose" must open and close within the "left eye", but its maximum (or minimum for a bullish pattern) must be far away from the maximum (or minimum) of the left eye. The opening and closing prices of the "nose" must be in the upper quarter of the bar chart:

Figure 1 Pin Bar pattern
Another condition for a good pattern is the presence of a strong support/resistance line behind the "eye" or near the "tip of the nose". The stronger these levels, the more precise the pattern.
Admission requirements:
Exit conditions:
Indicator input parameters:
Input boolean use alert= true ; // alert permissions enter boolean use email alerts = false ; // email alert permissions Enter double the maximum nose size = 0.33 ; // Maximum allowed ratio of nose to overall bar length Enter double nose body position = 0.4 ; // The extreme position of the nose body within the bar. The upper part is bullish and the lower part is bearish. Input Boolean Left Eye Opposite Direction = True ; // Left eye must be Bearish for Bullish Pin Bar and Bullish for Bullish Pin Bar Input Boolean value nose same direction = wrong ; // The nose must be in the same direction as the character itself Input boolean NoseBodyInsideLeftEyeBody= False ; // The nose body must be placed in the left eye body Enter double LeftEyeMinBodySize= 0.1 ; // Minimum left eye body size relative to bar length Enter double nose protrusion = 0.5 ; // minimum protrusion of nose relative to stem length Enter double NoseBodyToLeftEyeBody= 1 ; // Maximum nose body size relative to the left eye body Enter double nose length to left eye length = 0 ; // minimum nose length relative to left eye Enter double left eye depth = 0.1 ; // Minimum left eye depth relative to its length. Depth - the length of the bar behind the nose

Figure 2 Pinbar detector indicator light
Attachment download
📎 pinbardetector.mq5 (10.2 KB)
Source: MQL5 #1595
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •