Author: Patrick Nouvion
TheTick

This tool is designed to provide traders with a visual representation of market activity by calculating the relative "strength" or "intensity" of price movements over specific periods. Instead of looking at simple price changes, it evaluates the magnitude of movement in conjunction with the actual volume traded, providing a clearer picture of how much momentum is backing a particular move.

Core Logic and Functionality

The script operates based on three primary components to derive its final calculation:

1. Price Movement Analysis The tool first identifies the difference between the opening price and the closing price of a given timeframe. By calculating this gap, it determines the raw direction and distance of the price movement (e.g., how far the price traveled from start to finish).

2. Volume Weighting To ensure the data is meaningful, the script multiplies that price movement by the trading volume. This distinguishes between a significant price move on low activity (which may be less reliable) and a significant price move backed by high trading activity (which suggests stronger market conviction).

3. Currency Scaling Because different currency pairs are quoted in different formats—such as the Yen (JPY) pairs versus standard Forex pairs—the script includes an automated adjustment layer. It detects the specific currency pair being viewed:

  • For JPY pairs, it applies a scaling factor to normalize the data.
  • For all other pairs, it applies a different multiplier to ensure the visual output remains consistent and readable across various markets.

Visual Output

The final result is plotted as a blue line in a separate window on your trading platform. This allows you to monitor the "weight" of market actions side-by-side with your standard price charts, helping to identify periods of high-intensity activity compared to quieter market phases.

Miscellaneous
Implements a curve of type %1
12 Views
0 Downloads
0 Favorites
TheTick
//+------------------------------------------------------------------+
//|                                                      TheTick.mq4 |
//|                                                  Patrick Nouvion |
//|                                       http://www.interbankfx.com |
//+------------------------------------------------------------------+
#property copyright "Patrick Nouvion"
#property link      "http://www.interbankfx.com"

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Blue

double TheTick[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
   //---- indicators
      SetIndexStyle(0,DRAW_LINE);
      SetIndexBuffer(0,TheTick);
      SetIndexDrawBegin(0,5);
      
      SetLevelStyle(1,1,Black);
      SetLevelValue(0, 0.0);
   //----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   //---- Loop Prep
      int Limit; int Count; int PrevDay;
      int counted_bars=IndicatorCounted();
      if(counted_bars<0) return(-1);                           // Check for error
      if(counted_bars>0) counted_bars--;                       // Last counted bar will be recounted
      Limit = Bars-counted_bars;  
      
      double Multiplier = 0;
      
      if( StringFind( Symbol(), "JPY", 0) != -1 )
      {
         Multiplier = 0.1;
      }
      else
      {
         Multiplier = 100.0;
      }
      for( int i = 0; i < Limit; i++ ) 
      {      
            TheTick[i] = ( ( Close[i] - Open[i] ) * Volume[i] ) * Multiplier ;
      }
   
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments