Download Pin Bar Reversal Indicator


Traders need indications and confirmation about any changes in the market trend. It is essential to identify these changes as they can significantly affect traders’ trading plans. It is imperative to keep up with the changing market trends to have meaningful trade. 

Many indicators and analysis tools are available to Forex traders to stay ahead in the market. One of the most critical analysis strategies is the Candlestick Chart Pattern. Candlestick patterns are an indispensable part of it when it comes to the technical analysis of Forex. The majority of traders rely on these patterns while trading Forex. This is mainly because these patterns give strong indications of any changes in the market trend. 

What most traders look out for in the Forex market are the indications of trend continuation or trend reversals. The Pin Bar Forex Pattern and the Doji Pattern are the best candlestick patterns to identify such movements.

This article will read the Pin Bar Candlestick Pattern and Pin Bar Forex Pattern Indicator and how to trade Forex on MT4 using the Pin Bar Forex Pattern Indicator

Download the Pin Bar Reversal Indicator

The pin bar reversal indicator is the best for Mt4 for all traders that like to trade pattern recognition systems. You can download the indicator below.

DOWNLOAD PIN BAR INDICATOR

pin bar reversal indicator on MT4 GBPUSd chart

 

What Is a Pin Bar Candlestick Pattern?

The Pin Bar is a candlestick pattern that can be identified with a small body and a long wick or tail. There are two types of Pin Bar Candlestick Patterns, Bullish and Bearish. 

bullish pin bar reversal candlestick

The long tail or wick points upwards in the Bearish Pin Bar Forex Pattern. The length of the upward-facing long-tail reveals the price rejected by the buyers in the Forex market. On the contrary, the Bullish Pin Bar Forex Pattern has a long tail pointing downwards, representing the price declined by the sellers. These patterns indicate a possibility of a trend reversal, and the price may start moving in the direction opposite to that in which the tail is pointing.

bearish pin bar reversal candlestick

The Pin Bar Forex Pattern is crucial to verify a market trend reversal. Many traders take help from this pattern regularly to confirm the market movements. However, due to numerous ways forming in a Forex price chart over time, it can easily be mistaken for other similar-looking patterns. Therefore, traders can use the Pin Bar Forex Pattern Indicator to confirm the occurrence of the Pin Bar Forex Pattern on the MT4 terminal screen. 

 

What Is the Pin Bar Forex Pattern Indicator?

The Pin Bar Forex Pattern Indicator can be easily downloaded and applied to the MT4 Forex terminal. This indicator highlights all the Pin Bar Forex Patterns on the Forex price chart. This indicator is beneficial for novice Forex traders, as tracing a candlestick pattern can be difficult when they are still learning. Also, expert traders can use this indicator with other tools to create a Forex trading plan.

When applied to the MetaTrader platform, the Pin Bar Forex Pattern Indicator automatically highlights all the Pin Bar Forex Patterns on the chart. The bearish pin bar is highlighted with a red arrow on the top of it, while a bullish pin bar is highlighted with a green arrow at the bottom of its tail or wick. 

The Pin Bar Forex Pattern Indicator is simple, especially with the MetaTrader. It simplifies traders’ work to look for the Pin Bar Forex Patterns on the price chart. The Pin Bar Forex Patterns are important trend reversal indicators. Not only this, but the pattern also assists traders in determining where to place the buy and sell orders. So, it becomes essential for traders to recognize these patterns at the right time. 

pin bar reversal indicator screenshot

Pin Bar Pattern Detection MQL4 Code

Below you can see the source code of the presented Pin Bar Indicator.

//|                       Pin bar Pattern detection
//+------------------------------------------------------------------+
#property copyright "forex.in.rs"
#property link      "forex.in.rs"

#property indicator_chart_window
#property indicator_buffers 6
#property indicator_color1 Red         // Bear Pinbar
#property indicator_color2 Green       // Bull Pinbar


//#property indicator_color3 Red         //inside bars -- upper wick
//#property indicator_color4 Red         //inside bars -- lower wick


extern bool pinbar_on = true;
extern bool insidebar_on = false;
extern int highlight_width = 5;
extern color insidebar_clr = Yellow;
extern double body2pin_ratio = 2.0;


string pin_name;


//--- buffers
double InsidebarUpperBuffer[];
double InsidebarLowerBuffer[];
double MotherbarUpperBuffer[];
double MotherbarLowerBuffer[];

double PinbarBearBuffer[];
double PinbarBullBuffer[];

/*
double get_max(int ind){
   int i;
   double max = Low[1];
   for(i=ind+1; i<period+ind+1; i++){
      if(High[i] > max)
         max = High[i];
   }   
   return(max);
}

double get_min(int ind){
   int i;
   double min = High[1];
   for(i=ind+1; i<period+ind+1; i++){
      if(Low[i] < min)
         min = Low[i];
   }
   return(min);
}
*/

void check_insidebar(int ind){
   bool within_neighbor_range = High[ind+1] > High[ind] && Low[ind+1] < Low[ind];
   if( within_neighbor_range ){
      MotherbarLowerBuffer[ind+1]=Low[ind+1];      
      MotherbarUpperBuffer[ind+1]=High[ind+1];     
      
      InsidebarLowerBuffer[ind]=Low[ind];
      InsidebarUpperBuffer[ind]=High[ind];      // Indicate the inside bar + Mother bar

      check_insidebar(ind+1);
   }
}

void check_pinbar(int ind){
   double pin, body;
   double neighbor1_H, neighbor1_L;
   bool body_within_neighbor_range;
   bool pin_beyond_neighbor_range;
   
   neighbor1_H = High[ind+1];
   neighbor1_L = Low[ind+1];
   body_within_neighbor_range = MathMax(Open[ind], Close[ind]) < neighbor1_H && MathMin(Open[ind], Close[ind]) > neighbor1_L;
   
// Check the bullish pinbar
   pin = MathMin(Open[ind], Close[ind])-Low[ind];
   body = High[ind]-Low[ind]-pin;
   pin_beyond_neighbor_range = Low[ind] < Low[ind+1];
   if( pin > body2pin_ratio*body && body_within_neighbor_range && pin_beyond_neighbor_range) {
      PinbarBullBuffer[ind] = Low[ind];
   }

//Check the bearish pinbar
   pin = High[ind]-MathMax(Open[ind], Close[ind]);
   body = High[ind]-Low[ind]-pin;
   pin_beyond_neighbor_range = High[ind] > High[ind+1];
   if( pin > body2pin_ratio*body && body_within_neighbor_range && pin_beyond_neighbor_range){
      // Put Bearish Pinbar!!
      PinbarBearBuffer[ind] = High[ind];
   }
   
}
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   IndicatorBuffers(6);
   
   // Bull Pinbar
   SetIndexStyle(0,DRAW_ARROW,0,2);           // Up Arrow
   SetIndexArrow(0,241);
   SetIndexBuffer(0,PinbarBullBuffer);
   SetIndexEmptyValue(0,0.0);
   
   // Bear Pinbar
   SetIndexStyle(1,DRAW_ARROW,0,2);           // Down Arrow
   SetIndexArrow(1,242);
   SetIndexBuffer(1,PinbarBearBuffer);
   SetIndexEmptyValue(1,0.0);

   SetIndexBuffer(2,InsidebarLowerBuffer);
   SetIndexStyle(2,DRAW_HISTOGRAM,0,highlight_width,insidebar_clr);
   SetIndexEmptyValue(2,0.0);

   SetIndexBuffer(3,InsidebarUpperBuffer);
   SetIndexStyle(3,DRAW_HISTOGRAM,0,highlight_width,insidebar_clr);
   SetIndexEmptyValue(3,0.0);
   
   SetIndexBuffer(4,MotherbarLowerBuffer);
   SetIndexStyle(4,DRAW_HISTOGRAM,0,highlight_width,insidebar_clr);
   SetIndexEmptyValue(4,0.0);

   SetIndexBuffer(5,MotherbarUpperBuffer);
   SetIndexStyle(5,DRAW_HISTOGRAM,0,highlight_width,insidebar_clr);
   SetIndexEmptyValue(5,0.0);
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   init();
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int i,j;
   int counted_bars=IndicatorCounted();
   int limit = Bars-counted_bars-1;
   
   for(i=0; i<limit; i++){
      if(pinbar_on) check_pinbar(i+1);
      if(insidebar_on) check_insidebar(i+1);

   }

//----
   return(0);
  }
//+----------------s--------------------------------------------------+

Conclusion

The Pin Bar Forex Pattern Indicator is a detector and scanner that scans the Forex price chart and detects all the Pin Bar Forex Patterns for traders. It is imperative for all technical trading strategies and can be of great use to both beginners and experts. Its ability to automatically mark all the Pin Bar Forex Patterns and adaptability with the EA proves it to be a trader’s companion.

However, even though the Pin Bar is a strong indicator of a trend reversal, one must also confirm the changes in the trend with the current price action.

 

Fxigor

Fxigor

Igor has been a trader since 2007. Currently, Igor works for several prop trading companies. He is an expert in financial niche, long-term trading, and weekly technical levels. The primary field of Igor's research is the application of machine learning in algorithmic trading. Education: Computer Engineering and Ph.D. in machine learning. Igor regularly publishes trading-related videos on the Fxigor Youtube channel. To contact Igor write on: igor@forex.in.rs

Trade gold and silver. Visit the broker's page and start trading high liquidity spot metals - the most traded instruments in the world.

Trade Gold & Silver

GET FREE MEAN REVERSION STRATEGY

Recent Posts