Author: Copyright ?2009, Walter Choy
ARSI

This script is a specialized technical analysis tool designed for the MetaTrader trading platform. Its primary purpose is to visualize a modified version of market momentum on your chart, providing a smoother and more nuanced interpretation of price movements compared to standard indicators.

Core Functionality

The logic behind this script focuses on blending two different types of market data: absolute price action and relative strength. Instead of simply showing you the raw price or a standard momentum oscillator, it calculates a "weighted" value that helps identify the underlying trend dynamics.

How the Logic Works

The tool processes market data using the following steps:

  • Historical Calculation: The script looks back at a specific number of previous candles (defined by a user-set period). This allows the indicator to maintain context regarding recent price history rather than reacting impulsively to every minor tick.
  • Relative Strength Analysis: It utilizes a standard Relative Strength Index (RSI) calculation as a foundation. However, it doesn't display the RSI directly; instead, it uses the RSI value to determine how much "weight" or significance to give to the current price movement.
  • Dynamic Smoothing: The script compares the current closing price to the previous calculated value. It then adjusts the distance between these two points based on the relative strength of the market. If the momentum is strong, the indicator responds more dynamically; if the momentum is neutral or weaker, the movements are smoothed out.
  • Trend Visualization: The final result is plotted as an orange line directly on your trading chart. This line acts as a smoothed representation of price that incorporates momentum "gravity," aiming to show you where the price is heading by balancing current gains against historical averages.

Summary for Traders

In simple terms, this script creates a sophisticated "moving path" for the price. By blending the actual closing prices with a momentum-based weight, it attempts to filter out market noise and provide a clearer visual of the price trend. It is designed for users who want to see a more refined version of market flow than what is provided by standard moving averages or basic oscillators.

Indicators Used
Relative strength index
Miscellaneous
Implements a curve of type %1
13 Views
0 Downloads
0 Favorites
ARSI
//+------------------------------------------------------------------+
//|                                                         ARSI.mq4 |
//|                                     Copyright ?2009, Walter Choy |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2009, Walter Choy"
#property link      ""

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Orange

//---- input parameters
extern int       period = 20;

double ARSI[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ARSI);
   SetIndexLabel(0, "ARSI");
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
   int    i;
   double sc;
//----
   i = Bars - counted_bars;
   
   while (i>0){
      if (Bars - period <= i){
         ARSI[i] = Close[i];
      } else {
         sc = (MathAbs(iRSI(NULL, 0 , period, PRICE_CLOSE, i) / 100 - 0.5) * 2);
         ARSI[i] = ARSI[i+1] + sc * (Close[i] - ARSI[i+1]);
      }
      i--;
   }
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments