IND Inverse

Download script
Author: Copyright � 2006, ...
IND Inverse

This tool is designed to provide a visual representation of market price behavior by calculating the relative position of the current closing price compared to a specific historical range. Instead of simply showing you the price, it interprets the "strength" or "momentum" of the market movement over a defined period.

How the Logic Works

The script operates by scanning a fixed window of recent price data (determined by your period settings) to identify two critical boundaries:

  1. The Peak: The highest price reached during that timeframe.
  2. The Valley: The lowest price reached during that timeframe.

By identifying these two points, the tool calculates the total "amplitude," or the total vertical space covered by the market movement.

The Calculation Process

Once the script knows the high and low boundaries, it measures where the current closing price sits in relation to those extremes. It specifically looks at how far the price has deviated from the top of that range.

It then translates this information into a numerical value on a separate window:

  • If the price is trading near the top of its recent range, the indicator reflects a specific level of strength.
  • If the price is trading near the bottom, the value shifts accordingly.
  • The final result is scaled based on your input period to ensure the visual data is easy to track on your chart.

Visual Purpose

The primary goal of this logic is to provide a smoothed, mathematical view of price action. By focusing on the relationship between the closing price and the historical highs/lows of a specific window, it helps traders visualize how "stretched" the market is at any given moment. Rather than looking at raw candles, you are seeing a calculated representation of where the price currently stands within its recent boundaries.

Miscellaneous
Implements a curve of type %1
18 Views
0 Downloads
0 Favorites
IND Inverse
//+------------------------------------------------------------------+
//|                                               IND Inverse.mq4 |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, ..."
#property link      "http://www.forex-tsd.com/"

#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Silver
//---- input parameters
//---- buffers
double Buffer[];

extern int iPeriod = 1;

//----
//+------------------------------------------------------------------+
//| Init                                                             |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
    IndicatorBuffers(1);
    IndicatorDigits(Digits+2);
    SetIndexStyle(0,DRAW_LINE);
    SetIndexBuffer(0,Buffer);
//----
    return(0);
}

//+------------------------------------------------------------------+
//| Parabolic Sell And Reverse system                                |
//+------------------------------------------------------------------+
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;

//---- do it
   
  
    for(int i=0; i<limit; i++)
    {
        // Easy to read
        double HD = High[Highest(NULL,0,MODE_HIGH,(iPeriod* 20),i)];
        double LD = Low[Lowest(NULL,0,MODE_LOW,(iPeriod* 20),i)];
        double amplitude = HD - LD;                
        Buffer[i]= (((Close[i]-HD-(amplitude/2)))/amplitude) * iPeriod;
    }
   
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments