FDM Buy Sell Pressure #2

Download script
Author: Copyright � 2008, Forex Day Monster
FDM Buy Sell Pressure #2

This script is a specialized technical analysis tool designed to visualize market sentiment and price momentum on a trading chart. It operates by identifying the relationship between current market prices and two specific mathematical averages: a standard Exponential Moving Average (EMA) and a Linear Signal Moving Average (LSMA).

Core Functionality

The primary purpose of this indicator is to highlight "Buy" and "Sell" pressure by monitoring whether the current price is trading above or below these moving average benchmarks. Rather than just showing a line, it uses a visual histogram and line system to alert the user to shifts in trend direction.

How the Logic Works

The script processes market data through two distinct layers of calculation:

1. Trend Identification (EMA Comparison) The tool first looks at a standard Exponential Moving Average. This is a calculation that gives more weight to recent price data, making it highly responsive to new market movements.

  • Sell Pressure: If the current closing price falls below this moving average, the script identifies downward momentum.
  • Buy Pressure: If the current closing price stays above this moving average, it indicates upward momentum.

2. Momentum Validation (LSMA Comparison) To provide a more refined analysis, the script calculates a Linear Signal Moving Average (LSMA). This specific type of calculation is designed to predict future price trends by weighting recent prices in a linear fashion.

  • The tool compares the current price against this LSMA value.
  • When the price crosses these thresholds, it serves as a secondary confirmation of whether the market trend is gaining strength or beginning to weaken.

Visual Representation

The indicator translates these complex calculations into a clean visual format on your trading platform:

  • Histograms: These appear in a separate window and act as physical bars that grow or shrink based on how far the price is moving away from the identified averages.
  • Trend Lines: The script draws specific lines to help you see the "floor" and "ceiling" of current momentum, allowing for a quicker glance at whether the market is currently leaning toward a bullish (buying) or bearish (selling) bias.

Summary for the Trader

In short, this tool acts as a filter for market noise. By constantly comparing the live price against two different types of moving averages simultaneously, it highlights "pressure" zones—showing you clearly where the majority of buying or selling force is currently concentrated.

Indicators Used
Moving average indicator
Miscellaneous
Implements a curve of type %1It issuies visual alerts to the screen
14 Views
0 Downloads
0 Favorites
FDM Buy Sell Pressure #2
/*
   
*/
#property copyright "Copyright © 2008, Forex Day Monster"
#property link      "http://www.forexprofitmonster.com"

#property indicator_separate_window
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_color2 Lime
#property indicator_color3 Black
#property indicator_color4 Black

int g_period_76 = 34;
int gi_80 = 21;
int gi_84 = 5;
double g_ibuf_88[];
double g_ibuf_92[];
double g_ibuf_96[];
double g_ibuf_100[];

void init() {
   string ls_0 = "FDM Buy Sell Pressure #2";
   IndicatorShortName(ls_0);
   IndicatorDigits(2);
   SetIndexBuffer(0, g_ibuf_88);
   SetIndexLabel(0, "X higher than price");
   SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 5);
   SetIndexBuffer(1, g_ibuf_92);
   SetIndexLabel(1, "X lower than price");
   SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 5);
   SetIndexBuffer(2, g_ibuf_96);
   SetIndexLabel(2, "LSMA higher than price");
   SetIndexStyle(2, DRAW_LINE, STYLE_SOLID, 1);
   SetIndexBuffer(3, g_ibuf_100);
   SetIndexLabel(3, "LSMA lower than price");
   SetIndexStyle(3, DRAW_LINE, STYLE_SOLID, 1);
}

int start() {
   double ld_12;
   double ld_20;
   double ld_28;
   double ld_36;
   double l_ima_44;
   int li_60;
   int li_64;
   string ls_0 = "2015.11.01";
   int l_str2time_8 = StrToTime(ls_0);
   if (TimeCurrent() >= l_str2time_8) {
      Alert(" Trial version has expired! Email support@forexprofitmonster.com with broker account number for rights to full version!");
      return (0);
   }
   int li_52 = IndicatorCounted();
   if (li_52 >= 0) {
      if (li_52 > 0) li_52--;
      li_52 = Bars - li_52;
      for (int li_56 = 0; li_56 < li_52; li_56++) {
         g_ibuf_92[li_56] = -gi_84;
         g_ibuf_88[li_56] = -gi_84;
         l_ima_44 = iMA(NULL, 0, g_period_76, 0, MODE_EMA, PRICE_TYPICAL, li_56);
         if (Close[li_56] > l_ima_44) g_ibuf_88[li_56] = EMPTY_VALUE;
         if (Close[li_56] < l_ima_44) g_ibuf_92[li_56] = EMPTY_VALUE;
      }
      li_60 = Bars - gi_80 - 5;
      li_64 = li_60 - gi_80 - 1;
      for (li_56 = li_64; li_56 >= 0; li_56--) {
         ld_12 = 0;
         for (int li_68 = gi_80; li_68 >= 1; li_68--) {
            ld_20 = gi_80 + 1;
            ld_20 /= 3.0;
            ld_28 = 0;
            ld_28 = (li_68 - ld_20) * (Close[gi_80 - li_68 + li_56]);
            ld_12 += ld_28;
         }
         ld_36 = 6.0 * ld_12 / (gi_80 * (gi_80 + 1));
         g_ibuf_96[li_56] = gi_84;
         g_ibuf_100[li_56] = gi_84;
         if (ld_36 > Close[li_56]) g_ibuf_100[li_56] = EMPTY_VALUE;
         if (ld_36 < Close[li_56]) g_ibuf_96[li_56] = EMPTY_VALUE;
      }
   }
   return (0);
}

Comments