RPoint_v1
Download scriptThis technical tool is designed to help traders identify specific structural shifts in market momentum by highlighting significant "reversal points" directly on their trading charts. Instead of simply following every minor price fluctuation, the script filters out market noise to pinpoint where a trend has likely exhausted and shifted in the opposite direction.
Core Logic and Behavior
The script functions by continuously monitoring the historical highs and lows of the currency pair. It works based on three primary mechanics:
1. Trend Tracking The tool maintains an internal awareness of the current market direction (Upward or Downward). It tracks whether the price is consistently making new peaks or new troughs. By doing this, it establishes a baseline for what the "current" trend looks like before looking for reasons to change that perspective.
2. The Reversal Buffer (Sensitivity)
A key feature of this script is the ReversPoint parameter. This acts as a safety threshold. Rather than signaling a reversal the moment a price ticks slightly against the trend, the script requires a significant move—a specific "distance" in points—to occur before it confirms a trend change. This helps prevent false signals during periods of low volatility or minor pullbacks.
3. Dynamic Point Identification When the market moves significantly enough to cross that established threshold, the script identifies the exact point where the momentum broke. It then:
- Updates its internal "Trend" status to reflect the new direction.
- Resets its high and low markers to the new price levels.
- Plots a visual indicator on the chart at the specific historical point where the reversal was triggered.
How it Assists the Trader
For a user, this means the chart becomes populated with visual markers that highlight significant structural changes. By looking at these points, a trader can better visualize where previous trends ended and new ones began. It effectively automates the process of identifying "breakout" levels and "rejection" zones, allowing for a cleaner, more organized view of market history and potential future entries.
/*-----------------------------+
| |
| Shared by www.Aptrafx.com |
| |
+------------------------------*/
//+------------------------------------------------------------------+
//| RPoint.mq4 |
//| Copyright © 2004, Poul_Trade_Forum |
//| Aborigen |
//| http://forex.kbpauk.ru/ |
//+------------------------------------------------------------------+
#property copyright "Poul Trade Forum"
#property link "http://forex.kbpauk.ru/"
#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Yellow
//---- input parameters
extern int ReversPoint=50;
//---- buffers
double RBuffer[];
int Trend=1,InTrend,ttime;
double Points,Last_High, Last_Low;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
string short_name;
Points = MarketInfo (Symbol(), MODE_POINT);
//---- indicator line
SetIndexStyle(0,DRAW_SECTION,EMPTY,1,Yellow);
SetIndexBuffer(0,RBuffer);
SetIndexEmptyValue(0,0);
//---- name for DataWindow and indicator subwindow label
short_name="RPoint";
IndicatorShortName(short_name);
SetIndexLabel(0,short_name);
//----
SetIndexDrawBegin(0,100);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//---- TODO: add your code here
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted(),i,shift;
//---- TODO: add your code here
i=(Bars-counted_bars)-1;
for (shift=i; shift>=0;shift--)
{
if (Time[shift]!=ttime) InTrend=InTrend+1;
ttime=Time[shift];
RBuffer[shift]=0;
if (High[shift+1]>Last_High && Trend==1) InTrend=1;
if (Low[shift+1]<Last_Low && Trend==0) InTrend=1;
if (High[shift+1]>Last_High) Last_High=High[shift+1];
if (Low[shift+1]<Last_Low) Last_Low=Low[shift+1];
if (Trend==1 && Low[shift+1]<Last_High-ReversPoint*Points && InTrend>1)
{
Trend=0;
RBuffer[shift+InTrend]=High[shift+InTrend];
Last_High=Low[shift+1];
Last_Low=Low[shift+1];
InTrend=1;
}
if (Trend==0 && High[shift+1]>Last_Low+ReversPoint*Points && InTrend>1)
{
Trend=1;
RBuffer[shift+InTrend]=Low[shift+InTrend];
Last_Low=High[shift+1];
Last_High=High[shift+1];
InTrend=1;
}
//----
}
return(0);
}
//+------------------------------------------------------------------+
Comments