FDM Trend Power

Download script
Author: Copyright � 2008, Forex Day Monster
FDM Trend Power

Overview of Trend Power Logic

This script is designed to provide a multi-timeframe visual summary of market trend strength and direction. Instead of forcing you to look at multiple different charts, it aggregates data from several timeframes simultaneously into a single dashboard view. It uses the Average Directional Index (ADX)—a common technical tool used to measure the strength of a trend—and applies it across six different periods: 5 Minutes, 15 Minutes, 30 Minutes, 1 Hour, 4 Hours, and 1 Day.

How the Logic Works

The script follows a systematic process to determine what information to display on your screen:

1. Multi-Timeframe Analysis

The tool simultaneously calculates the trend data for six specific timeframes. For every tick of price movement, it looks at the "Main" trend strength as well as the "Plus" (bullish) and "Minus" (bearish) components for each of these periods.

2. Trend Strength Classification

The logic categorizes the market state into three distinct visual zones based on the ADX value:

  • Weak/No Trend: If the trend strength is low (below a specific threshold), the script identifies the market as being in a "sideways" or non-trending state.
  • Developing Trend: If the strength is rising but still relatively low, it flags the trend as beginning to form.
  • Strong Trend: Once the strength exceeds a higher set point, the script identifies a robust, established trend.

3. Directional Detection

Once the script determines that a trend is strong enough to be significant, it compares the Bullish (Plus) and Bearish (Minus) components to decide which way the price is moving:

  • If the Bullish component is higher, it registers an upward move.
  • If the Bearish component is higher, it registers a downward move.

4. Visual Output

The script translates these complex calculations into a clean, easy-to-read dashboard:

  • Color Coding: It assigns specific colors (such as Lime for Bullish, Red for Bearish, and Light Sky Blue for Neutral) to each timeframe so you can see the "mood" of the market at a glance.
  • Iconography: It uses special symbols (from the Wingdings font set) to represent the direction of the trend (e.g., arrows or directional markers), allowing for an immediate visual cue of whether the market is trending up, down, or staying flat.

Summary for the User

Essentially, this script acts as a trend radar. It scans multiple timeframes at once and tells you:

  1. Is there a trend? (Strength)
  2. Which way is it going? (Direction)
  3. How consistent is it across different timeframes? (Alignment)

This allows a trader to quickly see if the 5-minute chart agrees with the 1-hour or 4-hour charts before making a decision.

Indicators Used
Movement directional index
Miscellaneous
It issuies visual alerts to the screen
12 Views
2 Downloads
0 Favorites
FDM Trend Power
/*
   
*/
#property copyright "Copyright © 2008, Forex Day Monster"
#property link      "http://www.forexprofitmonster.com"

#property indicator_separate_window

extern int SpreadThreshold = 6;
extern bool Show_D1_ADX = TRUE;

int init() {
   IndicatorShortName("FDM Trend Power (" + Symbol() + ")");
   return (0);
}

int deinit() {
   ObjectsDeleteAll(0, OBJ_LABEL);
   ObjectDelete("FDM Trend Power-1");
   ObjectDelete("FDM Trend Power-2");
   ObjectDelete("FDM Trend Power-3");
   ObjectDelete("FDM Trend Power-4");
   ObjectDelete("FDM Trend Power-5");
   ObjectDelete("FDM Trend Power-6");
   ObjectDelete("FDM Trend Power-7");
   ObjectDelete("FDM Trend Power-8");
   ObjectDelete("FDM Trend Power-9");
   ObjectDelete("FDM Trend Power-10");
   ObjectDelete("FDM Trend Power-11");
   ObjectDelete("FDM Trend Power-12");
   ObjectDelete("FDM Trend Power-2a");
   ObjectDelete("FDM Trend Power-4a");
   ObjectDelete("FDM Trend Power-6a");
   ObjectDelete("FDM Trend Power-8a");
   ObjectDelete("FDM Trend Power-10a");
   ObjectDelete("FDM Trend Power-12a");
   return (0);
}

