FDM Buy Sell Pressure

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

This tool, known as the FDM Buy Sell Pressure #1, is designed to provide traders with a visual representation of market momentum and price positioning. It works by analyzing two primary types of movement: immediate price action relative to a long-term trend and short-term weighted averages.

Here is a breakdown of how the logic functions for your trading dashboard:

Trend Analysis & Signal Generation

The indicator operates using two distinct calculation methods to identify "pressure" in the market:

1. Long-Term Moving Average Comparison The script tracks a standard Exponential Moving Average (EMA) over a set period. It compares the current closing price against this average:

  • Bullish Pressure: If the price is trading below this moving average, the script identifies a specific signal.
  • Bearish Pressure: If the price is trading above this moving average, it highlights the opposing sentiment.
  • Visual Output: These are displayed as solid histograms in the indicator window, helping you see which side of the trend the "weight" is currently leaning toward.

2. Linear Weighted Momentum (LSMA) In addition to the standard moving average, the script calculates a Linear Weighted Moving Average (LSMA). Unlike a simple average, this method gives more importance (weight) to the most recent price data.

  • The logic determines if the price is currently higher or lower than this weighted average.
  • Visual Output: This is displayed as solid lines on your chart. It acts as a secondary confirmation tool; when both the histograms and the lines align, it suggests a stronger consensus in market direction.

Operational Features

  • Dynamic Visuals: The indicator uses "Empty Values" for logic processing—this means the bars and lines only appear on your screen when the specific mathematical conditions are met. This keeps your chart clean, showing you only active signals rather than constant data points.
  • Trial Security: The script includes a built-in expiration check. It is designed to monitor the current system date; if the date exceeds the set trial limit, the indicator will notify the user and require a full version for continued use.

Summary for Traders

Essentially, this tool acts as a "pressure gauge." By looking at the relationship between the price, a smoothed long-term average, and a heavily weighted short-term average, it attempts to filter out market noise. It tells you where the majority of the current buying or selling "weight" is sitting relative to the established trend.

Indicators Used
Moving average indicator
Miscellaneous
Implements a curve of type %1It issuies visual alerts to the screen
16 Views
0 Downloads
0 Favorites
FDM Buy Sell Pressure
/*
   
*/
#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 = 13;
int gi_80 = 8;
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 #1";
   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