Juice2

The Juice indicator is a visual trading tool designed to help market participants identify momentum shifts and price deviations by analyzing volatility. Rather than plotting directly on the main price chart, it operates in a separate window, providing a streamlined view of whether the current market move is showing strength or exhaustion.

Core Logic & Methodology

The script functions by calculating a specific type of moving average based on Standard Deviation. Standard Deviation is a mathematical measure of how much a price moves away from its average; by applying this to an Exponential Moving Average (EMA), the tool captures both the current trend and the intensity of the price fluctuations.

To make this data actionable, the logic follows these primary steps:

  • Baseline Adjustment: The indicator calculates the volatility and then subtracts a specific "Level" (a threshold value). This creates a baseline that helps filter out minor market noise, ensuring that only significant movements are highlighted.
  • Dynamic Scaling: The script is designed to be intelligent regarding different currency pairs. For example, it automatically adjusts its sensitivity levels for the Japanese Yen (JPY) pairs compared to standard currencies. It also modifies its threshold based on specific timeframe settings to maintain consistency across different charts.
  • Visual Separation of Momentum: The core purpose of the tool is to split market data into two distinct visual components:
    • Upward Momentum: When the calculated volatility exceeds the established threshold in a positive direction, it is displayed as a green histogram. This signifies bullish pressure.
    • Downward Momentum: When the volatility exceeds the threshold in a negative direction, it is displayed as a red histogram. This signifies bearish pressure.

How to Interpret the Results

The indicator acts as a "momentum filter." When you see significant bars appearing on the chart, it indicates that the market is moving with enough force to break through the predefined noise level.

  • Green Bars: Indicate that price movement is trending upwards with notable strength relative to recent history.
  • Red Bars: Indicate that price movement is trending downwards with notable strength.
  • Flat Areas: When no bars are visible, it suggests that the market is currently in a "quiet" state or consolidating, where the price action is not strong enough to trigger a definitive momentum signal.

By providing a clear distinction between active momentum and stagnant price action, this tool helps traders focus on high-conviction moves while ignoring insignificant fluctuations.

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

//+------------------------------------------------------------------+
//|                                                        Juice.mq4 |
//|                                                          Perky_z |
//|                              http://fxovereasy.atspace.com/index |
//+------------------------------------------------------------------+
#property  copyright "perky"
#property  link      "http://fxovereasy.atspace.com/index"
//---- indicator settings
#property  indicator_separate_window
#property  indicator_buffers 2
#property  indicator_color1  LimeGreen
#property  indicator_color2  FireBrick
//---- indicator parameters
extern int Periyod=7;
extern double Level=0.0004;

//---- indicator buffers
double OsMAUpBuffer[];
double OsMADownBuffer[];
double OsMABuffer[];
double MACDBuffer[];
double SignalBuffer[];


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- 2 additional buffers are used for counting.
   IndicatorBuffers(5);
//---- drawing settings
   SetIndexStyle(0,DRAW_HISTOGRAM,STYLE_SOLID,2);
   SetIndexStyle(1,DRAW_HISTOGRAM,STYLE_SOLID,1);
   SetIndexDrawBegin(0,Level);
   IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS)+2);
//---- 3 indicator buffers mapping
   if(!SetIndexBuffer(0,OsMAUpBuffer) &&
      !SetIndexBuffer(1,OsMADownBuffer) &&
      !SetIndexBuffer(2,OsMABuffer) &&
      !SetIndexBuffer(3,MACDBuffer) &&
      !SetIndexBuffer(4,SignalBuffer))
      Print("cannot set indicator buffers!");
//---- name for DataWindow and indicator subwindow label
   IndicatorShortName("Juice("+Periyod+","+Level+")");
//---- initialization done
   return(0);
  }
//+------------------------------------------------------------------+
//| Moving Average of Oscillator                                     |
//+------------------------------------------------------------------+
int start()
{
//if ( Period != 15)  Alert ("Juice Is Recommended for 15 Min Chart only!!");

 
  if (Symbol()=="USDJPY") Level=0.040;
  if (Symbol()=="EURJPY") Level=0.040;
  if (Symbol()=="GBPJPY") Level=0.040;
   int limit,i;
   int counted_bars=IndicatorCounted();
//---- check for possible errors
   if(counted_bars<0) return(-1);
//---- last counted bar will be recounted
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
if (Level== 0.0004 && Period()==5 ) Level=0.0002;

 
//---- main loop
   for(i=0; i<limit; i++){
      OsMABuffer[i]=iStdDev  (NULL,0,Periyod,MODE_EMA,0,PRICE_CLOSE,i)-(Level);
      
      if(OsMABuffer[i]>0){
         OsMAUpBuffer[i]=OsMABuffer[i];
         OsMADownBuffer[i]=0;
      }else if(OsMABuffer[i]<0){
         OsMADownBuffer[i]=OsMABuffer[i];
         OsMAUpBuffer[i]=0;
      }else{
         OsMAUpBuffer[i]=0;
         OsMADownBuffer[i]=0;
      }
   }
//---- done
   return(0);
  }
//+------------------------------------------------------------------+

Comments