Overview of the Super-Signals Indicator
The Super-Signals tool is designed to provide visual cues on a trading chart by identifying specific price extremes over a rolling period. Rather than relying on complex mathematical formulas or lagging averages, this script focuses on "peak" and "valley" detection to help traders identify where price action reaches its highest or lowest points within a localized window.
How the Logic Works
The script operates by scanning the historical price data bar by bar. For every point on your chart, it looks at a specific neighborhood of surrounding candles (defined by a fixed distance) to determine if that specific candle represents a significant local "high" or "low."
Key functionalities include:
- Dynamic Peak Detection: The script scans a designated range of previous candles to find the absolute highest price reached. When it identifies the exact candle where this peak occurred, it places a visual marker (a red arrow) just above that high point.
- Dynamic Valley Detection: Simultaneously, the script scans the same range to find the lowest price reached. When it identifies the exact candle where this valley occurred, it places a visual marker (a lime green arrow) just below that low point.
- Visual Clarity: To ensure the markers do not overlap directly with the candles—which could clutter the view or hide price action—the script includes a "Signal Gap." This creates a small amount of breathing room between the arrow and the actual candle wick, making it easier to see the signal clearly.
Practical Purpose for Traders
The primary goal of this logic is to strip away the "noise" of the market. By highlighting these local extremes, the indicator allows you to:
- Identify Support and Resistance: See where price has historically struggled to move higher or lower within a specific window.
- Spot Trend Reversals: Observe when price action reaches an exhausted peak or valley before potentially moving in the opposite direction.
- Simplify Chart Reading: Instead of manually looking for every high and low, the script automates this identification, providing immediate visual confirmation of where significant price pivots are occurring.
//+------------------------------------------------------------------+
//| 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_width1 2
#property indicator_color2 Lime
#property indicator_width2 2
extern int SignalGap = 4;
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