Author: mog
hemnina_v1

This script functions as a real-time data monitoring tool designed to provide a clear, snapshot overview of recent price activity on a trading chart. Instead of generating complex visual signals or automated trades, its primary purpose is to display the exact closing prices of the most recent eleven bars (candlesticks) directly on your screen.

How it works:

The logic follows a straightforward sequential process to ensure you have immediate access to historical price points:

  • Data Collection: The script automatically identifies and captures the final closing price for each of the last 11 completed and current bars on your chart.
  • Sequential Tracking: It organizes these prices in descending order, starting from ten bars ago (the older data) and moving forward to the very latest active bar (the current price).
  • Real-Time Display: Rather than requiring you to manually click through history or hover over individual candles, the script compiles all eleven values into a centralized text list. This information is displayed as a "Comment" on the chart area, providing a quick-reference summary of the recent price trend.

Key Benefit:

For a trader, this tool serves as a live dashboard. It eliminates the need to manually track the closing numbers of previous candles, allowing you to see the progression of price movements at a glance. By presenting these values side-by-side, it helps in quickly observing how the market has transitioned from its position ten bars ago to where it stands right now.

Price Data Components
Series array that contains close prices for each bar
15 Views
0 Downloads
0 Favorites
hemnina_v1
//+------------------------------------------------------------------+
//|                                                     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