This tool is designed to provide clear, visual markers on your trading charts to help identify significant price turning points. Rather than relying on complex formulas that clutter the screen, it focuses on identifying local "peaks" and "valleys" within a specific window of time to highlight where the market has reached an extreme point.
How the Logic Works
The script operates by constantly scanning the price history of your current chart. It looks at a specific number of candles (a fixed window) to determine the highest and lowest points reached during that period.
By analyzing these high and low points, the logic identifies two specific types of signals:
- Resistance Markers (Upper Signals): When the script detects that a candle has reached the highest price point within its surrounding neighborhood, it places a visual signal above that candle. This indicates a potential "ceiling" where the price has peaked.
- Support Markers (Lower Signals): Conversely, when the script identifies a candle that has hit the lowest price point within its neighborhood, it places a visual signal below that candle. This indicates a potential "floor" where the price has bottomed out.
Key Features for the User
- Visual Clarity: The signals are displayed as distinct arrows on your chart, making it easy to see exactly where the highs and lows occurred at a glance.
- Adjustable Spacing: There is a built-in "Gap" setting that ensures the markers do not sit directly on top of the price candles. This keeps the chart clean and ensures the signals are easily visible regardless of how close the price is to the high or low.
- Contextual Awareness: Because the script looks at a specific "distance" (a window of candles), it filters out minor price fluctuations and focuses on identifying the most prominent peaks and valleys relative to the immediate price action.
Essentially, this tool acts as a visual map, highlighting the extremes of market movement so you can more easily identify areas where the price may be reaching a turning point.
//+------------------------------------------------------------------+
//| 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 3
#property indicator_color2 Brown
#property indicator_width2 3
extern int SignalGap = 5;
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