ELabunskyVolaPresser

Download script
ELabunskyVolaPresser

This technical indicator is designed to identify significant market momentum by analyzing the relationship between price volatility and moving averages. Rather than simply following price trends, it focuses on measuring the "pressure" or intensity behind market movements to determine when a trend has enough strength to warrant a signal.

Core Logic Overview

The script operates using a multi-layered filtering system that evaluates two primary components:

1. The Main Filter (Volatility Threshold) The indicator first establishes a baseline of market activity by comparing two different speeds of moving average calculations. It looks at the difference between the closing prices and opening prices over specific periods. By comparing a "Fast" speed to a "Slow" speed, the tool determines if the current market volatility exceeds a specific historical threshold. If the current momentum isn't significantly stronger than the slower moving average, the indicator remains neutral.

2. The Small Filter (Directional Confirmation) Once the main filter confirms that there is sufficient volatility in the market, the script applies a second, more granular check to determine the direction of the move. This "Small Filter" looks for a specific mathematical confirmation:

  • Bullish Signal: It checks if the immediate momentum is positive and exceeds a multiplier of the slower volatility baseline.
  • Bearish Signal: It checks if the immediate momentum is negative and falls below that same multiplier.

Visual Output

When both the volatility threshold and the directional confirmation are met simultaneously, the script places visual markers on your chart:

  • Green Arrows: These appear when the logic confirms a strong upward surge in price pressure. Depending on your settings, these can appear as small arrows or larger icons at the bottom of the candle.
  • Red Arrows: These appear when the logic confirms a strong downward surge in price pressure. These are placed above the candles to signal selling pressure.

Summary for the User

In essence, this tool acts as a "pressure gauge." It filters out minor market noise by requiring the market to show significant energy before it provides a signal. When you see an arrow, it means the script has detected a moment where both the speed of price change and the overall volatility have aligned to suggest a meaningful move in that direction.

Indicators Used
Moving average indicator
8 Views
0 Downloads
0 Favorites
ELabunskyVolaPresser
#property copyright "Eugene Labunsky / http://www.trendmedium.com/tmt4/"
#property link      "http://www.trendmedium.com/tmt4/"

#property indicator_chart_window

extern int MainFilterSpeed = 8;
extern int MainFilterSlow = 16;

extern int SmallFilterSpeed = 3;
extern int SmallFilterSlow = 12;

double MainFiltersMultipleFactor = 1.0;
double SmallFiltersMultipleFactor = 1.0;


extern bool SmallArrow = true;

int SlowFilterOffset = 0;

double emaBuffer[999];
double emaRes[999];

double getAbsEMACO(int period, int shift)
{

  if (iMA(NULL, 0, 1, 0, MODE_SMA, PRICE_CLOSE, shift + period + 1) == 0)
    return (0);
  else
  {

    int i = 0;
    for (i = 0; i < period; i++)
    {
      emaBuffer[period - 1-i] = MathAbs(iMA(NULL, 0, 1, 0, MODE_SMA, PRICE_CLOSE, shift + i) - iMA(NULL, 0, 1, 0, MODE_SMA, PRICE_OPEN, shift + i));
    }

    double pr = 2.0 / (period + 1);

    emaRes[0] = emaBuffer[0];
    for (i = 1; i < period; i++)
    {
      emaRes[i] = emaBuffer[i] *pr + emaRes[i - 1]*(1-pr);
    }

    return (emaRes[period - 1]);

  }

}

double getEMACO(int period, int shift)
{

  if (iMA(NULL, 0, 1, 0, MODE_SMA, PRICE_CLOSE, shift + period + 1) == 0)
    return (0);
  else
  {

    int i = 0;
    for (i = 0; i < period; i++)
    {
      emaBuffer[period - 1-i] = (iMA(NULL, 0, 1, 0, MODE_SMA, PRICE_CLOSE, shift + i) - iMA(NULL, 0, 1, 0, MODE_SMA, PRICE_OPEN, shift + i));
    }

    double pr = 2.0 / (period + 1);

    emaRes[0] = emaBuffer[0];
    for (i = 1; i < period; i++)
    {
      emaRes[i] = emaBuffer[i] *pr + emaRes[i - 1]*(1-pr);
    }

    return (emaRes[period - 1]);

  }

}


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
{


  string short_name = "ELabunskyVolaPresser";
  IndicatorShortName(short_name);
  SetIndexLabel(0, short_name);

  ObjectsDeleteAll();


}

int start()
{

  int countedBars = IndicatorCounted();
  if (countedBars < 0)
  {
    countedBars = 0;
    ObjectsDeleteAll();
  }
  else
    countedBars--;

  int limit = Bars - countedBars;

  double ShiftY = MathAbs(High[Bars - 1] - Low[WindowFirstVisibleBar()]);

  for (int i = 0; i < limit; i++)
  {

    int signal = 0;

    string objName = "ELA_" + Symbol() + "-" + Period() + "-" + Time[i];


    if (ObjectFind(objName) >= 0)
      ObjectDelete(objName);

    int currOffSet = i;

    if (getAbsEMACO(MainFilterSpeed, currOffSet) > getAbsEMACO(MainFilterSlow, currOffSet + SlowFilterOffset))
    {

      double _smallFilterSpeed = getEMACO(SmallFilterSpeed, currOffSet);      
      double _SmallFilterSlow = getAbsEMACO(SmallFilterSlow, currOffSet);

      if (_smallFilterSpeed > _SmallFilterSlow *SmallFiltersMultipleFactor)
        signal = 1;
      else
        if (_smallFilterSpeed <  - _SmallFilterSlow * SmallFiltersMultipleFactor)
          signal =  - 1;
    }

    if (signal == 1)
    {


      if (!SmallArrow)
      {
        ObjectCreate(objName, OBJ_ARROW, 0, Time[i], Low[i]);
        //ObjectSet(objName,OBJPROP_ARROWCODE,SYMBOL_ARROWDOWN);
        ObjectSet(objName, OBJPROP_ARROWCODE, 233);
        ObjectSet(objName, OBJPROP_WIDTH, 1);
        ObjectSet(objName, OBJPROP_COLOR, Green);
      }
      else
      {

        ObjectCreate(objName, OBJ_ARROW, 0, Time[i], Low[i]);
        ObjectSet(objName, OBJPROP_ARROWCODE, 1);
        ObjectSet(objName, OBJPROP_WIDTH, 1);
        ObjectSet(objName, OBJPROP_COLOR, Green);
      }



    }

    if (signal ==  - 1)
    {


      if (!SmallArrow)
      {
        ObjectCreate(objName, OBJ_ARROW, 0, Time[i], High[i] + ShiftY / 100);
        //ObjectSet(objName,OBJPROP_ARROWCODE,SYMBOL_ARROWDOWN);
        ObjectSet(objName, OBJPROP_ARROWCODE, 234);
        ObjectSet(objName, OBJPROP_WIDTH, 1);
        ObjectSet(objName, OBJPROP_COLOR, Red);
      }
      else
      {

        ObjectCreate(objName, OBJ_ARROW, 0, Time[i], High[i]);
        ObjectSet(objName, OBJPROP_ARROWCODE, 2);
        ObjectSet(objName, OBJPROP_WIDTH, 1);
        ObjectSet(objName, OBJPROP_COLOR, Red);
      }

    }


  }

  return (0);

}

int deinit()
{
  ObjectsDeleteAll();
  return (0);
}

Comments