AwesomeFxTradera

Download script
AwesomeFxTradera

This script functions as a specialized visual tool designed to help traders identify momentum and trend direction in the financial markets. Rather than just showing raw price data, it translates complex movements into a clear, color-coded histogram that highlights whether the market's "energy" is shifting upward or downward.

Core Logic and Behavior

The underlying logic operates in three distinct stages:

1. Momentum Calculation The tool begins by analyzing two different "moving averages"—which are essentially smoothed versions of the market price. By calculating the difference between a fast-moving average (representing recent price action) and a slower-moving average (representing the broader trend), the script determines the current momentum. If the fast average is significantly higher than the slow average, it indicates bullish pressure; if it is lower, it suggests bearish pressure.

2. Trend Tracking The script doesn't just look at the value of the momentum at a single moment; it compares the current momentum to the value from the previous period. This allows the tool to recognize whether the momentum is accelerating, decelerating, or reversing. It tracks these transitions in real-time to decide which direction the "force" of the market is heading.

3. Visual Representation (The Histogram) To make this data easy for a human to read at a glance, the script converts these calculations into a visual histogram:

  • Green Bars: These appear when the momentum is trending upward. They represent positive growth and are used to visualize "bullish" strength.
  • Red Bars: These appear when the momentum is trending downward. They represent a loss in strength and are used to visualize "bearish" pressure.

Summary for the User

Instead of forcing you to interpret raw numbers, this script simplifies the market's behavior into a visual "tug-of-war." It identifies the speed and direction of price movement, highlighting with colors where the momentum is gaining strength and where it is beginning to fade, allowing for quicker identification of potential trend shifts.

15 Views
0 Downloads
0 Favorites
AwesomeFxTradera
//+------------------------------------------------------------------+
//|                                                      Awesome.mq4 |
//|                      Copyright © 2005, MetaQuotes Software Corp. |
//|                                       http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property  copyright "Copyright © 2005, MetaQuotes Software Corp."
#property  link      "http://www.metaquotes.net/"
//---- indicator settings
#property  indicator_separate_window
#property  indicator_buffers 3
#property  indicator_color1  Black
#property  indicator_color2  Green
#property  indicator_color3  Red
extern int Per_1=8;
extern int Per_2=13;
//---- indicator buffers
double     ExtBuffer0[];
double     ExtBuffer1[];
double     ExtBuffer2[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   //---- drawing settings
   SetIndexStyle(0,DRAW_NONE);
   SetIndexStyle(1,DRAW_HISTOGRAM);
   SetIndexStyle(2,DRAW_HISTOGRAM);
   IndicatorDigits(Digits+1);
   SetIndexDrawBegin(0,34);
   SetIndexDrawBegin(1,34);
   SetIndexDrawBegin(2,34);
//---- 3 indicator buffers mapping
   SetIndexBuffer(0,ExtBuffer0);
   SetIndexBuffer(1,ExtBuffer1);
   SetIndexBuffer(2,ExtBuffer2);
//---- name for DataWindow and indicator subwindow label
   IndicatorShortName("AO");
   SetIndexLabel(1,NULL);
   SetIndexLabel(2,NULL);
//---- initialization done
   return(0);
  }
//+------------------------------------------------------------------+
//| Awesome Oscillator                                               |
//+------------------------------------------------------------------+
int start()
  {
   int    limit;
   int    counted_bars=IndicatorCounted();
   double prev,current;
//---- last counted bar will be recounted
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
//---- macd
   for(int i=0; i<50; i++)
      ExtBuffer0[i]=iMA(NULL,0,Per_1,0,MODE_EMA,PRICE_OPEN,i)-iMA(NULL,0,Per_2,0,MODE_EMA,PRICE_OPEN,i);
//---- dispatch values between 2 buffers
   bool up=true;
   for(i=limit-1; i>=0; i--)
     {
      current=ExtBuffer0[i];
      prev=ExtBuffer0[i+1];
      if(current>prev) up=true;
      if(current<prev) up=false;
      if(!up)
        {
         ExtBuffer2[i]=current;
         ExtBuffer1[i]=0.0;
        }
      else
        {
         ExtBuffer1[i]=current;
         ExtBuffer2[i]=0.0;
        }
     }
//---- done
   return(0);
  }
//+------------------------------------------------------------------+

Comments