int start() {
   color l_color_156;
   color l_color_160;
   color l_color_164;
   color l_color_168;
   color l_color_172;
   color l_color_176;
   string l_text_180;
   string l_text_188;
   string l_text_196;
   string l_text_204;
   string l_text_212;
   string l_text_220;
   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);
   }
   double l_iadx_12 = iADX(NULL, PERIOD_M5, 14, PRICE_CLOSE, MODE_MAIN, 0);
   double l_iadx_20 = iADX(NULL, PERIOD_M5, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
   double l_iadx_28 = iADX(NULL, PERIOD_M5, 14, PRICE_CLOSE, MODE_MINUSDI, 0);
   double l_iadx_36 = iADX(NULL, PERIOD_M15, 14, PRICE_CLOSE, MODE_MAIN, 0);
   double l_iadx_44 = iADX(NULL, PERIOD_M15, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
   double l_iadx_52 = iADX(NULL, PERIOD_M15, 14, PRICE_CLOSE, MODE_MINUSDI, 0);
   double l_iadx_60 = iADX(NULL, PERIOD_M30, 14, PRICE_CLOSE, MODE_MAIN, 0);
   double l_iadx_68 = iADX(NULL, PERIOD_M30, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
   double l_iadx_76 = iADX(NULL, PERIOD_M30, 14, PRICE_CLOSE, MODE_MINUSDI, 0);
   double l_iadx_84 = iADX(NULL, PERIOD_H1, 14, PRICE_CLOSE, MODE_MAIN, 0);
   double l_iadx_92 = iADX(NULL, PERIOD_H1, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
   double l_iadx_100 = iADX(NULL, PERIOD_H1, 14, PRICE_CLOSE, MODE_MINUSDI, 0);
   double l_iadx_108 = iADX(NULL, PERIOD_H4, 14, PRICE_CLOSE, MODE_MAIN, 0);
   double l_iadx_116 = iADX(NULL, PERIOD_H4, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
   double l_iadx_124 = iADX(NULL, PERIOD_H4, 14, PRICE_CLOSE, MODE_MINUSDI, 0);
   double l_iadx_132 = iADX(NULL, PERIOD_D1, 14, PRICE_CLOSE, MODE_MAIN, 0);
   double l_iadx_140 = iADX(NULL, PERIOD_D1, 14, PRICE_CLOSE, MODE_PLUSDI, 0);
   double l_iadx_148 = iADX(NULL, PERIOD_D1, 14, PRICE_CLOSE, MODE_MINUSDI, 0);
   if (l_iadx_12 < 23.0 && l_iadx_12 != 0.0) l_color_156 = LightSkyBlue;
   if (l_iadx_12 >= 23.0 && l_iadx_20 > l_iadx_28) l_color_156 = Lime;
   if (l_iadx_12 >= 23.0 && l_iadx_20 < l_iadx_28) l_color_156 = Red;
   if (l_iadx_36 < 23.0 && l_iadx_36 != 0.0) l_color_160 = LightSkyBlue;
   if (l_iadx_36 >= 23.0 && l_iadx_44 > l_iadx_52) l_color_160 = Lime;
   if (l_iadx_36 >= 23.0 && l_iadx_44 < l_iadx_52) l_color_160 = Red;
   if (l_iadx_60 < 23.0 && l_iadx_60 != 0.0) l_color_164 = LightSkyBlue;
   if (l_iadx_60 >= 23.0 && l_iadx_68 > l_iadx_76) l_color_164 = Lime;
   if (l_iadx_60 >= 23.0 && l_iadx_68 < l_iadx_76) l_color_164 = Red;
   if (l_iadx_84 < 23.0 && l_iadx_84 != 0.0) l_color_168 = LightSkyBlue;
   if (l_iadx_84 >= 23.0 && l_iadx_92 > l_iadx_100) l_color_168 = Lime;
   if (l_iadx_84 >= 23.0 && l_iadx_92 < l_iadx_100) l_color_168 = Red;
   if (l_iadx_108 < 23.0 && l_iadx_108 != 0.0) l_color_172 = LightSkyBlue;
   if (l_iadx_108 >= 23.0 && l_iadx_116 > l_iadx_124) l_color_172 = Lime;
   if (l_iadx_108 >= 23.0 && l_iadx_116 < l_iadx_124) l_color_172 = Red;
   if (l_iadx_132 < 23.0 && l_iadx_132 != 0.0) l_color_176 = LightSkyBlue;
   if (l_iadx_132 >= 23.0 && l_iadx_140 > l_iadx_148) l_color_176 = Lime;
   if (l_iadx_132 >= 23.0 && l_iadx_140 < l_iadx_148) l_color_176 = Red;
   string l_iadx_228 = l_iadx_12;
   string l_iadx_236 = l_iadx_36;
   string l_iadx_244 = l_iadx_60;
   string l_iadx_252 = l_iadx_84;
   string l_iadx_260 = l_iadx_108;
   string l_iadx_268 = l_iadx_132;
   if (l_iadx_12 < 23.0 && l_iadx_12 != 0.0) l_text_180 = "h";
   if (l_iadx_12 >= 23.0 && l_iadx_12 < 28.0 && l_iadx_20 > l_iadx_28) l_text_180 = "ì";
   if (l_iadx_12 >= 23.0 && l_iadx_12 < 28.0 && l_iadx_20 < l_iadx_28) l_text_180 = "î";
   if (l_iadx_12 >= 28.0 && l_iadx_20 > l_iadx_28) l_text_180 = "é";
   if (l_iadx_12 >= 28.0 && l_iadx_20 < l_iadx_28) l_text_180 = "ê";
   if (l_iadx_36 < 23.0 && l_iadx_36 != 0.0) l_text_188 = "h";
   if (l_iadx_36 >= 23.0 && l_iadx_36 < 28.0 && l_iadx_44 > l_iadx_52) l_text_188 = "ì";
   if (l_iadx_36 >= 23.0 && l_iadx_36 < 28.0 && l_iadx_44 < l_iadx_52) l_text_188 = "î";
   if (l_iadx_36 >= 28.0 && l_iadx_44 > l_iadx_52) l_text_188 = "é";
   if (l_iadx_36 >= 28.0 && l_iadx_44 < l_iadx_52) l_text_188 = "ê";
   if (l_iadx_60 < 23.0 && l_iadx_60 != 0.0) l_text_196 = "h";
   if (l_iadx_60 >= 23.0 && l_iadx_60 < 28.0 && l_iadx_68 > l_iadx_76) l_text_196 = "ì";
   if (l_iadx_60 >= 23.0 && l_iadx_60 < 28.0 && l_iadx_68 < l_iadx_76) l_text_196 = "î";
   if (l_iadx_60 >= 28.0 && l_iadx_68 > l_iadx_76) l_text_196 = "é";
   if (l_iadx_60 >= 28.0 && l_iadx_68 < l_iadx_76) l_text_196 = "ê";
   if (l_iadx_84 < 23.0 && l_iadx_84 != 0.0) l_text_204 = "h";
   if (l_iadx_84 >= 23.0 && l_iadx_84 < 28.0 && l_iadx_92 > l_iadx_100) l_text_204 = "ì";
   if (l_iadx_84 >= 23.0 && l_iadx_84 < 28.0 && l_iadx_92 < l_iadx_100) l_text_204 = "î";
   if (l_iadx_84 >= 28.0 && l_iadx_92 > l_iadx_100) l_text_204 = "é";
   if (l_iadx_84 >= 28.0 && l_iadx_92 < l_iadx_100) l_text_204 = "ê";
   if (l_iadx_108 < 23.0 && l_iadx_108 != 0.0) l_text_212 = "h";
   if (l_iadx_108 >= 23.0 && l_iadx_108 < 28.0 && l_iadx_116 > l_iadx_124) l_text_212 = "ì";
   if (l_iadx_108 >= 23.0 && l_iadx_108 < 28.0 && l_iadx_116 < l_iadx_124) l_text_212 = "î";
   if (l_iadx_108 >= 28.0 && l_iadx_116 > l_iadx_124) l_text_212 = "é";
   if (l_iadx_108 >= 28.0 && l_iadx_116 < l_iadx_124) l_text_212 = "ê";
   if (l_iadx_132 < 23.0 && l_iadx_132 != 0.0) l_text_220 = "h";
   if (l_iadx_132 >= 23.0 && l_iadx_132 < 28.0 && l_iadx_140 > l_iadx_148) l_text_220 = "ì";
   if (l_iadx_132 >= 23.0 && l_iadx_132 < 28.0 && l_iadx_140 < l_iadx_148) l_text_220 = "î";
   if (l_iadx_132 >= 28.0 && l_iadx_140 > l_iadx_148) l_text_220 = "é";
   if (l_iadx_132 >= 28.0 && l_iadx_140 < l_iadx_148) l_text_220 = "ê";
   ObjectCreate("FDM Trend Power-1", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-1", "5 Min:", 9, "Lucida Sans Regular", LightSteelBlue);
   ObjectSet("FDM Trend Power-1", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-1", OBJPROP_XDISTANCE, 185);
   ObjectSet("FDM Trend Power-1", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-2", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-2", " ADX " + StringSubstr(l_iadx_228, 0, 5) + " ", 9, "Lucida Sands Regular", l_color_156);
   ObjectSet("FDM Trend Power-2", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-2", OBJPROP_XDISTANCE, 225);
   ObjectSet("FDM Trend Power-2", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-2a", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-2a", l_text_180, 9, "Wingdings", l_color_156);
   ObjectSet("FDM Trend Power-2a", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-2a", OBJPROP_XDISTANCE, 288);
   ObjectSet("FDM Trend Power-2a", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-3", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-3", "15 Min:", 9, "Lucida Sans Regular", LightSteelBlue);
   ObjectSet("FDM Trend Power-3", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-3", OBJPROP_XDISTANCE, 318);
   ObjectSet("FDM Trend Power-3", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-4", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-4", " ADX " + StringSubstr(l_iadx_236, 0, 5) + " ", 9, "Lucida Sands Regular", l_color_160);
   ObjectSet("FDM Trend Power-4", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-4", OBJPROP_XDISTANCE, 363);
   ObjectSet("FDM Trend Power-4", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-4a", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-4a", l_text_188, 9, "Wingdings", l_color_160);
   ObjectSet("FDM Trend Power-4a", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-4a", OBJPROP_XDISTANCE, 426);
   ObjectSet("FDM Trend Power-4a", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-5", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-5", "M30:", 9, "Lucida Sans Regular", LightSteelBlue);
   ObjectSet("FDM Trend Power-5", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-5", OBJPROP_XDISTANCE, 456);
   ObjectSet("FDM Trend Power-5", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-6", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-6", " ADX " + StringSubstr(l_iadx_244, 0, 5) + " ", 9, "Lucida Sands Regular", l_color_164);
   ObjectSet("FDM Trend Power-6", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-6", OBJPROP_XDISTANCE, 490);
   ObjectSet("FDM Trend Power-6", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-6a", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-6a", l_text_196, 9, "Wingdings", l_color_164);
   ObjectSet("FDM Trend Power-6a", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-6a", OBJPROP_XDISTANCE, 553);
   ObjectSet("FDM Trend Power-6a", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-7", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-7", "1 Hr:", 9, "Lucida Sans Regular", LightSteelBlue);
   ObjectSet("FDM Trend Power-7", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-7", OBJPROP_XDISTANCE, 580);
   ObjectSet("FDM Trend Power-7", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-8", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-8", " ADX " + StringSubstr(l_iadx_252, 0, 5) + " ", 9, "Lucida Sands Regular", l_color_168);
   ObjectSet("FDM Trend Power-8", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-8", OBJPROP_XDISTANCE, 610);
   ObjectSet("FDM Trend Power-8", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-8a", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-8a", l_text_204, 9, "Wingdings", l_color_168);
   ObjectSet("FDM Trend Power-8a", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-8a", OBJPROP_XDISTANCE, 672);
   ObjectSet("FDM Trend Power-8a", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-9", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-9", "4 Hr:", 9, "Lucida Sans Regular", LightSteelBlue);
   ObjectSet("FDM Trend Power-9", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-9", OBJPROP_XDISTANCE, 702);
   ObjectSet("FDM Trend Power-9", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-10", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-10", " ADX " + StringSubstr(l_iadx_260, 0, 5) + " ", 9, "Lucida Sands Regular", l_color_172);
   ObjectSet("FDM Trend Power-10", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-10", OBJPROP_XDISTANCE, 732);
   ObjectSet("FDM Trend Power-10", OBJPROP_YDISTANCE, 2);
   ObjectCreate("FDM Trend Power-10a", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
   ObjectSetText("FDM Trend Power-10a", l_text_212, 9, "Wingdings", l_color_172);
   ObjectSet("FDM Trend Power-10a", OBJPROP_CORNER, 0);
   ObjectSet("FDM Trend Power-10a", OBJPROP_XDISTANCE, 793);
   ObjectSet("FDM Trend Power-10a", OBJPROP_YDISTANCE, 2);
   if (Show_D1_ADX == TRUE) {
      ObjectCreate("FDM Trend Power-11", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
      ObjectSetText("FDM Trend Power-11", "1 Day:", 9, "Lucida Sans Regular", LightSteelBlue);
      ObjectSet("FDM Trend Power-11", OBJPROP_CORNER, 0);
      ObjectSet("FDM Trend Power-11", OBJPROP_XDISTANCE, 823);
      ObjectSet("FDM Trend Power-11", OBJPROP_YDISTANCE, 2);
      ObjectCreate("FDM Trend Power-12", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
      ObjectSetText("FDM Trend Power-12", " ADX " + StringSubstr(l_iadx_268, 0, 5) + " ", 9, "Lucida Sands Regular", l_color_176);
      ObjectSet("FDM Trend Power-12", OBJPROP_CORNER, 0);
      ObjectSet("FDM Trend Power-12", OBJPROP_XDISTANCE, 863);
      ObjectSet("FDM Trend Power-12", OBJPROP_YDISTANCE, 2);
      ObjectCreate("FDM Trend Power-12a", OBJ_LABEL, WindowFind("FDM Trend Power (" + Symbol() + ")"), 0, 0);
      ObjectSetText("FDM Trend Power-12a", l_text_220, 9, "Wingdings", l_color_176);
      ObjectSet("FDM Trend Power-12a", OBJPROP_CORNER, 0);
      ObjectSet("FDM Trend Power-12a", OBJPROP_XDISTANCE, 923);
      ObjectSet("FDM Trend Power-12a", OBJPROP_YDISTANCE, 2);
   }
   return (0);
}

Comments