Rads SMAC-D

Download script
Author: Copyright � 2007, Steve Bowley
Rads SMAC-D

This script functions as a custom technical analysis tool designed to help traders visualize momentum and trend direction independently of the main price chart. It creates a secondary window on your trading platform where it plots specific mathematical averages to identify market shifts.

Core Logic & Mechanics

The tool operates by calculating two primary layers of data:

1. The Primary Momentum Line (SMAC-D) Instead of looking at simple price movement, the script calculates the difference between two different types of "Moving Averages" (Fast and Slow).

  • The Fast Average tracks recent price activity closely.
  • The Slow Average tracks the broader, longer-term trend. By subtracting the slow average from the fast average, the tool produces a single line that represents the "velocity" of the market. When this line moves upward, it suggests bullish momentum; when it moves downward, it suggests bearish momentum.

2. The Signal Line To prevent traders from reacting to minor "noise" or tiny fluctuations in the momentum line, the script performs a second calculation. It takes the momentum line created in the first step and applies another moving average to it. This results in a smoother "Signal Line."

How to Interpret the Visuals

When you view this indicator on your platform, you are seeing the relationship between these two lines:

  • Momentum vs. Signal: The primary purpose of this tool is to observe the interaction between the momentum line and the signal line.
  • Trend Confirmation: By watching how these two lines cross each other or diverge, traders can get a clearer picture of whether a trend is gaining strength, losing steam, or potentially reversing.
  • Smoothing: Because the script uses specific moving average types (EMA), it aims to provide a responsive yet smooth visual experience, helping users filter out market distractions while still capturing timely price changes.

In summary, this tool acts as a "speedometer" for the market, showing you not just where the price is going, but how much force is behind the current movement.

Indicators Used
Moving average indicatorMoving average indicator
Miscellaneous
Implements a curve of type %1
12 Views
0 Downloads
0 Favorites
Rads SMAC-D
//+------------------------------------------------------------------+
//|                                              9Squared SMAC-D.mq4 |
//|                                   Copyright © 2007, Steve Bowley |
//|                                        http://www.9squaredfx.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2007, Steve Bowley"
#property link      "http://www.9squaredfx.com"

#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 RoyalBlue
#property indicator_color2 Snow
#property indicator_color3 Snow
//---- input parameters
extern int       FastEMA=18;
extern int       SlowEMA=27;
extern int       SignalSMA=9;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
//---- indicator buffers
double ExtSilverBuffer[];
double ExtRedBuffer[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- additional buffers are used for counting
   IndicatorBuffers(5);
//---- drawing settings
   SetIndexStyle(0,DRAW_LINE,0,2);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE,0,1);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexStyle(2,DRAW_LINE,0,2);
   SetIndexBuffer(2,ExtMapBuffer3);
//----
   SetIndexDrawBegin(1,SignalSMA);
   IndicatorDigits(5);
//---- indicator buffers mapping
   SetIndexBuffer(0, ExtSilverBuffer);
   SetIndexBuffer(1, ExtRedBuffer);

//---- name for DataWindow and indicator subwindow label
   IndicatorShortName("SMAC-D");
//---- initialization done
   return(0);
  }
//+------------------------------------------------------------------+
//| 9Squared SMAC-D                                                  |
//+------------------------------------------------------------------+
int start()
  {
   int limit;
   int counted_bars=IndicatorCounted();
//---- check for possible errors
   if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
//---- macd counted in the 1-st buffer
   for(int i=0; i<limit; i++)
      ExtSilverBuffer[i]=iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_WEIGHTED,i)-iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_WEIGHTED,i);
//---- signal line counted in the 2-nd buffer
   for(i=0; i<limit; i++)
      ExtRedBuffer[i]=iMAOnArray(ExtSilverBuffer,Bars,SignalSMA,0,MODE_EMA,i);
//---- done
   return(0);
  }
//+------------------------------------------------------------------+

Comments