Home Technical Indicator Post

Mastering Pin Bar Patterns with MetaTrader 5: Your Ultimate Trading Indicator

Attachments
1768.zip (1.99 KB, Download 0 times)

The Pin Bar indicator is a powerful tool for traders, detecting and visualizing one of the core patterns in Price Action trading. When you're analyzing high timeframes, like daily or monthly charts, a pin bar can serve as a strong signal to enter the market in the opposite direction of the long shadow. It's important to note that this indicator is calculated only on complete bars, which is crucial for accurate signals.

Input Parameters:

input int      MinBarSize=200;         // Minimum bar range in points
input int      PriceOffset=50;         // Shift of the open price and stop loss from the bar boundaries in points
input double   BarRatio=2.2           // Minimum ratio of the bar range to the body
input double   TailRatio=1.3          // Minimum ratio of a larger tail to the remaining part of the bar
input bool     UseBodyDirection=false; // Flag for checking the direction of the bar body. Bearish pin bar - bearish body, bullish bar - bullish body
input bool     UseCloseThirds=true;    // Flag for checking the bar part in which it closed. For bearish bars - in the lower third of the bar,
                                     // for bullish bars - upper one
input int      ExtremumOfBars=10     // Checking the condition of location of the pin bar at the extreme relative to the specified number of previous bars

Tips:

  • The indicator features two buffers. One stores the recommended prices for opening stop orders (indicated by green points), while the other contains suggested stop loss values (marked by red points). You can easily integrate this into your trading system using the iCustom() function.
  • Keep in mind that some pin bars with appropriate proportions might not be indicated due to the ExtremumOfBars parameter value. Adjusting these recognition parameters can help you pinpoint the results you're after.

Related Posts

Comments (0)