km-trend_movers
Download scriptThe KM-TREND MOVERS is a comprehensive market analysis tool designed to provide traders with a real-time visual dashboard of various technical indicators. Instead of forcing you to monitor multiple separate windows or charts, this script consolidates critical market data into a single, easy-to-read text display directly on your main trading screen.
How the Logic Works
The core purpose of this tool is twofold: it provides Live Data Monitoring for various technical oscillators and Trend Decision Logic based on moving averages.
1. Real-Time Indicator Dashboard
The script constantly calculates and displays the current values for six major technical indicators. This allows you to see the "heartbeat" of the market at a glance:
- RSI (Relative Strength Index): Helps identify whether an asset is overbought or oversold.
- ATR (Average True Range): Measures market volatility, showing how much the price is moving on average.
- Stochastic Oscillator: Assists in identifying momentum and potential reversal points.
- MACD (Moving Average Convergence Divergence): Tracks the relationship between two moving averages to reveal trend strength.
- CCI (Commodity Channel Index): Identifies new trends by measuring price deviations from an average.
- Moving Averages: The script tracks two specific types of moving averages (Fast and Slow) to determine the primary direction of the market.
2. Automated Trend Analysis
Beyond just showing numbers, the script contains a built-in logic engine that interprets the relationship between the current price and its moving averages to provide immediate actionable signals:
- Strong Buy: Triggered when the current price is positioned above both the fast and slow moving averages, suggesting a powerful upward trend.
- Weak Buy Signal: Triggered when the price is above the fast average but below the slow average, suggesting upward movement that may still be hesitant or developing.
- Strong Sell: Triggered when the current price is positioned below both moving averages, suggesting a powerful downward trend.
- Weak Sell Signal: Triggered when the price is below the fast average but above the slow average, suggesting downward movement with some remaining resistance.
- Neutral/Wait: If the price does not clearly break these boundaries, the tool advises you to wait for a more definitive market decision.
Summary for Traders
This tool acts as a central command center. By consolidating these complex calculations into simple text labels, it removes the clutter from your workspace, allowing you to monitor volatility, momentum, and trend strength simultaneously while receiving clear visual cues on whether the market is currently favoring a "Buy" or "Sell" direction.
//+------------------------------------------------------------------+
//| KM-TREND MOVERS.mq4 |
//| Khurram Mustafa |
//| https://www.mql5.com/en/users/kc1981 |
//+------------------------------------------------------------------+
#property copyright "KM"
#property link "https://www.mql5.com/en/users/kc1981/seller"
#property version "1.0"
#property description "TREND MOVERS"
#property strict
#property indicator_chart_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
input color Colour = Black;
input string Setting1 = "Moving Average";
input int MA_fast = 6;
input int MA_slow = 25;
input int MA_shift_fast = 0;
input int MA_shift_slow = 0;
input string Setting2 = "RSI";
input int Period2 = 14;
input string Setting3 = "ATR";
input int Period3 = 14;
input string Setting4="STOCHISTIC";
input int Period4K = 9;
input int Period4D = 3;
input int Period4S = 3;
input string Setting5 = "MACD";
input int EFast = 12;
input int ESlow = 26;
input int EPeriod = 9;
input string Setting6 = "CCI";
input int Period5 = 14;
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int init()
{
return(0);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int deinit()
{
ObjectsDeleteAll();
Comment("");
return(0);
}
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
int start()
{
double rsilevel=iRSI(Symbol(),0,Period2,0,0);
ObjectCreate("textrsi",OBJ_LABEL,0,0,0,0,0);
ObjectSet("textrsi",OBJPROP_CORNER,1);
ObjectSet("textrsi",OBJPROP_XDISTANCE,50);
ObjectSet("textrsi",OBJPROP_YDISTANCE,80);
ObjectSetText("textrsi","RSI LEVEL "+IntegerToString(Period2,0)+" : "+DoubleToStr(rsilevel,2),10,"Times New Roman",Colour);
double atrlevel=iATR(Symbol(),0,Period3,0);
ObjectCreate("textatr",OBJ_LABEL,0,0,0,0,0);
ObjectSet("textatr",OBJPROP_CORNER,1);
ObjectSet("textatr",OBJPROP_XDISTANCE,50);
ObjectSet("textatr",OBJPROP_YDISTANCE,100);
ObjectSetText("textatr","ATR LEVEL "+IntegerToString(Period3,0)+" : "+DoubleToString(atrlevel,5),10,"Times New Roman",Colour);
double stolevel=iStochastic(Symbol(),0,Period4K,Period4D,Period4S,0,0,MODE_EMA,0);
ObjectCreate("textsto",OBJ_LABEL,0,0,0,0,0);
ObjectSet("textsto",OBJPROP_CORNER,1);
ObjectSet("textsto",OBJPROP_XDISTANCE,50);
ObjectSet("textsto",OBJPROP_YDISTANCE,120);
ObjectSetText("textsto","STOCHISTIC LEVEL "+IntegerToString(Period4K,0)+" : "+DoubleToString(stolevel,2),10,"Times New Roman",Colour);
double macdlevel=iMACD(Symbol(),0,EFast,ESlow,EPeriod,0,MODE_EMA,0);
ObjectCreate("textmacd",OBJ_LABEL,0,0,0,0,0);
ObjectSet("textmacd",OBJPROP_CORNER,1);
ObjectSet("textmacd",OBJPROP_XDISTANCE,50);
ObjectSet("textmacd",OBJPROP_YDISTANCE,140);
ObjectSetText("textmacd","MACD LEVEL "+IntegerToString(EPeriod,0)+" : "+DoubleToString(macdlevel,5),10,"Times New Roman",Colour);
double ccilevel=iCCI(Symbol(),0,Period5,0,0);
ObjectCreate("textcci",OBJ_LABEL,0,0,0,0,0);
ObjectSet("textcci",OBJPROP_CORNER,1);
ObjectSet("textcci",OBJPROP_XDISTANCE,50);
ObjectSet("textcci",OBJPROP_YDISTANCE,160);
ObjectSetText("textcci","CCI LEVEL "+IntegerToString(Period5,0)+" : "+DoubleToStr(ccilevel,2),10,"Times New Roman",Colour);
double h15 =iMA( NULL,0,MA_fast, MA_shift_fast,MODE_EMA,PRICE_CLOSE,0);
double h120=iMA( NULL,0,MA_slow, MA_shift_slow,MODE_SMA,PRICE_CLOSE,0);
ObjectCreate("texti",OBJ_LABEL,0,0,0,0,0);
ObjectSet("texti",OBJPROP_CORNER,1);
ObjectSet("texti",OBJPROP_XDISTANCE,50);
ObjectSet("texti",OBJPROP_YDISTANCE,60);
ObjectSetText("texti","TEST",10,"Times New Roman",Colour);
if(iClose(Symbol(),0,0)>h15 && iClose(Symbol(),0,0)>h120)
{
ObjectSetText("texti","STRONG BUY",10,"Times New Roman",DarkGreen);
}
else if(iClose(Symbol(),0,0)>h15 && iClose(Symbol(),0,0)<h120)
{
ObjectSetText("texti","WEAK BUY SIGNAL,WAIT OR BUY!",10,"Times New Roman",Green);
}
else if(iClose(Symbol(),0,0)<h15 && iClose(Symbol(),0,0)<h120)
{
ObjectSetText("texti","STRONG SELL",10,"Times New Roman",Red);
}
else if(iClose(Symbol(),0,0)<h15 && iClose(Symbol(),0,0)>h120)
{
ObjectSetText("texti","WEAK SELL SIGNAL,WAIT OR SELL!",10,"Times New Roman",Red);
}
else
{
ObjectSetText("texti","PLEASE WAIT FOR RIGHT DECISION",10,"Times New Roman",Black);
}
return(0);
}
//+---------------------------------------------------------------+
Comments