Force_Index

Author: Copyright � 2005, MetaQuotes Software Corp.
Force_Index

This tool is designed to provide traders with a visual representation of market momentum by analyzing the relationship between trading volume and price movement. Instead of looking at price in isolation, this indicator seeks to identify the "force" behind the market—essentially measuring how aggressively buyers and sellers are participating in the current trend.

How the Logic Works

The indicator operates based on three primary components:

1. Volume Assessment The script first looks at the trading volume for each specific time period. Volume acts as a proxy for interest; high volume suggests significant activity, while low volume may indicate a lack of conviction in the current price movement.

2. Price Momentum Calculation The tool then examines the change in price over a specific set timeframe (determined by the user). It calculates the difference between the average price of the most recent period and the average price of the preceding period. By looking at this "delta," the script can determine whether the price is accelerating upwards, downward, or remaining stagnant.

3. The Combined Force The final result is produced by multiplying the volume by the price change. This calculation allows the indicator to distinguish between different types of market movements:

  • When price moves significantly on high volume, the "force" is strong, suggesting a robust trend.
  • When price moves slightly on low volume, the "force" is weak, potentially indicating a lack of follow-through.
  • If the price moves in one direction but the force is minimal, it may suggest a cooling off or a temporary pause in the trend.

Visual Representation

The result is plotted as a continuous line in a separate window below your main price chart. This allows you to monitor the market's "energy" independently of the price action. By observing the peaks and valleys of this line, you can better anticipate whether a current trend has enough momentum to continue or if the buying/selling pressure is beginning to exhaust itself.

Indicators Used
Moving average indicator
Miscellaneous
Implements a curve of type %1
17 Views
0 Downloads
0 Favorites
Force_Index
//+------------------------------------------------------------------+
//|                                                  Force Index.mq4 |
//|                      Copyright © 2005, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2005, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 DodgerBlue
//---- input parameters
extern int ExtForcePeriod=13;
extern int ExtForceMAMethod=0;
extern int ExtForceAppliedPrice=0;
//---- buffers
double ExtForceBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   string sShortName;
   SetIndexBuffer(0,ExtForceBuffer);
//---- indicator line
   SetIndexStyle(0,DRAW_LINE);
//---- name for DataWindow and indicator subwindow label
   sShortName="Force("+ExtForcePeriod+")";
   IndicatorShortName(sShortName);
   SetIndexLabel(0,sShortName);
//---- first values aren't drawn
   SetIndexDrawBegin(0,ExtForcePeriod);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Force Index indicator                                            |
//+------------------------------------------------------------------+
int start()
  {
   int nLimit;
   int nCountedBars=IndicatorCounted();
//---- insufficient data
   if(Bars<=ExtForcePeriod) return(0);
//---- last counted bar will be recounted
   if(nCountedBars>ExtForcePeriod) nCountedBars--;
   nLimit=Bars-nCountedBars;
//---- Force Index counted
   for(int i=0; i<nLimit; i++)
      ExtForceBuffer[i]=Volume[i]*
                        (iMA(NULL,0,ExtForcePeriod,0,ExtForceMAMethod,ExtForceAppliedPrice,i)-
                         iMA(NULL,0,ExtForcePeriod,0,ExtForceMAMethod,ExtForceAppliedPrice,i+1));
//---- done
   return(0);
  }
//+------------------------------------------------------------------+

Comments