Author: Copyright � 2006, Eli hayun
PLdot

This tool is a visual trading indicator designed to help traders identify specific price levels on a chart. Instead of looking at standard price movements alone, it calculates a unique value based on the relationship between three consecutive candles (time periods).

How it Works

The core logic follows a three-step mathematical process to determine where to place its markers:

1. Calculating Individual Price Points For every single candle on your chart, the script first identifies its "average" value. It does this by taking the highest point (High), the lowest point (Low), and the actual closing price (Close) of that specific candle and finding their average.

2. Creating a Three-Candle Window The indicator doesn't look at just one candle in isolation. Instead, it looks at a group of three consecutive candles. It takes the "average" values calculated in the previous step for:

  • The current candle
  • The previous candle
  • The candle before that

3. Finding the Final Result Finally, it takes those three specific averages and averages them together one last time. This results in a single data point that represents the "central balance" of that three-candle cluster.

Visual Representation

On your trading platform, this logic manifests as a visual marker (an arrow). Rather than showing a continuous line, the script places these markers at the calculated coordinates to highlight key areas of price activity. It serves as a way to smooth out market "noise" and see where the average momentum of the last three periods is actually sitting.

Miscellaneous
Implements a curve of type %1
19 Views
0 Downloads
0 Favorites
PLdot
//+------------------------------------------------------------------+
//|                                                        PLdot.mq4 |
//|                                      Copyright © 2006, Eli hayun |
//|                                          http://www.elihayun.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Eli hayun"
#property link      "http://www.elihayun.com"

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red
//---- buffers
double ExtMapBuffer1[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0,167);
   SetIndexBuffer(0,ExtMapBuffer1);
   SetIndexEmptyValue(0,0.0);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
   
      if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
   if(counted_bars>0) counted_bars--;

   int limit=Bars-counted_bars;
   
   for(int i = 1; i <= limit; i++) {
      ExtMapBuffer1[i-1] = (
         ((High[i+1] + Low[i+1]+Close[i+1]) / 3) + 
         ((High[i+2] + Low[i+2]+Close[i+2]) / 3) +
         ((High[i] + Low[i]+Close[i]) / 3) 
      ) / 3;

   }
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments