JaysjCandlepDisplay

Download script
Author: Oje Uadia
JaysjCandlepDisplay

Overview of Jay's Candle Display

This tool is designed as a visual dashboard for MetaTrader 4 that provides a real-time summary of price action across multiple timeframes simultaneously. Instead of forcing you to switch between different charts (like the 1-minute, 5-minute, or Daily charts) to see what the market is doing, this script gathers that information into one dedicated viewing window.

Key Functionalities

Multi-Timeframe Monitoring The script automatically tracks six specific timeframes: M1, M5, M30, H1, H4, and D1. It creates a organized layout where you can see the status of all these intervals at a single glance.

Price Movement Metrics For each of the timeframes listed, the tool calculates two primary pieces of information:

  • Body Value: This measures the difference between the "Opening" price and the "Closing" price of a candle. It essentially tells you the net movement of the price during that period.
    • If the price closed higher than it opened, the value is displayed in Red.
    • If the price closed lower than it opened, the value is displayed in Lime Green.
  • Swing Value: This measures the total range of the candle (the distance between the highest peak and the lowest valley reached). This provides a sense of the overall volatility or "swing" for that period, regardless of where the price ended up. These values are displayed in Medium Purple.

Visual Layout

The script organizes these metrics into a clean, professional dashboard:

  • Labels: It clearly identifies which numbers correspond to the "Body" and the "Swing."
  • Timeframe Headers: Each column is labeled with its corresponding timeframe (e.g., H1, D1) so you can easily orient yourself.
  • Dynamic Updates: The dashboard updates automatically as the market moves, ensuring that the pip values for every timeframe are always current.

How to Use This Information

This tool serves as a "market pulse" indicator. By looking at this display, a trader can quickly determine if the trend is consistent across different timeframes (e.g., seeing green "Body" values across all windows) or if there is a discrepancy between short-term price action and long-term trends. It simplifies market analysis by condensing complex data into a simplified, color-coded summary of price movement and volatility.

Price Data Components
Series array that contains open prices of each barSeries array that contains close prices for each barSeries array that contains the highest prices of each barSeries array that contains the lowest prices of each bar
2 Views
1 Downloads
0 Favorites
JaysjCandlepDisplay
//+------------------------------------------------------------------+
//|                                          Jays Candle Display.mq4 |
//|                                                        Oje Uadia |
//|                                         moneyinthesack@yahoo.com |
//+------------------------------------------------------------------+
#property copyright "Oje Uadia"
#property link      "moneyinthesack@yahoo.com"

#property indicator_separate_window
//---- input parameters
extern int candleshift=0;
extern color     swing_colour=MediumPurple;
extern color     body_colour=DarkOrchid;
string shortname= "Jays Candle Display";
int myspace;
string timetxt[6]={"M1","M5","M30","H1","H4","D1"}; //6
int times [6]={1,15,30,60,240,1440};
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
IndicatorShortName(shortname);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
  myspace= WindowFind(shortname);
   int    counted_bars=IndicatorCounted();
static bool alreadydrawn = false;
if (alreadydrawn==false)
{
//-------------------------------------------------------------------------------------------------------
// create body and swing
//-------------------------------------------------------------------------------------------------------
ObjectCreate("bodytxt",OBJ_LABEL,myspace,0,0,0,0,0,0);
ObjectSet("bodytxt",OBJPROP_XDISTANCE,10);
ObjectSet("bodytxt",OBJPROP_YDISTANCE,25);
ObjectSetText("bodytxt","Body",11,"Times New Roman",LightGoldenrod); //--done body--//

ObjectCreate("swingtxt",OBJ_LABEL,myspace,0,0,0,0,0,0);
ObjectSet("swingtxt",OBJPROP_XDISTANCE,10);
ObjectSet("swingtxt",OBJPROP_YDISTANCE,45);
ObjectSetText("swingtxt","SwinG",11,"Times New Roman",LightGoldenrod); //--done swing--//

//----------------------------------------------------------------------------------------------------
// cycle for timeframe texts
//---------------------------------------------------------------------------------------------------

for (int x=0;x<6;x++)
{
ObjectCreate("timenames"+x,OBJ_LABEL,myspace,0,0,0,0,0,0);
ObjectSet("timenames"+x,OBJPROP_XDISTANCE,(x*80)+100);
ObjectSet("timenames"+x,OBJPROP_YDISTANCE,14);
ObjectSetText("timenames"+x,timetxt[x],7,"Times New Roman",LightGoldenrod); 
}   //--done timeframes--//

//---------------------------------------------------------------------------------------------
// cycle for body pips
//---------------------------------------------------------------------------------------------

for (x=0;x<6;x++)
{
ObjectCreate("bodypips"+x,OBJ_LABEL,myspace,0,0,0,0,0,0);
ObjectSet("bodypips"+x,OBJPROP_XDISTANCE,(x*80)+100);
ObjectSet("bodypips"+x,OBJPROP_YDISTANCE,25);
ObjectSetText("bodypips"+x,CharToStr(54),9,"Wingdings",LightGoldenrod); 
} //--done body pips--//

//---------------------------------------------------------------------------------------------------
// cycle for swing pips
//--------------------------------------------------------------------------------------------------
for (x=0;x<6;x++)
{
ObjectCreate("swingpips"+x,OBJ_LABEL,myspace,0,0,0,0,0,0);
ObjectSet("swingpips"+x,OBJPROP_XDISTANCE,(x*80)+100);
ObjectSet("swingpips"+x,OBJPROP_YDISTANCE,45);
ObjectSetText("swingpips"+x,CharToStr(54),9,"Wingdings",LightGoldenrod); 
} //-- done swing pips--//


}//---- end of already drawn code


//--------------------------------------------------------------------------------------------------------
// main calculation section
//--------------------------------------------------------------------------------------------------------

for (x=0;x<6;x++)
{
double open = iOpen(Symbol(),times[x],candleshift);
double close = iClose(Symbol(),times[x],candleshift);
double top = iHigh(Symbol(),times[x],candleshift);
double bottom= iLow(Symbol(),times[x],candleshift);
double swingvalue = top - bottom;
double bodyvalue = open - close;
if (bodyvalue>0)
{
ObjectSetText("bodypips"+x,DoubleToStr(bodyvalue,Digits),9,"Times New Roman",Red);
}
else
if (bodyvalue<0)
{
ObjectSetText("bodypips"+x,DoubleToStr(MathAbs(bodyvalue),Digits),9,"Times New Roman",LimeGreen);
}


ObjectSetText("swingpips"+x,DoubleToStr(swingvalue,Digits),9,"Times New Roman",MediumPurple);

}//-- done main calculation--//
   return(0);
  }
//+------------------------------------------------------------------+

Comments