signals
Download scriptThis tool is designed to identify significant structural turning points in market price action by highlighting historical highs and lows. Instead of following standard moving averages or momentum oscillators, this script focuses on the "peaks" and "valleys" of price movement over a specific window of time.
How the Logic Works
The script scans the price history bar by bar to determine the most extreme price points within a defined range (set by a lookback distance). It operates on three primary principles:
1. Range Identification The tool looks at a fixed number of recent price bars to establish a local "neighborhood." By looking at this specific window, it can ignore minor fluctuations and focus on the most prominent price movements occurring in that period.
2. Peak and Valley Detection As the script moves across the chart:
- For Highs: It identifies the single highest point reached within that neighborhood. If the current bar is identified as that highest peak, it places a visual signal above the price.
- For Lows: It identifies the single lowest point reached within that neighborhood. If the current bar is identified as that lowest valley, it places a visual signal below the price.
3. Visual Signaling To make these data points easy to see, the script automatically offsets the signals slightly away from the actual candles. This ensures that the markers do not overlap with the price bars, providing a clean visual representation of where the "highs" and "lows" occurred.
Summary for the Trader
Essentially, this tool acts as a visual map of market extremes. By highlighting these structural points, it allows you to see where the market has recently pivoted. It identifies the "ceiling" (resistance) and "floor" (support) of price action dynamically as new bars are formed, helping you visualize the significant boundaries of the current trend.
//+------------------------------------------------------------------+
//| super-signals.mq4 |
//| Copyright © 2006, Nick Bilak, beluck[AT]gmail.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Nick Bilak"
#property link "http://www.forex-tsd.com/"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Aqua
extern int SignalGap=10;
int dist=24;
double b1[];
double b2[];
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int init() {
SetIndexStyle(0,DRAW_ARROW,STYLE_SOLID,1);
SetIndexStyle(1,DRAW_ARROW,STYLE_SOLID,1);
SetIndexArrow(1,233);
SetIndexArrow(0,234);
SetIndexBuffer(0,b1);
SetIndexBuffer(1,b2);
return(0);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start() {
int counted_bars=IndicatorCounted();
int k,i,j,limit,hhb,llb;
if (counted_bars<0) return(-1);
if (counted_bars>0) counted_bars--;
limit=Bars-1;
if(counted_bars>=1) limit=Bars-counted_bars-1;
if (limit<0) limit=0;
for(i=limit;i>=0;i--) {
hhb=Highest(NULL,0,MODE_HIGH,dist,i-dist/2);
llb=Lowest(NULL,0,MODE_LOW,dist,i-dist/2);
if (i==hhb)
b1[i]=High[hhb]+SignalGap*Point;
if (i==llb)
b2[i]=Low[llb]-SignalGap*Point;
}
return(0);
}
//+------------------------------------------------------------------+
Comments