Trends_v1
Download scriptThis script is designed as a multi-currency trend analysis tool for the MetaTrader platform. It works by simultaneously monitoring four major currency pairs—EUR/USD, GBP/USD, USD/CHF, and USD/CAD—and providing a real-time summary of their market direction directly on your chart.
Instead of making you look at multiple complex charts, this tool aggregates data from three distinct technical indicators to give you a "consensus" view of the market. Here is the breakdown of how that logic works:
1. The Triple-Indicator System
For every currency pair mentioned, the script evaluates three different types of market data:
- ADX (Average Directional Index): This is used to determine the primary direction of the trend. It compares positive momentum against negative momentum to see which way the price is "pushing."
- FI (Force Index): This measures the strength of a price move relative to the volume of the move. It tells the script whether the current price action has actual "force" behind it or if it is just drifting.
- RSI (Relative Strength Index): This serves as a momentum gauge. The script looks at the 50-level mark; if the value is above 50, it considers the short-term momentum to be upward; if below 50, it considers it downward.
2. Automated Trend Logic & Classification
The core intelligence of the script lies in how it combines these three indicators into a single "Analysis Result." It looks for agreement (confluence) between all three tools:
- Strong Bullish/Bearish: If all three indicators agree perfectly (e.g., all pointing UP), the script labels the trend as [Strong]. This indicates high confidence in the current direction.
- Weak Trends & Sideways Movement: If the indicators provide mixed signals (for example, if two point one way but the third points the other), the script automatically classifies the market as [Weak] or SIDEWAY. This serves as a warning to the user that the market might be choppy or lacking a clear direction.
3. Visual Dashboard Output
Rather than just providing raw numbers, the script converts all this math into a clean, color-coded text dashboard on your screen:
- Color Coding: It uses Lime Green for upward trends and Red for downward trends. For neutral or "sideways" markets, it uses colors like Silver or Tomato to alert you to the lack of clear direction.
- Real-Time Updates: The script constantly refreshes these labels, allowing you to see the "Strength," "Analysis," and "Trend" status for all four currency pairs at a single glance.
Summary for the User
Think of this script as a multitasking analyst. It watches four different markets at once, asks three different questions about each one, and then gives you a simplified "Traffic Light" report on your screen, telling you not just which way the price is moving, but how much confidence you should have in that movement.
//+------------------------------------------------------------------+
//| Trends.mq4 |
//| Copyright © 2006, MetaQuotes Software Corp. |
//| http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net"
//---- ADX
int ADX_period = 14;
//---- FI
int FI_period = 14;
//---- RSI
int RSI_period = 14;
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
//----
Comment("\n NN \n ------------------------------------------------"
+"\n EUR/USD Trend Analysis"
+"\n ------------------------------------------------"
+"\n 1st Indicator:"
+"\n 2nd Indicator:"
+"\n 3rd Indicator:"
+"\n ------------------------------------------------"
+"\n Analysis Result:"
+"\n \n ------------------------------------------------"
+"\n GBP/USD Trend Analysis"
+"\n ------------------------------------------------"
+"\n 1st Indicator:"
+"\n 2nd Indicator:"
+"\n 3rd Indicator:"
+"\n ------------------------------------------------"
+"\n Analysis Result:"
+"\n \n ------------------------------------------------"
+"\n USD/CHF Trend Analysis"
+"\n ------------------------------------------------"
+"\n 1st Indicator:"
+"\n 2nd Indicator:"
+"\n 3rd Indicator:"
+"\n ------------------------------------------------"
+"\n Analysis Result:"
+"\n \n ------------------------------------------------"
+"\n USD/CAD Trend Analysis"
+"\n ------------------------------------------------"
+"\n 1st Indicator:"
+"\n 2nd Indicator:"
+"\n 3rd Indicator:"
+"\n ------------------------------------------------"
+"\n Analysis Result:"
+"\n \n ------------------------------------------------");
//---- Trend Analysis EURUSD
//---- ADX
string ADX_Trend = "";
color colt1;
double ADXP=iADX("EURUSD",0,ADX_period,PRICE_CLOSE,MODE_PLUSDI,0);
double ADXM=iADX("EURUSD",0,ADX_period,PRICE_CLOSE,MODE_MINUSDI,0);
if ((ADXP > ADXM)) { ADX_Trend = "UP"; colt1 = LimeGreen; }
if ((ADXP < ADXM)) { ADX_Trend = "DOWN"; colt1 = Red; }
ObjectCreate("ADX", OBJ_LABEL, 0, 0, 0);
ObjectSetText("ADX",ADX_Trend,8, "Arial", colt1);
ObjectSet("ADX", OBJPROP_CORNER, 0);
ObjectSet("ADX", OBJPROP_XDISTANCE, 80);
ObjectSet("ADX", OBJPROP_YDISTANCE, 72);
//---- FI
string FI_Trend ="";
color colt2;
double FI=iForce("EURUSD",0,FI_period,1,PRICE_CLOSE,0);
if((FI > 0)) { FI_Trend ="UP"; colt2 = LimeGreen; }
if((FI < 0)) { FI_Trend ="DOWN"; colt2 = Red; }
ObjectCreate("FI", OBJ_LABEL, 0, 0, 0);
ObjectSetText("FI",FI_Trend,8, "Arial", colt2);
ObjectSet("FI", OBJPROP_CORNER, 0);
ObjectSet("FI", OBJPROP_XDISTANCE, 80);
ObjectSet("FI", OBJPROP_YDISTANCE, 84);
//---- RSI
string RSI_Trend ="";
color colt3;
double RSI=iRSI("EURUSD",0,RSI_period,PRICE_CLOSE,0);
if((RSI > 50)) { RSI_Trend ="UP"; colt3 = LimeGreen; }
if((RSI < 50)) { RSI_Trend ="DOWN"; colt3 = Red; }
ObjectCreate("RSI", OBJ_LABEL, 0, 0, 0);
ObjectSetText("RSI",RSI_Trend,8, "Arial", colt3);
ObjectSet("RSI", OBJPROP_CORNER, 0);
ObjectSet("RSI", OBJPROP_XDISTANCE, 80);
ObjectSet("RSI", OBJPROP_YDISTANCE, 96);
string Analysis ="", Strength ="", Trend="";
color cola1, cola2, cola3;
if(ADX_Trend=="UP"&&FI_Trend=="UP"&&RSI_Trend=="UP")
{Analysis="UP"; cola1=LimeGreen; Strength="[Strong]"; cola2=LimeGreen; Trend="BULLISH"; cola3=LimeGreen;}
if(ADX_Trend=="UP"&&FI_Trend=="UP"&&RSI_Trend=="DOWN")
{Analysis="UP"; cola1=LimeGreen; Strength="[Weak]"; cola2=Lime; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="UP"&&FI_Trend=="DOWN"&&RSI_Trend=="UP")
{Analysis="UP"; cola1=LimeGreen; Strength="[Weak]"; cola2=Lime; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="UP"&&FI_Trend=="DOWN"&&RSI_Trend=="DOWN")
{Analysis="DOWN"; cola1=Red; Strength="[Weak]"; cola2=Tomato; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="DOWN"&&FI_Trend=="DOWN"&&RSI_Trend=="DOWN")
{Analysis="DOWN"; cola1=Red; Strength="[Strong]"; cola2=Red; Trend="BEARISH"; cola3=Red;}
if(ADX_Trend=="DOWN"&&FI_Trend=="DOWN"&&RSI_Trend=="UP")
{Analysis="DOWN"; cola1=Red; Strength="[Weak]"; cola2=Tomato; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="DOWN"&&FI_Trend=="UP"&&RSI_Trend=="DOWN")
{Analysis="DOWN"; cola1=Red; Strength="[Weak]"; cola2=Tomato; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="DOWN"&&FI_Trend=="UP"&&RSI_Trend=="UP")
{Analysis="UP"; cola1=LimeGreen; Strength="[Weak]"; cola2=Lime; Trend="SIDEWAY"; cola3=Silver;}
ObjectCreate("Analysis", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Analysis",Analysis,8, "Arial", cola1);
ObjectSet("Analysis", OBJPROP_CORNER, 0);
ObjectSet("Analysis", OBJPROP_XDISTANCE, 80);
ObjectSet("Analysis", OBJPROP_YDISTANCE, 120);
ObjectCreate("Strength", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Strength",Strength,8, "Arial", cola2);
ObjectSet("Strength", OBJPROP_CORNER, 0);
ObjectSet("Strength", OBJPROP_XDISTANCE, 113);
ObjectSet("Strength", OBJPROP_YDISTANCE, 120);
ObjectCreate("Trend", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Trend",Trend,8, "Arial", cola3);
ObjectSet("Trend", OBJPROP_CORNER, 0);
ObjectSet("Trend", OBJPROP_XDISTANCE, 80);
ObjectSet("Trend", OBJPROP_YDISTANCE, 132);
//---- Trend Analysis GBPUSD
//---- ADX
ADX_Trend = "";
ADXP=iADX("GBPUSD",0,ADX_period,PRICE_CLOSE,MODE_PLUSDI,0);
ADXM=iADX("GBPUSD",0,ADX_period,PRICE_CLOSE,MODE_MINUSDI,0);
if ((ADXP > ADXM)) { ADX_Trend = "UP"; colt1 = LimeGreen; }
if ((ADXP < ADXM)) { ADX_Trend = "DOWN"; colt1 = Red; }
ObjectCreate("ADX_GBP", OBJ_LABEL, 0, 0, 0);
ObjectSetText("ADX_GBP",ADX_Trend,8, "Arial", colt1);
ObjectSet("ADX_GBP", OBJPROP_CORNER, 0);
ObjectSet("ADX_GBP", OBJPROP_XDISTANCE, 80);
ObjectSet("ADX_GBP", OBJPROP_YDISTANCE, 180);
//---- FI
FI_Trend ="";
FI=iForce("GBPUSD",0,FI_period,1,PRICE_CLOSE,0);
if((FI > 0)) { FI_Trend ="UP"; colt2 = LimeGreen; }
if((FI < 0)) { FI_Trend ="DOWN"; colt2 = Red; }
ObjectCreate("FI_GBP", OBJ_LABEL, 0, 0, 0);
ObjectSetText("FI_GBP",FI_Trend,8, "Arial", colt2);
ObjectSet("FI_GBP", OBJPROP_CORNER, 0);
ObjectSet("FI_GBP", OBJPROP_XDISTANCE, 80);
ObjectSet("FI_GBP", OBJPROP_YDISTANCE, 192);
//---- RSI
RSI_Trend ="";
RSI=iRSI("GBPUSD",0,RSI_period,PRICE_CLOSE,0);
if((RSI > 50)) { RSI_Trend ="UP"; colt3 = LimeGreen; }
if((RSI < 50)) { RSI_Trend ="DOWN"; colt3 = Red; }
ObjectCreate("RSI_GBP", OBJ_LABEL, 0, 0, 0);
ObjectSetText("RSI_GBP",RSI_Trend,8, "Arial", colt3);
ObjectSet("RSI_GBP", OBJPROP_CORNER, 0);
ObjectSet("RSI_GBP", OBJPROP_XDISTANCE, 80);
ObjectSet("RSI_GBP", OBJPROP_YDISTANCE, 204);
Analysis ="";
Strength ="";
Trend="";
if(ADX_Trend=="UP"&&FI_Trend=="UP"&&RSI_Trend=="UP")
{Analysis="UP"; cola1=LimeGreen; Strength="[Strong]"; cola2=LimeGreen; Trend="BULLISH"; cola3=LimeGreen;}
if(ADX_Trend=="UP"&&FI_Trend=="UP"&&RSI_Trend=="DOWN")
{Analysis="UP"; cola1=LimeGreen; Strength="[Weak]"; cola2=Lime; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="UP"&&FI_Trend=="DOWN"&&RSI_Trend=="UP")
{Analysis="UP"; cola1=LimeGreen; Strength="[Weak]"; cola2=Lime; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="UP"&&FI_Trend=="DOWN"&&RSI_Trend=="DOWN")
{Analysis="DOWN"; cola1=Red; Strength="[Weak]"; cola2=Tomato; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="DOWN"&&FI_Trend=="DOWN"&&RSI_Trend=="DOWN")
{Analysis="DOWN"; cola1=Red; Strength="[Strong]"; cola2=Red; Trend="BEARISH"; cola3=Red;}
if(ADX_Trend=="DOWN"&&FI_Trend=="DOWN"&&RSI_Trend=="UP")
{Analysis="DOWN"; cola1=Red; Strength="[Weak]"; cola2=Tomato; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="DOWN"&&FI_Trend=="UP"&&RSI_Trend=="DOWN")
{Analysis="DOWN"; cola1=Red; Strength="[Weak]"; cola2=Tomato; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="DOWN"&&FI_Trend=="UP"&&RSI_Trend=="UP")
{Analysis="UP"; cola1=LimeGreen; Strength="[Weak]"; cola2=Lime; Trend="SIDEWAY"; cola3=Silver;}
ObjectCreate("Analysis_GBP", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Analysis_GBP",Analysis,8, "Arial", cola1);
ObjectSet("Analysis_GBP", OBJPROP_CORNER, 0);
ObjectSet("Analysis_GBP", OBJPROP_XDISTANCE, 80);
ObjectSet("Analysis_GBP", OBJPROP_YDISTANCE, 228);
ObjectCreate("Strength_GBP", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Strength_GBP",Strength,8, "Arial", cola2);
ObjectSet("Strength_GBP", OBJPROP_CORNER, 0);
ObjectSet("Strength_GBP", OBJPROP_XDISTANCE, 113);
ObjectSet("Strength_GBP", OBJPROP_YDISTANCE, 228);
ObjectCreate("Trend_GBP", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Trend_GBP",Trend,8, "Arial", cola3);
ObjectSet("Trend_GBP", OBJPROP_CORNER, 0);
ObjectSet("Trend_GBP", OBJPROP_XDISTANCE, 80);
ObjectSet("Trend_GBP", OBJPROP_YDISTANCE, 240);
//---- Trend Analysis USD/CHF
//---- ADX
ADX_Trend = "";
ADXP=iADX("USDCHF",0,ADX_period,PRICE_CLOSE,MODE_PLUSDI,0);
ADXM=iADX("USDCHF",0,ADX_period,PRICE_CLOSE,MODE_MINUSDI,0);
if ((ADXP > ADXM)) { ADX_Trend = "UP"; colt1 = LimeGreen; }
if ((ADXP < ADXM)) { ADX_Trend = "DOWN"; colt1 = Red; }
ObjectCreate("ADX_JPY", OBJ_LABEL, 0, 0, 0);
ObjectSetText("ADX_JPY",ADX_Trend,8, "Arial", colt1);
ObjectSet("ADX_JPY", OBJPROP_CORNER, 0);
ObjectSet("ADX_JPY", OBJPROP_XDISTANCE, 80);
ObjectSet("ADX_JPY", OBJPROP_YDISTANCE, 288);
//---- FI
FI_Trend ="";
FI=iForce("USDCHF",0,FI_period,1,PRICE_CLOSE,0);
if((FI > 0)) { FI_Trend ="UP"; colt2 = LimeGreen; }
if((FI < 0)) { FI_Trend ="DOWN"; colt2 = Red; }
ObjectCreate("FI_JPY", OBJ_LABEL, 0, 0, 0);
ObjectSetText("FI_JPY",FI_Trend,8, "Arial", colt2);
ObjectSet("FI_JPY", OBJPROP_CORNER, 0);
ObjectSet("FI_JPY", OBJPROP_XDISTANCE, 80);
ObjectSet("FI_JPY", OBJPROP_YDISTANCE, 300);
//---- RSI
RSI_Trend ="";
RSI=iRSI("USDCHF",0,RSI_period,PRICE_CLOSE,0);
if((RSI > 50)) { RSI_Trend ="UP"; colt3 = LimeGreen; }
if((RSI < 50)) { RSI_Trend ="DOWN"; colt3 = Red; }
ObjectCreate("RSI_JPY", OBJ_LABEL, 0, 0, 0);
ObjectSetText("RSI_JPY",RSI_Trend,8, "Arial", colt3);
ObjectSet("RSI_JPY", OBJPROP_CORNER, 0);
ObjectSet("RSI_JPY", OBJPROP_XDISTANCE, 80);
ObjectSet("RSI_JPY", OBJPROP_YDISTANCE, 312);
Analysis ="";
Strength ="";
Trend="";
if(ADX_Trend=="UP"&&FI_Trend=="UP"&&RSI_Trend=="UP")
{Analysis="UP"; cola1=LimeGreen; Strength="[Strong]"; cola2=LimeGreen; Trend="BULLISH"; cola3=LimeGreen;}
if(ADX_Trend=="UP"&&FI_Trend=="UP"&&RSI_Trend=="DOWN")
{Analysis="UP"; cola1=LimeGreen; Strength="[Weak]"; cola2=Lime; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="UP"&&FI_Trend=="DOWN"&&RSI_Trend=="UP")
{Analysis="UP"; cola1=LimeGreen; Strength="[Weak]"; cola2=Lime; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="UP"&&FI_Trend=="DOWN"&&RSI_Trend=="DOWN")
{Analysis="DOWN"; cola1=Red; Strength="[Weak]"; cola2=Tomato; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="DOWN"&&FI_Trend=="DOWN"&&RSI_Trend=="DOWN")
{Analysis="DOWN"; cola1=Red; Strength="[Strong]"; cola2=Red; Trend="BEARISH"; cola3=Red;}
if(ADX_Trend=="DOWN"&&FI_Trend=="DOWN"&&RSI_Trend=="UP")
{Analysis="DOWN"; cola1=Red; Strength="[Weak]"; cola2=Tomato; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="DOWN"&&FI_Trend=="UP"&&RSI_Trend=="DOWN")
{Analysis="DOWN"; cola1=Red; Strength="[Weak]"; cola2=Tomato; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="DOWN"&&FI_Trend=="UP"&&RSI_Trend=="UP")
{Analysis="UP"; cola1=LimeGreen; Strength="[Weak]"; cola2=Lime; Trend="SIDEWAY"; cola3=Silver;}
ObjectCreate("Analysis_JPY", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Analysis_JPY",Analysis,8, "Arial", cola1);
ObjectSet("Analysis_JPY", OBJPROP_CORNER, 0);
ObjectSet("Analysis_JPY", OBJPROP_XDISTANCE, 80);
ObjectSet("Analysis_JPY", OBJPROP_YDISTANCE, 336);
ObjectCreate("Strength_JPY", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Strength_JPY",Strength,8, "Arial", cola2);
ObjectSet("Strength_JPY", OBJPROP_CORNER, 0);
ObjectSet("Strength_JPY", OBJPROP_XDISTANCE, 113);
ObjectSet("Strength_JPY", OBJPROP_YDISTANCE, 336);
ObjectCreate("Trend_JPY", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Trend_JPY",Trend,8, "Arial", cola3);
ObjectSet("Trend_JPY", OBJPROP_CORNER, 0);
ObjectSet("Trend_JPY", OBJPROP_XDISTANCE, 80);
ObjectSet("Trend_JPY", OBJPROP_YDISTANCE, 348);
//---- Trend Analysis USD/CAD
//---- ADX
ADX_Trend = "";
ADXP=iADX("USDCAD",0,ADX_period,PRICE_CLOSE,MODE_PLUSDI,0);
ADXM=iADX("USDCAD",0,ADX_period,PRICE_CLOSE,MODE_MINUSDI,0);
if ((ADXP > ADXM)) { ADX_Trend = "UP"; colt1 = LimeGreen; }
if ((ADXP < ADXM)) { ADX_Trend = "DOWN"; colt1 = Red; }
ObjectCreate("ADX_CAD", OBJ_LABEL, 0, 0, 0);
ObjectSetText("ADX_CAD",ADX_Trend,8, "Arial", colt1);
ObjectSet("ADX_CAD", OBJPROP_CORNER, 0);
ObjectSet("ADX_CAD", OBJPROP_XDISTANCE, 80);
ObjectSet("ADX_CAD", OBJPROP_YDISTANCE, 396);
//---- FI
FI_Trend ="";
FI=iForce("USDCAD",0,FI_period,1,PRICE_CLOSE,0);
if((FI > 0)) { FI_Trend ="UP"; colt2 = LimeGreen; }
if((FI < 0)) { FI_Trend ="DOWN"; colt2 = Red; }
ObjectCreate("FI_CAD", OBJ_LABEL, 0, 0, 0);
ObjectSetText("FI_CAD",FI_Trend,8, "Arial", colt2);
ObjectSet("FI_CAD", OBJPROP_CORNER, 0);
ObjectSet("FI_CAD", OBJPROP_XDISTANCE, 80);
ObjectSet("FI_CAD", OBJPROP_YDISTANCE, 408);
//---- RSI
RSI_Trend ="";
RSI=iRSI("USDCAD",0,RSI_period,PRICE_CLOSE,0);
if((RSI > 50)) { RSI_Trend ="UP"; colt3 = LimeGreen; }
if((RSI < 50)) { RSI_Trend ="DOWN"; colt3 = Red; }
ObjectCreate("RSI_CAD", OBJ_LABEL, 0, 0, 0);
ObjectSetText("RSI_CAD",RSI_Trend,8, "Arial", colt3);
ObjectSet("RSI_CAD", OBJPROP_CORNER, 0);
ObjectSet("RSI_CAD", OBJPROP_XDISTANCE, 80);
ObjectSet("RSI_CAD", OBJPROP_YDISTANCE, 420);
Analysis ="";
Strength ="";
Trend="";
if(ADX_Trend=="UP"&&FI_Trend=="UP"&&RSI_Trend=="UP")
{Analysis="UP"; cola1=LimeGreen; Strength="[Strong]"; cola2=LimeGreen; Trend="BULLISH"; cola3=LimeGreen;}
if(ADX_Trend=="UP"&&FI_Trend=="UP"&&RSI_Trend=="DOWN")
{Analysis="UP"; cola1=LimeGreen; Strength="[Weak]"; cola2=Lime; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="UP"&&FI_Trend=="DOWN"&&RSI_Trend=="UP")
{Analysis="UP"; cola1=LimeGreen; Strength="[Weak]"; cola2=Lime; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="UP"&&FI_Trend=="DOWN"&&RSI_Trend=="DOWN")
{Analysis="DOWN"; cola1=Red; Strength="[Weak]"; cola2=Tomato; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="DOWN"&&FI_Trend=="DOWN"&&RSI_Trend=="DOWN")
{Analysis="DOWN"; cola1=Red; Strength="[Strong]"; cola2=Red; Trend="BEARISH"; cola3=Red;}
if(ADX_Trend=="DOWN"&&FI_Trend=="DOWN"&&RSI_Trend=="UP")
{Analysis="DOWN"; cola1=Red; Strength="[Weak]"; cola2=Tomato; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="DOWN"&&FI_Trend=="UP"&&RSI_Trend=="DOWN")
{Analysis="DOWN"; cola1=Red; Strength="[Weak]"; cola2=Tomato; Trend="SIDEWAY"; cola3=Silver;}
if(ADX_Trend=="DOWN"&&FI_Trend=="UP"&&RSI_Trend=="UP")
{Analysis="UP"; cola1=LimeGreen; Strength="[Weak]"; cola2=Lime; Trend="SIDEWAY"; cola3=Silver;}
ObjectCreate("Analysis_CAD", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Analysis_CAD",Analysis,8, "Arial", cola1);
ObjectSet("Analysis_CAD", OBJPROP_CORNER, 0);
ObjectSet("Analysis_CAD", OBJPROP_XDISTANCE, 80);
ObjectSet("Analysis_CAD", OBJPROP_YDISTANCE, 444);
ObjectCreate("Strength_CAD", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Strength_CAD",Strength,8, "Arial", cola2);
ObjectSet("Strength_CAD", OBJPROP_CORNER, 0);
ObjectSet("Strength_CAD", OBJPROP_XDISTANCE, 113);
ObjectSet("Strength_CAD", OBJPROP_YDISTANCE, 444);
ObjectCreate("Trend_CAD", OBJ_LABEL, 0, 0, 0);
ObjectSetText("Trend_CAD",Trend,8, "Arial", cola3);
ObjectSet("Trend_CAD", OBJPROP_CORNER, 0);
ObjectSet("Trend_CAD", OBJPROP_XDISTANCE, 80);
ObjectSet("Trend_CAD", OBJPROP_YDISTANCE, 456);
//----
return(0);
}
//+------------------------------------------------------------------+
Comments