Author: Yuriy Tokman
analizBara

This tool is designed to automatically analyze the price action of the most recent completed candlestick on a trading chart. It works by dividing that specific candle into three equal vertical sections (the bottom third, the middle third, and the top third) and identifying where the price opened and closed relative to these zones.

Depending on where the price movements land within these segments, the script categorizes the candle into one of several distinct types and displays a corresponding notification message on your screen. Here is how the logic breaks down:

The Three Zones

  • Bottom Third: The lower portion of the candle's range.
  • Middle Third: The central portion of the candle's range.
  • Top Third: The upper portion of the candle's range.

Categorization Logic

The script evaluates the relationship between the "Open" price (where the candle started) and the "Close" price (where it ended) to determine the following types:

1. Avoidance/Rejection Patterns These occur when both the opening and closing prices are concentrated in a single outer zone, suggesting a lack of momentum or a rejection of price movement into the center:

  • Top-Heavy: Both prices are in the top third.
  • Bottom-Heavy: Both prices are in the bottom third.

2. Neutral/Wolf Patterns These occur when both the opening and closing prices stay within the middle third of the candle, indicating a consolidated or indecisive price movement.

3. Bullish Patterns (Upward Momentum) These are identified when the price shows a clear upward transition:

  • Strong Bullish: Starts in the bottom third and finishes in the top third.
  • Bullish Entry 1: Starts in the middle third and finishes in the top third.
  • Bullish Entry 2: Starts in the bottom third and finishes in the middle third.

4. Bearish Patterns (Downward Momentum) These are identified when the price shows a clear downward transition:

  • Strong Bearish: Starts in the top third and finishes in the bottom third.
  • Bearish Entry 1: Starts in the middle third and finishes in the bottom third.
  • Bearish Entry 2: Starts in the top third and finishes in the middle third.

By identifying these positions, the script provides a quick visual summary of whether the previous candle demonstrated strength, weakness, or neutrality.

Miscellaneous
It opens Message Boxes to the user
18 Views
0 Downloads
0 Favorites
analizBara
//+------------------------------------------------------------------+
//|                                                   analizBara.mq4 |
//|                                                     Yuriy Tokman |
//|                                            yuriytokman@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Yuriy Tokman"
#property link      "yuriytokman@gmail.com"

//+------------------------------------------------------------------+
//| script program start function                                    |
//+------------------------------------------------------------------+
int start()
  {
//----
 double i=(High[1]-Low[1])/3;                           //ðàçìåð òðåòè áàðà
 
  if((Open[1]>(Low[1]+2*i))&&(Close[1]>(Low[1]+2*i)))   //öåíà îòêðûòèÿ è öåíà çàêðûòèÿ
                                                        //íàõîäÿòñÿ
                                                        //â ïåðâîé òðåòè áàðà, â âåðõó
   MessageBox("1-1 *ïðèáëèæåíèå-èçáåãàíèå* ","Áàð ¹");
   
  if((Open[1]>=(Low[1]+i))&&(Open[1]<=(High[1]-i))&&    //öåíà îòêðûòèÿ íàõîäèòüñÿ âî âòîðîé
                                                        //òðåòè áàðà, â ñåðåäèíå
    (Close[1]>=(Low[1]+i))&&(Close[1]<=(High[1]-i)))    //öåíà çàêðûòèÿ íàõîäèòüñÿ âî âòîðîé
                                                        //òðåòè áàðà, â ñåðåäèíå 
   MessageBox("2-2 *íåéòðàëüíûé èëè âîë÷åê* ","Áàð ¹");
   
  if((Open[1]<(High[1]-2*i))&&(Close[1]<(High[1]-2*i))) //öåíà îòêðûòèÿ è öåíà çàêðûòèÿ 
                                                        //íàõîäÿòñÿ â òðåòåé òðåòè áàðà,
                                                        //â íèæíåé ÷àñòè áàðà
   MessageBox("3-3 *ïðèáëèæåíèå-èçáåãàíèå* ","Áàð ¹");
                                       
                            //ÁÀÐÛ ÀËÜÏÈÍÈÑÒÛ
                            
  if((Open[1]<(High[1]-2*i))&&(Close[1]>(Low[1]+2*i)))
                            
   MessageBox("3-1 *Àëüïèíèñò* ","Áàð ¹");
   
  if((Open[1]>=(Low[1]+i))&&(Open[1]<=(High[1]-i))&&(Close[1]>(Low[1]+2*i)))
    
   MessageBox("2-1 *Àëüïèíèñò* ","Áàð ¹");
   
  if((Open[1]<(High[1]-2*i))&&(Close[1]>=(Low[1]+i))&&(Close[1]<=(High[1]-i)))
  
   MessageBox("3-2 *Àëüïèíèñò* ","Áàð ¹");
   
                            //ÁÀÐÛ ÁÐÎÄßÃÈ
                             
  if((Open[1]>(Low[1]+2*i))&&(Close[1]<(High[1]-2*i)))
   
   MessageBox("1-3 *Áðîäÿãà* ","Áàð ¹");
    
  if((Open[1]>=(Low[1]+i))&&(Open[1]<=(High[1]-i))&&(Close[1]<(High[1]-2*i)))
  
   MessageBox("2-3 *Áðîäÿãà* ","Áàð ¹");
   
  if((Open[1]>(Low[1]+2*i))&&(Close[1]>=(Low[1]+i))&&(Close[1]<=(High[1]-i)))
  
   MessageBox("1-2 *Áðîäÿãà* ","Áàð ¹");                           
                            
   
      
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments