Author: Avery T. Horton, Jr. aka TheRumpledOne � 2008
$HIGH

This tool is designed to provide a clear, visual representation of price action by comparing the current closing price of an asset against the high point reached in the previous period. Its primary purpose is to identify the direction of immediate momentum based on these two specific historical data points.

How the Logic Works

The indicator operates by analyzing each candle or bar on your chart and performing a simple three-way comparison:

  • Bullish Movement: If the closing price of the current period is higher than the high reached in the previous period, the tool assigns a positive value. This indicates that the market has pushed past its previous peak, suggesting upward momentum.
  • Bearish Movement: If the closing price of the current period is lower than the high reached in the previous period, the tool assigns a negative value. This suggests that the price failed to maintain the previous high and is trending downward.
  • Neutral State: In the rare event that the closing price is exactly equal to the previous period's high, the tool assigns a neutral value of zero, indicating no clear directional change based on this specific criteria.

Visual Representation

Instead of cluttering your main chart with complex lines, this indicator creates a separate window below your main pricing graph. It translates these calculations into a visible line that moves between positive and negative territory. This allows traders to quickly see the "flow" of the market—identifying whether price is consistently breaking above previous highs or retreating from them, making it easier to spot trends at a glance.

Miscellaneous
Implements a curve of type %1
16 Views
0 Downloads
0 Favorites
$HIGH

//+------------------------------------------------------------------+ 
//|    $High                                                          | 
//|                                                                  | 
//|                                                                  | 
//|   Copyright © 2008, Avery T. Horton, Jr. aka TheRumpledOne       |
//|                                                                  |
//|   PO BOX 43575, TUCSON, AZ 85733                                 |
//|                                                                  |
//|   GIFT AND DONATIONS ACCEPTED                                    | 
//|                                                                  |
//|   therumpldone@gmail.com                                         |  
//+------------------------------------------------------------------+ 
//|                                                                  |
//| go to www.kreslik.com for the latest indicator updates           |  
//+------------------------------------------------------------------+ 
//|                                                                  |
//| Use www.efxgroup.com as your forex broker...                     |  
//| ...tell them therumpledone sent you!                             |  
//+------------------------------------------------------------------+ 

#property copyright "Avery T. Horton, Jr. aka TheRumpledOne © 2008" 

#property link      "www.kreslik.com" 

#property indicator_separate_window

#property indicator_buffers 1

//---- input parameters 


//---- buffers

double _Value[];

//+------------------------------------------------------------------+ 
//| Custom indicator initialization function                         | 
//+------------------------------------------------------------------+ 
int init() 
  { 
   IndicatorBuffers(1);
   SetIndexBuffer(0,_Value);  
   SetIndexStyle(0,DRAW_LINE);  
   return(0); 
  } 
//+------------------------------------------------------------------+ 
//| Custom indicator deinitialization function                       | 
//+------------------------------------------------------------------+ 
int deinit() 
  { 
//---- 
    
//---- 
   return(0); 
  } 
//+------------------------------------------------------------------+ 
//| Custom indicator iteration function                              | 
//+------------------------------------------------------------------+ 


int start() 
  { 

   int i, dayi, 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--;  
   int limit = Bars - counted_bars;
//----   
   for(i = limit - 1; i >= 0; i--)
     {
 
double _Result =  High[i+1]  ;


    if ( Close[i] > _Result   ) _Value[i] = 1; 
    else {
    if ( Close[i] < _Result  )  _Value[i] = -1; 
    else  _Value[i] = 0;  }
    
}
  
//---- 
   return( 0 ); 
  } 
//+------------------------------------------------------------------+ 


Comments