Author: ������� ������� (�) 2007
Sem Sidus

This technical indicator is designed to analyze and visualize market momentum by comparing two different sets of moving averages. Its primary purpose is to identify the strength and direction of price movements, allowing traders to distinguish between robust trends and weakening price actions.

Core Logic Overview

The script functions by calculating four distinct moving averages across the chart based on user-defined periods (fast and slow settings). It then compares these averages in pairs to determine the prevailing market sentiment. By looking at how "fast" averages interact with "slow" averages, the tool categorizes the current market state into one of four specific categories represented by different colors on a separate display window.

How the Analysis Works

The indicator evaluates the data based on two primary conditions:

  1. Trend Direction: It checks whether the price is currently moving upward or downward by comparing a shorter-term average to a longer-term average.
  2. Momentum Strength: It simultaneously assesses the "velocity" of that movement by comparing another set of averages.

Signal Classifications

The script translates these comparisons into four distinct visual signals:

  • Strong Buying Pressure: Occurs when both sets of moving averages indicate a significant upward trend with high momentum. This suggests a powerful bullish move.
  • Strong Selling Pressure: Occurs when both sets of moving averages indicate a downward trend with high momentum, signaling a heavy bearish move.
  • Weak Buying Pressure: This appears when the price is trending upward, but the underlying momentum is diminishing or "soft," suggesting the uptrend may be losing steam.
  • Weak Selling Pressure: This occurs when the price is trending downward, but the momentum is weakening, which could indicate that the downtrend is losing its force.

User Customization

The logic is highly flexible and can be adjusted to suit different trading styles through several parameters:

  • Timeframe & Periods: Users can define the specific number of candles used to calculate the averages, allowing for short-term scalping or long-term trend following.
  • Moving Average Type: The tool allows for various calculation methods (such as Simple, Exponential, Smoothed, or Linear Weighted) to change how quickly the indicator reacts to new price data.
  • Price Source: Traders can choose which price point to base the calculations on, such as the closing price, opening price, daily highs/lows, or a median average.
Indicators Used
Moving average indicator
Miscellaneous
Implements a curve of type %1
16 Views
0 Downloads
0 Favorites
Sem Sidus
//+------------------------------------------------------------------+
//|                                  Áîëüøàÿ Êîëëåêöèÿ Ñåìàôîðîâ.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
//---- input parameters
extern int       Minutes=0;
extern int       rsMA=28;
extern int       rfMA=16;
extern int       bsMA=8;
extern int       bfMA=5;
extern int       Mode=MODE_EMA;//0-sma, 1-ema, 2-smma, 3-lwma
extern int       Price=PRICE_MEDIAN;//0-close, 1-open, 2-high, 3-low, 4-median, 5-typic, 6-wieight

//---- 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);

   string Name = "Sidus("+rsMA+","+rfMA+","+bsMA+","+bfMA+")";
   IndicatorShortName(Name);  

	return(0);
}
int deinit()  { return(0); }

int start()
{
   double rs, rf, bs, bf;
//----

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

		rs=iMA(NULL, Minutes, rsMA, 0, Mode, Price, i);
		rf=iMA(NULL, Minutes, rfMA, 0, Mode, Price, i);
		bs=iMA(NULL, Minutes, bsMA, 0, Mode, Price, i);
		bf=iMA(NULL, Minutes, bfMA, 0, Mode, Price, i);

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

Comments