R2_ArrowsV1

Author: transport_david , David W Honeywell
R2_ArrowsV1

This tool is designed to assist traders by automatically identifying potential entry and exit points on a chart using a combination of trend analysis and momentum oscillators. It translates complex market data into visual cues—specifically arrows and markers—to help navigate the direction of the market.

How the Logic Works

The script evaluates three primary conditions to determine when to signal a trade:

1. Long-Term Trend Filtering The tool first looks at the "big picture" by calculating a Moving Average over a long period (defaulting to 200 days). This acts as a filter to ensure that trades are aligned with the overall market direction. It helps distinguish between a temporary price fluctuation and a sustained move.

2. Momentum Tracking (RSI) The script monitors the Relative Strength Index (RSI), which measures the speed and change of price movements. It specifically looks for specific "overextended" conditions:

  • For Selling: It looks for moments where momentum is climbing rapidly toward high levels.
  • For Buying: It looks for moments where momentum is dropping rapidly toward low levels.

3. Sequential Confirmation Rather than reacting to a single price jump, the logic requires a specific sequence of movement over three consecutive days. For a signal to appear, the momentum must be moving in a consistent direction (e.g., increasing significantly each day) while simultaneously interacting with the long-term trend line.

Visual Signals on Your Chart

The script provides three distinct visual indicators based on its logic:

  • Sell Signals (High Arrows): These appear when the price is below the long-term trend, and momentum is showing a strong upward "overheated" sequence. This suggests a potential reversal or a point where the price may be overextended to the upside.
  • Buy Signals (Low Arrows): These appear when the price is above the long-term trend, and momentum is showing a strong downward "oversold" sequence. This suggests a potential buying opportunity as the price may be reaching a bottom.
  • Trade Closure Markers: Beyond just telling you where to enter, the script identifies potential exit points. When the momentum reaches specific extreme levels (the "Close" levels) while on the opposite side of the trend, it places a marker to notify you that the current move might be exhausted and it may be time to consider closing a position.
Indicators Used
Moving average indicatorRelative strength index
Miscellaneous
Implements a curve of type %1
12 Views
0 Downloads
0 Favorites
R2_ArrowsV1
//+------------------------------------------------------------------+
//|                                                    R2_Arrows.mq4 |
//|            Copyright © 2006, transport_david , David W Honeywell |
//|                                     hellonwheels.trans@gmail.com |
//+------------------------------------------------------------------+

#property copyright "transport_david , David W Honeywell"
#property link      "hellonwheels.trans@gmail.com"

#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Coral
#property indicator_color2 White
#property indicator_color3 FireBrick

//---- input parameters

extern int Trend_Ma_Periods = 200;
extern int RsiLowLev        =  35;
extern int RsiHiLev         =  65;
extern int RsiPeriods       =   2;
extern int Applied_Price    =   0;
extern int CloseBuyRsiLev   =  75;
extern int CloseSellRsiLev  =  25;

//---- buffers

double ExtMapBuffer0[];
double ExtMapBuffer1[];
double ExtMapBuffer2[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+

int init()
  {
//---- indicators
   
   IndicatorBuffers(3);
   
   SetIndexEmptyValue(0,0.0);
   SetIndexStyle(0,DRAW_ARROW);
   SetIndexArrow(0,234);
   SetIndexBuffer(0,ExtMapBuffer0);
   
   SetIndexEmptyValue(1,0.0);
   SetIndexStyle(1,DRAW_ARROW);
   SetIndexArrow(1,233);
   SetIndexBuffer(1,ExtMapBuffer1);
   
   SetIndexEmptyValue(2,0.0);
   SetIndexStyle(2,DRAW_ARROW,STYLE_SOLID,1);
   SetIndexArrow(2,172);
   SetIndexBuffer(2,ExtMapBuffer2);
   
//----
   return(0);
  }

//+------------------------------------------------------------------+ 
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+

int deinit()
  {
//---- 
   
//----
   return(0);
  } 

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+ 

int start()
  {
   
//---- 
   for (int i=Bars-50; i>=0; i--)
      {
      
      double prevtime;
      if (Time[0]!=prevtime) { RefreshRates(); prevtime=Time[0]; } 
      
      double Trend_Ma = iMA(Symbol(),PERIOD_D1,Trend_Ma_Periods,0,MODE_SMA,Applied_Price,i);
      
      double Day1 = iRSI(Symbol(),PERIOD_D1,RsiPeriods,Applied_Price,i+3);
      double Day2 = iRSI(Symbol(),PERIOD_D1,RsiPeriods,Applied_Price,i+2);
      double Day3 = iRSI(Symbol(),PERIOD_D1,RsiPeriods,Applied_Price,i+1);
      
      //- Sell Arrows ---
      
      if ( (Close[i+1] < Trend_Ma) && (Day1 > RsiHiLev) && (Day2 > Day1) && (Day3 > Day2) )
         ExtMapBuffer0[i]=High[i]+(20*Point);//High arrow Sell
      
      //- Buy Arrows ---
      
      if ( (Close[i+1] > Trend_Ma) && (Day1 < RsiLowLev) && (Day2 < Day1) && (Day3 < Day2) )
         ExtMapBuffer1[i]=Low[i]-(20*Point);//Low arrow Buy 
      
      //- Close Trades Marker ---
      if ( (Close[i+1] < Trend_Ma) && (Day3 < CloseSellRsiLev) )
         ExtMapBuffer2[i]=Low[i]-(50*Point);
      
      if ( (Close[i+1] > Trend_Ma) && (Day3 > CloseBuyRsiLev) )
         ExtMapBuffer2[i]=High[i]+(50*Point);
      
      }
       
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments