Test_StochHisto

Download script
Author: Copyright � 2007, MetaQuotes Software Corp.
Test_StochHisto

This script is designed to function as an automated data monitor for the MetaTrader trading platform. Its primary objective is to retrieve specific real-time information from a secondary technical indicator and display it directly on your trading chart for easier observation.

How the Logic Works

1. Data Retrieval The core functionality of this tool revolves around connecting with an external custom indicator known as "StochHistogram." Instead of calculating complex math itself, the script acts as a bridge, reaching out to this specific indicator to pull three distinct data points simultaneously. These points represent different components of the Stochastic Histogram:

  • Green Component: The first data value.
  • Red Component: The second data value.
  • Line Component: The third data value.

2. Real-Time Monitoring The script is programmed to run continuously. Every time the market updates, it automatically fetches the most recent values for these three components based on predefined settings (such as specific periods and levels). This ensures that the information you see is always synchronized with the current price movement.

3. Visual Output Rather than requiring you to click through different menus or look at multiple separate windows, the script simplifies the user experience by consolidating this data into a single text summary. It takes the three values it retrieved and prints them as a clear, readable string in the upper left corner of your trading screen.

Summary for the User

In simple terms, this tool eliminates the need to constantly check multiple indicator lines to see the status of the Stochastic Histogram. It automatically "reads" the most important figures from that indicator and provides you with a live text update on your main chart, allowing you to monitor these specific market signals at a single glance.

12 Views
0 Downloads
0 Favorites
Test_StochHisto
//+------------------------------------------------------------------+
//|                                                         Test.mq4 |
//|                      Copyright © 2007, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2007, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"


//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----

  int MACD_Result;
  string MACD_Display;

  int FastEMA=12, SlowEMA=20,SignalPeriod=9; 

   double Stoch_Cur_gr    =iCustom(NULL,0,"StochHistogram",14,3,3,1,0); 
   double Stoch_Cur_rd    =iCustom(NULL,0,"StochHistogram",14,3,3,3,0); 
   double Stoch_Cur_Line  =iCustom(NULL,0,"StochHistogram",14,3,3,2,0); 
  
   
  Comment ( "Stoch Histo = ", Stoch_Cur_gr, "/", Stoch_Cur_rd,"/", Stoch_Cur_Line);

  return(0);


}

//+------------------------------------------------------------------+

Comments