Sem WPR
Download scriptThis tool is a visual trading assistant designed to analyze market momentum and identify potential turning points by tracking specific price behaviors. Rather than looking at raw price action, it focuses on a mathematical "momentum" value to determine whether the market is becoming overextended or showing signs of exhaustion.
Core Functionality
The script monitors the relationship between current market momentum and its preceding values. It categorizes these movements into four distinct types of signals, which are displayed as visual markers:
- Strong Selling Pressure: The tool identifies instances where momentum has dropped from a relatively high level. This suggests a significant shift toward downward movement.
- Strong Buying Pressure: Conversely, it detects when momentum begins to rise from a very low point, indicating a potential shift toward upward movement.
- Weak Bearish Momentum: When the market is not exhibiting "strong" pressure, the tool tracks general downward trends that lack significant force.
- Weak Bullish Momentum: Similarly, it identifies general upward movements that do not meet the criteria for high-strength buying pressure.
How It Works
The logic operates by comparing a current momentum snapshot against the previous one. By evaluating these changes, the script filters out "noise" to highlight specific conditions:
- Primary Signal Detection: The script first checks if the market has reached extreme levels (overbought or oversold territories). If it detects a sharp reversal from these extremes, it flags it as a strong directional shift.
- Secondary Trend Tracking: If no strong reversal is detected, the tool falls back to monitoring the general direction of the trend. It records whether the market is moving up or down with less intensity, providing a more complete picture of the current market environment.
User Experience
For the trader, this provides a multi-layered visual summary of the market's "mood." Instead of just seeing that a price is moving, you can see the strength behind that movement—distinguishing between a powerful trend reversal and a slow, steady drift in either direction.
//+------------------------------------------------------------------+
//| Áîëüøàÿ Êîëëåêöèÿ Ñåìàôîðîâ.mq4 |
//+------------------------------------------------------------------+
#property copyright "Ñåðãååâ Àëåêñåé (ñ) 2007"
#property indicator_separate_window
#property indicator_minimum 0
#property indicator_maximum 1
#property indicator_buffers 4
#property indicator_width1 2
#property indicator_width2 2
#property indicator_width3 1
#property indicator_width4 1
#property indicator_color1 Crimson
#property indicator_color2 LimeGreen
#property indicator_color3 Crimson
#property indicator_color4 LimeGreen
#property indicator_style1 STYLE_SOLID
#property indicator_style2 STYLE_SOLID
#property indicator_style3 STYLE_SOLID
#property indicator_style4 STYLE_SOLID
//---- input parameters
extern int Minutes=0;
extern int MA=14;
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_HISTOGRAM); SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_HISTOGRAM); SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_HISTOGRAM); SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_HISTOGRAM); SetIndexBuffer(3,ExtMapBuffer4);
string Name = "WPR("+MA+")";
IndicatorShortName(Name);
return(0);
}
int deinit() { return(0); }
int start()
{
double wprPre, wprCur;
//----
for (int i = 0; i <= Bars; i++)
{
ExtMapBuffer1[i]=0;
ExtMapBuffer2[i]=0;
ExtMapBuffer3[i]=0;
ExtMapBuffer4[i]=0;
wprCur=iWPR(NULL, Minutes, MA, i); wprPre=iWPR(NULL, Minutes, MA, i+1);
if (wprPre> -20 && wprCur<wprPre){ ExtMapBuffer1[i] = 1; }//ïðîäàåì
if (wprPre< -80 && wprCur>wprPre){ ExtMapBuffer2[i] = 1; }//ïîêóïàåì
if (ExtMapBuffer1[i]==0 && ExtMapBuffer2[i] == 0)
{
if (wprPre>=wprCur) ExtMapBuffer3[i]=1; // ïðîäàåì ñëàáî
if (wprPre<=wprCur) ExtMapBuffer4[i]=1; // ïîêóïàåì ñëàáî
}
}
return(0);
}
//+------------------------------------------------------------------+
Comments