wajdyss_H_L_C_indicator_v2
Download scriptThis tool is designed as an informative on-screen display for MetaTrader users who need to keep a constant eye on key daily price levels. Rather than drawing complex lines across your chart, it functions as a dynamic information dashboard that automatically updates the current day's statistics in real-time.
Core Functionality
The primary purpose of this script is to provide instant visibility into three critical price points for the current trading day:
- Today's High: The highest price reached during the current daily session.
- Today's Low: The lowest price reached during the current daily session.
- Today's Close: The most recent closing price of the current daily period.
How it Works for the User
- Automatic Monitoring: The script scans the market data to identify the high, low, and close prices specifically for the "Daily" timeframe (D1).
- Dynamic Display: Instead of you having to manually search through historical data or switch charts to find these numbers, the script extracts them automatically and displays them as clear text labels on your main viewing window.
- Timeframe Compatibility: The tool is optimized for use on intraday charts (timeframes smaller than one day). It intelligently checks your current view; if you are looking at a weekly or monthly chart, the display will remain inactive to ensure data accuracy.
- Visual Organization: The information is presented in a structured list with distinct colors for each value. This allows traders to quickly distinguish between the high and low points at a glance, helping with support and resistance identification during active trading.
Summary of Benefits
By using this script, you eliminate the need to manually calculate or track daily price extremes. It provides a "live scoreboard" of the day's price action, allowing for faster decision-making and a cleaner chart layout by keeping essential data points visible in a fixed position on your screen.
//+------------------------------------------------------------------+
//| wajdyss_H_L_C_indicator.mq4 |
//| Copyright 2008 Wajdyss |
//| wajdyss@yahoo.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2008 Wajdyss"
#property link "wajdyss@yahoo.com"
#property indicator_chart_window
extern int TextSize=14;
extern color TextColor1=Black;
extern color TextColor2=Red;
extern color TextColor3=Blue;
extern color TextColor4=Black;
extern color TextColor5=Chartreuse;
extern color TextColor6=DodgerBlue;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
Comment("");
ObjectDelete("a label");
ObjectDelete("b label");
ObjectDelete("c label");
ObjectDelete("d label");
ObjectDelete("e label");
ObjectDelete("f label");
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
double H=iHigh(Symbol(),PERIOD_D1,0);
int H2=H;
//a
if(ObjectFind("a label") != 0)
{
ObjectCreate("a label", OBJ_LABEL, 0,0,0);
ObjectSetText("a label","ÈÓã Çááå ÇáÑÍãä ÇáÑÍíã" , TextSize, "Arial", TextColor1);
ObjectSet("a label", OBJPROP_XDISTANCE,350);
ObjectSet("a label", OBJPROP_YDISTANCE,0);
}
else
{
ObjectMove("a label", 0, 0,0);
}
//b
if(ObjectFind("b label") != 0)
{
ObjectCreate("b label", OBJ_LABEL, 0,0,0);
ObjectSetText("b label","wajdyss_H_L_C_indicator" , TextSize, "Arial", TextColor2);
ObjectSet("b label", OBJPROP_XDISTANCE,315);
ObjectSet("b label", OBJPROP_YDISTANCE,25);
}
else
{
ObjectMove("b label", 0, 0,0);
}
// c
if(ObjectFind("c label") != 0)
{
ObjectCreate("c label", OBJ_LABEL, 0,0,0);
ObjectSetText("c label","wajdyss@yahoo.com" , TextSize, "Arial", TextColor3);
ObjectSet("c label", OBJPROP_XDISTANCE,335);
ObjectSet("c label", OBJPROP_YDISTANCE,50);
}
else
{
ObjectMove("c label", 0, 0,0);
}
if (Period()>1440) return(0);
ObjectDelete("d label");
ObjectCreate("d label", OBJ_LABEL, 0,0,0);
ObjectSetText("d label","today high = "+DoubleToStr(iHigh(Symbol(),PERIOD_D1,0),Digits) , TextSize, "Arial", TextColor4);
ObjectSet("d label", OBJPROP_XDISTANCE,340);
ObjectSet("d label", OBJPROP_YDISTANCE,75);
ObjectDelete("e label");
ObjectCreate("e label", OBJ_LABEL, 0,0,0);
ObjectSetText("e label","today low = "+DoubleToStr(iLow(Symbol(),PERIOD_D1,0),Digits) , TextSize, "Arial", TextColor5);
ObjectSet("e label", OBJPROP_XDISTANCE,345);
ObjectSet("e label", OBJPROP_YDISTANCE,100);
ObjectDelete("f label");
ObjectCreate("f label", OBJ_LABEL, 0,0,0);
ObjectSetText("f label","today close = "+DoubleToStr(iClose(Symbol(),PERIOD_D1,0),Digits) , TextSize, "Arial", TextColor6);
ObjectSet("f label", OBJPROP_XDISTANCE,340);
ObjectSet("f label", OBJPROP_YDISTANCE,125);
return(0);
}
Comments