Author: mog
hemnina

This tool is designed as a real-time monitoring utility for MetaTrader users who need to keep a constant eye on specific historical price data. Instead of requiring the user to manually scan through previous candles or navigate through complex menus, this script automatically extracts and displays key information directly on the main chart window.

How it Works

The logic of the script is centered around tracking the Closing Prices of the most recent 11 candles (including the one currently forming). Specifically, it identifies the exact price at which each of these candles finished trading:

  • It captures the price data from the 10 preceding completed candles.
  • It captures the price of the most recently completed candle (the "previous" candle).
  • It captures the live price of the current, active candle.

Data Presentation

Rather than generating complex shapes, lines, or visual alerts, this script functions as a Live Information Dashboard. It takes all these individual data points and organizes them into a clean, vertical list displayed as a text comment on your screen.

When you load this tool, you will see a formatted list showing the closing values for every one of those 11 positions (labeled from Close[0] to Close[10]). This allows traders to instantly verify price levels and historical movements at a glance, providing a quick reference point for analysis without cluttering the visual workspace.

Price Data Components
Series array that contains close prices for each bar
16 Views
0 Downloads
0 Favorites
hemnina
//+------------------------------------------------------------------+
//|                                                      hemnina.mq4 |
//|                                                              mog |
//|                                                                  |
//+------------------------------------------------------------------+
#property copyright "mog"
#property link      ""
//----
#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();
   double p10;
   double p9;
   double p8;
   double p7;
   double p6;
   double p5;
   double p4;
   double p3;
   double p2;
   double p1;
   double p0;
//-----
   p10=iClose(0,0,10);
   p9=iClose(0,0,9);
   p8=iClose(0,0,8);
   p7=iClose(0,0,7);
   p6=iClose(0,0,6);
   p5=iClose(0,0,5);
   p4=iClose(0,0,4);
   p3=iClose(0,0,3);
   p2=iClose(0,0,2);
   p1=iClose(0,0,1);
   p0=iClose(0,0,0);
//----
   Comment("Close[10] = ",p10,
           "\nClose[9] = ",p9,
           "\nClose[8] = ",p8,
           "\nClose[7] = ",p7,
           "\nClose[6] = ",p6,
           "\nClose[5] = ",p5,
           "\nClose[4] = ",p4,
           "\nClose[3] = ",p3,
           "\nClose[2] = ",p2,
           "\nClose[1] = ",p1,
           "\nClose[0] = ",p0);
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments