StoneAxe_x4x

Download script
Author: Rosh
StoneAxe_x4x

This tool is a specialized visual indicator designed to help traders analyze price momentum and volatility by calculating the relative position of the current market price within specific historical windows. Instead of just showing the price itself, it transforms raw market data into three distinct "momentum lines" that oscillate around a center point (zero).

How the Logic Works

The script operates by examining three different timeframes simultaneously—short-term, medium-term, and long-term. It uses a mathematical formula to determine where the current closing price sits between the highest peak and the lowest valley of each respective period:

  • Short-Term Momentum (Fast): This line reacts quickly to immediate price movements. It looks at a small number of recent bars to show "the now." Because it covers a narrow window, it is highly sensitive to sudden spikes or drops.
  • Medium-Term Momentum: This line smooths out the noise of the short-term data. It tracks trends over a larger timeframe, helping you see if the market is maintaining a steady direction or if a trend is beginning to lose steam.
  • Long-Term Momentum (Slow): This provides the "big picture" view. It analyzes a very large historical window to establish the overall market structure. This helps in identifying major cycles and preventing traders from reacting too impulsively to minor price fluctuations.

Visual Interpretation

The indicator displays these three values on a separate window below your main chart. They are scaled so that they fluctuate primarily between -1.0 and 1.0:

  • Above the Centerline: When the lines move into positive territory, it indicates that the current price is trading closer to the recent highs than the lows, suggesting upward strength.
  • Below the Centerline: When the lines dip into negative territory, it indicates the price is hugging the recent lows, suggesting downward pressure.
  • The Interaction: By watching all three lines together, a trader can identify "confluence." For example, if the short-term line crosses above the others while the long-term line is still stable, it may signal the start of a new price movement. Conversely, if the fast line moves up but the slow line remains deeply negative, it suggests a temporary "rebound" rather than a true change in trend.

In summary, this script acts as a multi-speed speedometer for the market, allowing you to see not just where the price is going, but how much energy and consistency is behind that movement across different time horizons.

Miscellaneous
Implements a curve of type %1
12 Views
0 Downloads
0 Favorites
StoneAxe_x4x
//+------------------------------------------------------------------+
//|                                                 StoneAxe_x4x.mq4 |
//|                                        from MetaStock by   Rosh  |
//|                           http://forexsystems.ru/phpBB/index.php |
//+------------------------------------------------------------------+
#property copyright "Rosh"
#property link      "http://www.investo.ru/forum/viewtopic.php?t=125389&postdays=0&postorder=asc&start=75"

#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 Red 
#property indicator_color2 Lime
#property indicator_color3 Blue
#property indicator_level1 0.0
#property indicator_level2 0.75
#property indicator_level3 -0.75
//---- input parameters
extern int       N1=8;
extern int       N2=24;
extern int       N3=89;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1,ExtMapBuffer2);
   SetIndexStyle(2,DRAW_LINE);
   SetIndexBuffer(2,ExtMapBuffer3);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//---- 
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int limit,shift;
   int    counted_bars=IndicatorCounted();
   if (counted_bars<0) return(-1);
   if (counted_bars>=0) limit=Bars-counted_bars;
   if (counted_bars==0) limit=Bars-N3;
   limit--;
//---- 
   for (shift=limit;shift>=0;shift--)
      {
      ExtMapBuffer1[shift]=2*(Close[shift]-Low[Lowest(NULL,0,MODE_LOW,N1,shift)])/(High[Highest(NULL,0,MODE_HIGH,N1,shift)]-Low[Lowest(NULL,0,MODE_LOW,N1,shift)])-1.0;
      ExtMapBuffer2[shift]=2*(Close[shift]-Low[Lowest(NULL,0,MODE_LOW,N2,shift)])/(High[Highest(NULL,0,MODE_HIGH,N2,shift)]-Low[Lowest(NULL,0,MODE_LOW,N2,shift)])-1.0;
      ExtMapBuffer3[shift]=2*(Close[shift]-Low[Lowest(NULL,0,MODE_LOW,N3,shift)])/(High[Highest(NULL,0,MODE_HIGH,N3,shift)]-Low[Lowest(NULL,0,MODE_LOW,N3,shift)])-1.0;
      }
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments