Sem SAR+ADX

Author: ������� ������� (�) 2007
Sem SAR+ADX

This custom technical indicator is designed to assist traders in identifying potential market trends by combining two distinct types of market analysis: trend direction and momentum strength. By merging these two methodologies, the tool aims to provide a clearer picture of whether a price movement is robust enough to act upon or if it lacks the necessary force.

Core Analytical Components

The logic operates by continuously monitoring three key data points on the chart:

  1. The Parabolic SAR (Stop and Reverse): This component acts as a trend tracker. It identifies whether the current price is moving upward or downward relative to a calculated "stop" level. When the price crosses this level, it signals a potential shift in the market's primary direction.
  2. The ADX (Average Directional Index): This measures the strength of a trend. Specifically, it looks at two components: one that tracks upward movement (positive) and one that tracks downward movement (negative). By comparing these two, the script determines which direction is currently dominant and how powerful that movement actually is.

Operational Logic

The indicator processes this data to categorize every price point into four distinct scenarios, visually represented as histograms. Instead of just telling you "the price is going up," the logic evaluates the quality of that movement:

  • Strong Sell Signals: Occur when the trend tracker indicates a downward shift and the momentum data confirms that the downward force is significantly stronger than any upward pressure.
  • Strong Buy Signals: Occur when the trend tracker indicates an upward shift and the momentum data confirms that the upward force is dominating the market.
  • Weak Sell Signals: Identify situations where the trend tracker suggests a move downward, but the momentum data shows that the downward push is relatively weak or lacks significant power.
  • Weak Buy Signals: Identify situations where the trend tracker suggests an upward move, but the momentum data indicates that the upward push is lacking sufficient strength to be considered robust.

Summary for the User

In essence, this script filters market noise. It doesn't just notify you of price changes; it attempts to distinguish between "meaningful" moves and "hesitant" price action. By highlighting these four conditions, it helps traders identify high-conviction opportunities where the trend and the momentum are moving in harmony.

Indicators Used
Movement directional indexParabolic Stop and Reverse system
Miscellaneous
Implements a curve of type %1
19 Views
0 Downloads
0 Favorites
Sem SAR+ADX
//+------------------------------------------------------------------+
//|                                  Áîëüøàÿ Êîëëåêöèÿ Ñåìàôîðîâ.mq4 |
//+------------------------------------------------------------------+
#property copyright "Ñåðãååâ Àëåêñåé (ñ) 2007"

#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 1
#property indicator_buffers 4
#property indicator_width1 2
#property indicator_width2 2
#property indicator_width3 1
#property indicator_width4 1
#property indicator_color1 Crimson
#property indicator_color2 LimeGreen
#property indicator_color3 Crimson
#property indicator_color4 LimeGreen
#property indicator_style1 STYLE_SOLID
#property indicator_style2 STYLE_SOLID
#property indicator_style3 STYLE_SOLID
#property indicator_style4 STYLE_SOLID

//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];

int init()
{
//---- indicators
	SetIndexStyle(0,DRAW_HISTOGRAM);	SetIndexBuffer(0,ExtMapBuffer1);
	SetIndexStyle(1,DRAW_HISTOGRAM);	SetIndexBuffer(1,ExtMapBuffer2);
	SetIndexStyle(2,DRAW_HISTOGRAM);	SetIndexBuffer(2,ExtMapBuffer3);
	SetIndexStyle(3,DRAW_HISTOGRAM);	SetIndexBuffer(3,ExtMapBuffer4);

	IndicatorShortName("SAR+ADX");  
	return(0);
}
int deinit()  { return(0); }

int start()
{
	double sar;
	double adxP,adxN;

	for (int i = 0; i < Bars; i++)
	{
		ExtMapBuffer1[i]=0; ExtMapBuffer2[i]=0; ExtMapBuffer3[i]=0; ExtMapBuffer4[i]=0;

		adxP=iADX(NULL,0,14 ,PRICE_CLOSE,1,i);//+DI
		adxN=iADX(NULL,0,14 ,PRICE_CLOSE,2,i);//-DI

		sar = iSAR(NULL,0,0.02,0.2,i) ;

		if (sar > Close[i] && adxN > adxP){ ExtMapBuffer1[i] = 1; }//ïðîäàåì ñèëüíî
		if (sar < Close[i] && adxP > adxN){ ExtMapBuffer2[i] = 1; }//ïîêóïàåì ñèëüíî
		if (sar > Close[i] && adxP > adxN){ ExtMapBuffer3[i] = 1; }//ïðîäàåì ñëàáî
		if (sar < Close[i] && adxN > adxP){ ExtMapBuffer4[i] = 1; }//ïîêóïàåì ñëàáî
	}
	return(0);
}
//+------------------------------------------------------------------+

Comments