i-OneThird_v1

Download script
Author: � 2007 RickD
i-OneThird_v1

The i-OneThird indicator is designed to provide traders with a visual representation of price action momentum by identifying specific types of price movements on a chart. Rather than simply looking at where the price ends up, this script analyzes the relationship between the total range of a candle and its closing position.

Core Logic Overview

The tool operates by dividing the vertical range of each price bar (the distance between the highest and lowest points) into three equal parts. It then evaluates where the closing price falls within that specific range to determine the "strength" of the movement.

How it Works

The indicator scans the historical data and applies two primary rules to classify each price bar:

  • Bullish Momentum Identification: If a candle closes in the upper third of its total range, the script identifies this as a strong upward move. It marks the boundaries of this movement to highlight that the price finished near its peak.
  • Bearish Momentum Identification: Conversely, if a candle closes in the lower third of its total range, the script identifies this as a strong downward move. It highlights these instances to show that the price finished near its bottom.

Visual Representation

The tool translates these calculations into visual signals on your chart:

  • It uses a histogram style to display different colors (OrangeRed and DodgerBlue) based on the direction of the movement.
  • By highlighting these specific "one-third" zones, the indicator helps traders quickly distinguish between candles that have significant directional conviction and those that are merely consolidating or moving sideways.

Essentially, this script acts as a filter to help you see which price bars have finished with enough momentum to potentially signify a trend, filtering out the "noise" of insignificant price fluctuations.

Miscellaneous
Implements a curve of type %1
14 Views
0 Downloads
0 Favorites
i-OneThird_v1
//+------------------------------------------------------------------+
//|                                                   i-OneThird.mq4 |
//|                                          Copyright © 2007, RickD |
//|                                                   www.e2e-fx.net |
//+------------------------------------------------------------------+
#property copyright "© 2007 RickD"
#property link      "www.e2e-fx.net"
//----
#define major   1
#define minor   0
//----
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 OrangeRed
#property indicator_color2 DodgerBlue
#property indicator_color3 OrangeRed
#property indicator_color4 DodgerBlue
//----
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void init()
  {
   SetIndexBuffer(0, ExtMapBuffer1);
   SetIndexBuffer(1, ExtMapBuffer2);
   SetIndexBuffer(2, ExtMapBuffer3);
   SetIndexBuffer(3, ExtMapBuffer4);
//----        
   SetIndexStyle(0, DRAW_HISTOGRAM, 0, 1);
   SetIndexStyle(1, DRAW_HISTOGRAM, 0, 1);
   SetIndexStyle(2, DRAW_HISTOGRAM, 0, 3);
   SetIndexStyle(3, DRAW_HISTOGRAM, 0, 3);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void deinit()
  {
//----
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void start()
  {
   int counted = IndicatorCounted();
   if(counted < 0) 
     return (-1);
//----  
   if (counted > 0) 
     counted--;
   int limit = Bars-counted;
//----  
   for(int i = 0; i < limit; i++) 
     {
       double third = (High[i] - Low[i]) / 3;
       //----
       if(Close[i] > High[i] - third)
         {
           ExtMapBuffer1[i] = Low[i];
           ExtMapBuffer2[i] = High[i];
           ExtMapBuffer3[i] = MathMin(Open[i], Close[i]);
           ExtMapBuffer4[i] = MathMax(Open[i], Close[i]);
         } 
       //----
       if(Close[i] < Low[i] + third)
         {
           ExtMapBuffer1[i] = High[i];
           ExtMapBuffer2[i] = Low[i];
           ExtMapBuffer3[i] = MathMax(Open[i], Close[i]);
           ExtMapBuffer4[i] = MathMin(Open[i], Close[i]);
         }
     }
  }  
//+------------------------------------------------------------------+

Comments