Author: Copyright � 2007, MetaQuotes Software Corp.
MT Window

This script is a foundational framework for a custom technical analysis tool designed to run on the MetaTrader platform. While it currently serves as a structural template, its primary purpose is to establish a dedicated visual workspace independent of the main price chart.

Core Functionality

The script is configured to generate a separate window on your trading interface. Unlike standard indicators that overlay directly onto the candles or bars (such as moving averages), this tool is designed to occupy its own distinct pane at the bottom or top of the screen. This allows for the visualization of specific data points without cluttering the primary price action.

Operational Logic

The logic follows a standard three-step lifecycle common in professional trading software:

  • Initialization: When you first load the tool, the script runs an initial setup sequence. This is where the environment is prepared to receive data and define how the indicator should behave.
  • Deinitialization: This handles the "cleanup" process. When you remove the tool or switch charts, it ensures that all active processes are closed properly to maintain platform stability.
  • Dynamic Iteration: The script includes a continuous loop designed to update in real-time. It tracks the number of historical bars on the chart and prepares the framework to calculate and display new information as each new price tick arrives.

Summary for Users

In its current state, this script acts as a "blank canvas." It provides the necessary architecture for a custom visual indicator, ensuring that any future data or calculations added will be displayed in their own dedicated space, keeping your main trading view clean and organized.

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

#property indicator_separate_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();
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments