Author: ������� ������� (�) 2007
Sem AO-AC

This specialized trading indicator is designed to assist traders in identifying market momentum and potential trend reversals by analyzing two specific technical oscillators: the Awesome Oscillator (AO) and the Awesome Chart (AC).

Core Functionality

The script works by scanning historical price data based on a user-defined timeframe (measured in minutes). Its primary objective is to compare the signals of these two indicators simultaneously to determine the overall "sentiment" of the market.

Instead of simply showing a fluctuating line, the tool translates complex numerical data into four distinct visual categories represented as histograms. These represent different combinations of market behaviors:

  • Strong Selling Pressure: Occurs when both indicators are in negative territory.
  • Strong Buying Pressure: Occurs when both indicators are in positive territory.
  • Mixed Signals (Bearish Lean): Occurs when the Awesome Oscillator is negative while the Awesome Chart remains positive.
  • Mixed Signals (Bullish Lean): Occurs when the Awesome Oscillator is positive while the Awesome Chart remains negative.

How it Works for the User

The logic follows a simple "if/then" verification process:

  1. Data Collection: The script looks at every bar on your chart and calculates the current values for both the AO and the AC.
  2. Comparison Logic: It checks whether each value is above or below the zero line.
  3. Visual Output: Based on that comparison, it assigns a "1" to a specific buffer. This creates a visual histogram in a separate window, allowing you to see at a glance where the momentum is strongest.

By using this dual-indicator approach, the script helps filter out market "noise." Rather than relying on just one indicator—which can often give false signals—this tool looks for the agreement (or disagreement) between two different metrics to provide a clearer picture of whether the current price movement has supporting momentum or is beginning to lose steam.

Indicators Used
Bill Williams Awesome oscillatorBill Williams Accelerator/Decelerator oscillator
Miscellaneous
Implements a curve of type %1
19 Views
0 Downloads
0 Favorites
Sem AO-AC
//+------------------------------------------------------------------+
//|                                  Áîëüøàÿ Êîëëåêöèÿ Ñåìàôîðîâ.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;

//---- 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 = "AO/AC";
   IndicatorShortName(Name);  

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

int start()
{
	double ac, ao;
//----

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

		ao=iAO(NULL,Minutes, i);
		ac=iAC(NULL,Minutes, i);

		if (ao<0 && ac<0) ExtMapBuffer1[i] = 1; //ïðîäàåì
		if (ao>0 && ac>0) ExtMapBuffer2[i] = 1; //ïîêóïàåì
		if (ao<0 && ac>0) ExtMapBuffer3[i] = 1; //ïðîäàåì
		if (ao>0 && ac<0) ExtMapBuffer4[i] = 1; //ïîêóïàåì
      
	}
	return(0);
}
//+------------------------------------------------------------------+

Comments