3c_JRSX_H_v2

Author: Copyright � 2005, Weld, Jurik Research
3c_JRSX_H_v2

This indicator is designed to provide traders with a visual representation of market momentum, similar to the well-known Relative Strength Index (RSI). However, it utilizes advanced smoothing algorithms to create a cleaner, more stable line that reduces the "noise" or erratic jumping often found in standard oscillators.

Core Logic and Functionality

The indicator operates by analyzing the relationship between upward price movements and downward price movements over a specific period. Its primary goal is to determine the strength of the current trend and provide a smoother transition between different market states.

1. Advanced Smoothing Mechanism Unlike basic indicators that might react too sharply to a single price tick, this script employs a sophisticated calculation method (based on Jurik Research principles). It processes price changes through multiple layers of filtering. This ensures that while the indicator remains responsive to real market shifts, it ignores minor fluctuations that could lead to false signals.

2. Momentum Calculation The logic tracks two distinct types of data:

  • Directional Movement: It looks at the actual net change in price.
  • Magnitude of Movement: It evaluates the absolute strength of those changes (how large they are, regardless of whether they were up or down).

By balancing these two factors, the script calculates a normalized momentum value that sits within a specific range (centered around a zero point).

3. Dynamic Scaling The indicator converts the raw data into a normalized scale. It ensures that the resulting values stay within predictable boundaries. This makes it easier for traders to identify "overbought" or "oversold" conditions relative to the center line, as the movement is scaled proportionally to the volatility of the asset.

4. Three-Color Visual Signaling One of the unique features of this specific script is its three-color histogram logic. Instead of just showing a single line, it categorizes the momentum into three distinct states:

  • Upward Momentum: Indicated by one color (Blue), showing strength in the positive direction.
  • Downward Momentum: Indicated by a second color (Magenta), showing strength in the negative direction.
  • Neutral/Stagnant State: Indicated by a third color (Gray), showing periods where the market lacks a clear directional trend or is consolidating.

Summary for the User

In practical terms, this tool helps you see the "flow" of the market more clearly. Because it uses superior smoothing logic, it aims to provide a more reliable picture of whether the price is gaining strength or losing steam, while visually separating clear trends from periods of indecision through its three-color coding system.

Miscellaneous
Implements a curve of type %1
16 Views
0 Downloads
0 Favorites
3c_JRSX_H_v2
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

/* Ïî ñâîèì ñâîéñòâàì ýòîò èíäèêàòîð àáñîëþòíî àíàëîãè÷åí êëàññè÷åñêèì 
 îñöèëÿòîðàì è ê íåìó ïðèìåíèìû àáñîëþòíî òå æå ïðè¸ìû òåõàíàëèçà, ÷òî è
 ê RSI. Òîëüêî áëàãîäàðÿ èñïîëüçîâàíèþ áîëåå ñîâåðøåííûõ àëãîðèòìîâ ñãëà-
 æèâàíèÿ îí èìååò ìåíüøåå çàïàçäûâàíèå è áîëåå ãëàêóþ ôîðìó êðèâîé. 
 */
//+SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS+
//|                                                    3c_JRSX_H.mq4 |
//|          JRSX: Copyright © 2005,            Weld, Jurik Research | 
//|                                          http://weld.torguem.net | 
//|   MQL4+3color: Copyright © 2005,                Nikolay Kositsin | 
//|                                   Khabarovsk, violet@mail.kht.ru |   
//+SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS+
#property copyright "Copyright © 2005, Weld, Jurik Research"
#property link      " http://weld.torguem.net"
#property indicator_separate_window
#property indicator_buffers  3
#property indicator_color1  Blue
#property indicator_color2  Magenta
#property indicator_color3  Gray
#property indicator_level1  0.5
#property indicator_level2 -0.5
#property indicator_level3  0.0
#property indicator_maximum  1
#property indicator_minimum -1
//---- input parameters
extern int       Lengh = 14;
extern int   CountBars = 300;
//---- buffers
double JRSX_Up  [];
double JRSX_Down[];
double JRSX_St  [];
//----
int    shift,r,w,k,counted_bars,T0,T1,Tnew;
//----
double v4,v8,v10,v14,v18,v20,v0C,v1C,v8A,minuse;   
double F28,F30,F38,F40,F48,F50,F58,F60,F68,F70,F78,F80,JRSX; 
double f0,f28,f30,f38,f40,f48,f50,f58,f60,f68,f70,f78,f80,Kg,Hg;
//+SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS+
//| Custom indicator initialization function                         |
//+SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_HISTOGRAM, STYLE_SOLID);
   SetIndexStyle(1,DRAW_HISTOGRAM, STYLE_SOLID);
   SetIndexStyle(2,DRAW_HISTOGRAM, STYLE_SOLID);
//----   
   SetIndexBuffer(0,JRSX_Up);
   SetIndexBuffer(1,JRSX_Down);
   SetIndexBuffer(2,JRSX_St);
//----  
   IndicatorShortName("RSX("+Lengh+")");
//----   
   SetIndexDrawBegin(0,Bars-CountBars);
   SetIndexDrawBegin(1,Bars-CountBars);
   SetIndexDrawBegin(2,Bars-CountBars);
   IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));
//----  
   if (Lengh-1>=5) w=Lengh-1; else w=5; Kg=3/(Lengh+2.0); Hg=1.0-Kg;
//----
return(0);
  }
//+SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS+
//| Custom indicator initialization function                         |
//+SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS+
int start()
{
counted_bars=IndicatorCounted();
if (counted_bars<0) return(-1);
if (counted_bars>Lengh) shift=Bars-counted_bars-1;
else shift=Bars-Lengh-1;

Tnew=Time[shift+1];

//+--- âîññòàíîâëåíèå ïåðåìåííûõ +=====================+
if((Tnew!=T0)&&(shift<Bars-Lengh-1)) 
{
if (Tnew==T1)
{
f28=F28; f30=F30; f38=F38; f40=F40; f48=F48; f50=F50;
f58=F58; f60=F60; f68=F68; f70=F70; f78=F78; f80=F80;
} else return(-1);
}
//+--- +===============================================+

if (Lengh-1>=5)w=Lengh-1;else w=5; Kg=3/(Lengh+2.0); Hg=1.0-Kg;

while (shift>=0)
{
//+-------------------+
if (r==0){r=1; k=0;}
else
{
//++++++++++++++++++++
if (r>=w) r=w+1; else r=r+1;

v8 = Close[shift]-Close[shift+1]; v8A=MathAbs(v8);
//---- âû÷èñëåíèå V14 ------
f28 = Hg  * f28 + Kg  *  v8;
f30 = Kg  * f28 + Hg  * f30;
v0C = 1.5 * f28 - 0.5 * f30;
f38 = Hg  * f38 + Kg  * v0C;
f40 = Kg  * f38 + Hg  * f40;
v10 = 1.5 * f38 - 0.5 * f40;
f48 = Hg  * f48 + Kg  * v10;
f50 = Kg  * f48 + Hg  * f50;
v14 = 1.5 * f48 - 0.5 * f50;
//---- âû÷èñëåíèå V20 ------
f58 = Hg  * f58 + Kg  * v8A;
f60 = Kg  * f58 + Hg  * f60;
v18 = 1.5 * f58 - 0.5 * f60;
f68 = Hg  * f68 + Kg  * v18;
f70 = Kg  * f68 + Hg  * f70;
v1C = 1.5 * f68 - 0.5 * f70;
f78 = Hg  * f78 + Kg  * v1C;
f80 = Kg  * f78 + Hg  * f80;
v20 = 1.5 * f78 - 0.5 * f80;
//-------wwwwwwwwww---------
if ((r <= w) && (v8!= 0)) k = 1;
if ((r == w) && (k == 0)) r = 0;
}//++++++++++++++++++++
if ((r>w)&&(v20>0.0000000001)){v4=(v14/v20+1.0)*50.0;if(v4>100.0)v4=100.0;if(v4<0.0)v4=0.0;}else v4=50.0;

JRSX=(v4/50)-1;

//+--- Ñîõðàíåíèå ïåðåìåííûõ +========================+
if (shift==1)
{
T1=Time[1];T0=Time[0];
F28=f28; F30=f30; F38=f38; F40=f40; F48=f48; F50=f50;
F58=f58; F60=f60; F68=f68; F70=f70; F78=f78; F80=f80;
}
//+---+===============================================+

//---- +SSSSSSSSSSSSSSSSSSS Three Colour code +SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS+
minuse = JRSX - JRSX_Up[shift+1]-JRSX_Down[shift+1]-JRSX_St[shift+1]; 
JRSX_Up[shift]=0.0;JRSX_Down[shift]=0.0;JRSX_St[shift]=0.0;
if (minuse>0.0)JRSX_Up[shift]=JRSX;else{if (minuse<0.0)JRSX_Down[shift]=JRSX;else JRSX_St[shift]=JRSX;}    
 //---- +SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS+

shift--;
}
//+-------------------+
return(0);
}






Comments