OHLC

This tool is designed to provide traders with a quick and clear summary of price action by displaying key performance statistics directly on the trading chart. Rather than cluttering your screen with complex graphs, it focuses on delivering high-level data points that help you understand the current market environment at a glance.

How it Works

The script automatically identifies and retrieves four essential price metrics for two specific timeframes: Yesterday and Today. These metrics are the "OHLC" values—Open, High, Low, and Close.

For each of these periods, the tool calculates and displays the following information:

  • Open: The price at which the market started.
  • High: The maximum price reached during that timeframe.
  • Low: The minimum price reached during that timeframe.
  • Close: The final price recorded at the end of the period.
  • Range: A calculated value showing the total distance between the highest and lowest prices, expressed in points.

Key Benefits for Traders

By presenting this data in a simplified text format on your screen, the tool eliminates the need to manually scroll back through historical charts to find previous prices. It allows you to:

  1. Compare Volatility: Easily see how much price movement occurred yesterday compared to today by looking at the "Range" figures.
  2. Identify Support and Resistance: Quickly note the highs and lows of the previous day to identify significant price levels where the market might react.
  3. Monitor Current Progress: Track today's progress against yesterday's benchmarks to determine if the current market trend is expanding or contracting.

In essence, this script serves as a real-time dashboard, providing a snapshot of the market's "footprint" so you can make more informed decisions based on historical context.

Price Data Components
Series array that contains open prices of each barSeries array that contains the highest prices of each barSeries array that contains the lowest prices of each barSeries array that contains close prices for each bar
14 Views
0 Downloads
0 Favorites
OHLC
/*-----------------------------+
|			       |
| Shared by www.Aptrafx.com    |
|			       |
+------------------------------*/

//+------------------------------------------------------------------+
//|                                                       OHLC       |
//|                                    Copyright © 2006, Robert Hill |
//|                                       http://www.metaquotes.net/ |
//|                                                                  |
//|                                                                  |
//+------------------------------------------------------------------+
#property  copyright "Copyright © 2006, Robert Hill "
#property  link      "http://www.metaquotes.net/"

//---- indicator settings
#property  indicator_chart_window


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
  
   return(0);
  }

int start()
{
Comment("Yesterdays ",
        "O: " + DoubleToStr(iOpen(Symbol(), 1440, 1),Digits),
        ", H: " + DoubleToStr(iHigh(Symbol(), 1440, 1),Digits),
        ", L: " + DoubleToStr(iLow(Symbol(), 1440, 1),Digits),
        ", C: " + DoubleToStr(iClose(Symbol(), 1440, 1),Digits),
        " Range = " + DoubleToStr( (iHigh(Symbol( ), 1440, 1) - iLow(Symbol( ), 1440, 1) ) / Point,0),"\n",
        "Todays ",
        "O: " + DoubleToStr(iOpen(Symbol(), 1440, 0),Digits),
        ", H: " + DoubleToStr(iHigh(Symbol(), 1440, 0),Digits),
        ", L: " + DoubleToStr(iLow(Symbol(), 1440, 0),Digits),
        ", C: " + DoubleToStr(iClose(Symbol(), 1440, 0),Digits),
        " Range = " + DoubleToStr( (iHigh(Symbol( ), 1440, 0) - iLow(Symbol( ), 1440, 0) ) / Point,0),"\n");
        
      return(0);
  }
//+------------------------------------------------------------------+


Comments