3c_Turbo_JRSX_Filtered

Download script
Author: strategybuilderfx.com - modified by bluto to use typical price (HLC/3), modification c 2008 codobro
3c_Turbo_JRSX_Filtered

This technical indicator is designed to analyze market momentum by smoothing out price fluctuations and identifying specific trend shifts. It operates in a separate window, providing a visual representation of the "pulse" of the market rather than just tracking the raw price.

Core Logic and Functionality

Price Calculation and Smoothing The tool begins by calculating a representative price for each bar. Instead of relying solely on the closing price, it uses a "Typical Price" approach—an average of the high, low, and close prices. This provides a more balanced view of the market's range during a specific period.

Momentum Filtering The script employs a complex series of mathematical weightings to track changes in this price over time. It looks at how much the current price deviates from previous values and applies multiple layers of calculation (similar to smoothed moving averages) to dampen out "noise." The goal of this multi-step processing is to ensure that only significant, sustained price movements are captured, while minor fluctuations are ignored.

Momentum Scoring (0–100 Scale) The primary output of the script is a value mapped between 0 and 100.

  • Value of 50: Represents a neutral state where there is no clear upward or downward momentum.
  • Movement toward 100: Indicates strengthening upward momentum.
  • Movement toward 0: Indicates strengthening downward momentum.

The script dynamically adjusts this score based on the rate and intensity of price changes. If the calculated momentum exceeds these bounds, it is capped at 0 or 100 to maintain a clean visual range.

Signal Identification Beyond the primary line, the script includes logic to identify specific "breakout" moments. It compares the current momentum value against the previous value:

  • It checks if the momentum has moved beyond a specific threshold (the "Filter").
  • When the momentum moves significantly enough to trigger these conditions, it creates visual markers (High and Low points).
  • These markers are intended to highlight moments of significant exhaustion or reversal, helping users see when a trend is losing steam or shifting direction.

Summary for the User

Essentially, this tool acts as a "speedometer" for market trends. It filters out the jittery movements of the market to show you the underlying direction and strength of the move. By observing where the line sits relative to the 50-level and watching for the appearance of High/Low markers, you can better identify when a trend is gaining strength or preparing to turn.

Miscellaneous
Implements a curve of type %1
11 Views
0 Downloads
0 Favorites
3c_Turbo_JRSX_Filtered
//+---------------------------------------------------------+
//|                       3c_Turbo_JRSX_.mq4   |
//|modified to make price mode selectable by user - bluto   |
//|                      Color addition c 2008 codobro      |
//+---------------------------------------------------------+

#property copyright "strategybuilderfx.com - modified by bluto to use typical price (HLC/3), modification c 2008 codobro"
#property link "finger"
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 Yellow
#property indicator_color2 Green
#property indicator_color3 Orange
#property indicator_level1 70
#property indicator_level2 30
#property indicator_level3 50
#property indicator_width1 2
#property indicator_width2 2
#property indicator_width3 2
#property indicator_maximum 100
#property indicator_minimum 0

//---- input parameters
extern int Len=14; //---- buffers
extern double  Filter   =  0.0;
double rsx[];
double jrhi[];
double jrlo[];


int init() {
   IndicatorShortName("Turbo_JRSX");
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,rsx);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1,jrhi);
   SetIndexStyle(2,DRAW_LINE);
   SetIndexBuffer(2,jrlo);
   
   return(0);
}

int deinit()
{
   return(0);
}

int start()
{

   double f88, f90;
   double f0, v4, v8, vC, v10, v14, v18, v20;
   double f8, f10, f18, f20, f28, f30, f38, f48, v1C;
   double f50, f58, f60, f68, f70, f78, f80, f40;
   
   //int counted_bars = IndicatorCounted(),limit,shift;

   //if (counted_bars<0) return(-1);
   //if (counted_bars>0) counted_bars--;
   double limit=Bars-(Len)-1;
   
   //if(counted_bars>Len) limit=Bars-counted_bars-1;

   for (int shift=limit;shift>=0;shift--) {
      if (f90 == 0.0) {
      
         f90 = 1.0;
         f0 = 0.0;
         if (Len-1 >= 5) f88 = Len-1.0; else f88 = 5.0;
 //      f8 = 100.0*(Close[shift]);
 // 
 //      Modified for median price
 //
         f8 = 100.0*((High[shift]+Low[shift]+Close[shift])/3);
         f18 = 3.0 / (Len + 2.0);
         f20 = 1.0 - f18;
         
      } else{
         if (f88 <= f90) f90 = f88 + 1; else f90 = f90 + 1;
         f10 = f8;
 //      f8 = 100*Close[shift];
         f8 = 100.0*((High[shift]+Low[shift]+Close[shift])/3);
         v8 = f8 - f10;
         f28 = f20 * f28 + f18 * v8;
         f30 = f18 * f28 + f20 * f30;
         vC = f28 * 1.5 - f30 * 0.5;
         f38 = f20 * f38 + f18 * vC;
         f40 = f18 * f38 + f20 * f40;
         v10 = f38 * 1.5 - f40 * 0.5;
         f48 = f20 * f48 + f18 * v10;
         f50 = f18 * f48 + f20 * f50;
         v14 = f48 * 1.5 - f50 * 0.5;
         f58 = f20 * f58 + f18 * MathAbs(v8);
         f60 = f18 * f58 + f20 * f60;
         v18 = f58 * 1.5 - f60 * 0.5;
         f68 = f20 * f68 + f18 * v18;

         f70 = f18 * f68 + f20 * f70;
         v1C = f68 * 1.5 - f70 * 0.5;
         f78 = f20 * f78 + f18 * v1C;
         f80 = f18 * f78 + f20 * f80;
         v20 = f78 * 1.5 - f80 * 0.5;

         if ((f88 >= f90) && (f8 != f10)) f0 = 1.0;
         if ((f88 == f90) && (f0 == 0.0)) f90 = 0.0;
      }

      if ((f88 < f90) && (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;
      }
      
      rsx[shift]=v4;
      jrhi[shift]=v4;
      jrlo[shift]=v4;

      if (rsx[shift] > rsx[shift+1]-Filter)
      {
          jrlo[shift] = EMPTY_VALUE;
      }
      else if (rsx[shift] < rsx[shift+1]+Filter) 
      {
          jrhi[shift] = EMPTY_VALUE;
      }
      else if (rsx[shift] == rsx[shift+1]+Filter) 
      {
          jrhi[shift] = EMPTY_VALUE;
          jrlo[shift] = EMPTY_VALUE;
      }
//      else 
//      {
  //       
    //     jrhi[shift]=EMPTY_VALUE;//EMPTY_VALUE;
      //   jrlo[shift]=EMPTY_VALUE;//EMPTY_VALUE;
     // }
        

   }
   
   return(0);
   
}

Comments