Multi_Indic

Download script
Author: Copyright � 2010, MetaQuotes Software Corp.
Multi_Indic

This script is designed for the MetaTrader 4 platform to act as a consolidated visual dashboard. Its primary purpose is to gather data from multiple different technical indicators and display them simultaneously in a single, organized window on your trading chart.

Core Functionality

Instead of having to open several separate windows to track different market signals—which can clutter your workspace and make it difficult to see the "big picture"—this script pulls that information into one view. It creates five distinct visual lines, each representing data from a specific technical indicator you choose to monitor.

Key Features and Logic:

  • Multi-Indicator Integration: The logic is built to fetch data from external indicators. By using a unified "bridge," the script reads values from different sources and maps them onto the same viewing area.
  • Customizable Visibility: The script includes specific settings for timeframes and bar counts. This allows you to control how much historical data is displayed on your screen, ensuring the chart remains readable and relevant to your current trading strategy.
  • Visual Organization: Each of the five indicators is assigned its own unique color (ranging from Yellow and Dark Orange to Red, Dark Violet, and Maroon). This color-coding allows you to instantly distinguish between different data streams at a glance.
  • Automatic Data Processing: The script automatically calculates the positioning of these lines based on the history available in your market feed. It ensures that the data points are aligned correctly with the candles on your chart, providing a synchronized view of market momentum or volatility across all selected metrics.

How it Benefits the Trader:

By consolidating multiple technical analyses into one visual space, this tool simplifies the decision-making process. It allows you to observe the correlation between different indicators in real-time, helping you identify stronger signals where multiple indicators align, while reducing the visual noise typically associated with complex trading setups.

Miscellaneous
Implements a curve of type %1
3 Views
0 Downloads
0 Favorites
Multi_Indic
//+------------------------------------------------------------------+
//|                                                  Multi_Indic.mq4 |
//|                      Copyright © 2010, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_separate_window

#property indicator_buffers 5

#property indicator_color1 Yellow
#property indicator_color2 DarkOrange
#property indicator_color3 Red
#property indicator_color4 DarkViolet
#property indicator_color5 Maroon

extern int TimeFrame  =0;
extern int TimeFrame1 =0;
extern int TimeFrame2 =0;
extern int TimeFrame3 =0;
extern int TimeFrame4 =0;
extern int CountBars  =10000;
extern int x_prd      =0;
//---- buffers
double Multi_Indic[];
double Multi_Indic1[];
double Multi_Indic2[];
double Multi_Indic3[];
double Multi_Indic4[];
string short_name;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+

int init() {

//---- name for DataWindow and indicator subwindow label 
    short_name = "Multi_Indic("+TimeFrame+")";
    IndicatorShortName(short_name);
    IndicatorBuffers(5);
    SetIndexBuffer(0,Multi_Indic);   
    SetIndexStyle(0,DRAW_LINE,0,1);
    SetIndexBuffer(1,Multi_Indic1);
    SetIndexStyle(1,DRAW_LINE,0,1);
    SetIndexBuffer(2,Multi_Indic2);
    SetIndexStyle(2,DRAW_LINE,0,1);
    SetIndexBuffer(3,Multi_Indic3);
    SetIndexStyle(3,DRAW_LINE,0,1);
    SetIndexBuffer(4,Multi_Indic4);
    SetIndexStyle(4,DRAW_LINE,0,1);    
//----
   return (0);
}
int deinit() {
   return (0);
}
//+------------------------------------------------------------------+
//| Skid                                                           |
//+------------------------------------------------------------------+
int start()
  {
   if (CountBars>=Bars) CountBars=Bars;
   SetIndexDrawBegin(0,Bars-CountBars);
   SetIndexDrawBegin(1,Bars-CountBars);
   SetIndexDrawBegin(2,Bars-CountBars);
   SetIndexDrawBegin(3,Bars-CountBars);
   SetIndexDrawBegin(4,Bars-CountBars);
   int i, ii,iii,iiii,iiiii ,counted_bars=IndicatorCounted();

   double t_prd;
//----
   if(Bars<=x_prd) return(0);
//---- initial zero
   if(counted_bars<x_prd)
   {
      for(i=1;i<=x_prd;i++) Multi_Indic[CountBars-i]=0.0;
      for(ii=1;ii<=x_prd;ii++) Multi_Indic1[CountBars-ii]=0.0;
      for(iii=1;iii<=x_prd;iii++) Multi_Indic2[CountBars-iii]=0.0;
      for(iiii=1;iiii<=x_prd;iiii++) Multi_Indic3[CountBars-iiii]=0.0;
      for(iiiii=1;iiiii<=x_prd;iiiii++) Multi_Indic4[CountBars-iiiii]=0.0;      
   }
//----
   i=CountBars-x_prd-1;
   ii=CountBars-x_prd-1;
   iii=CountBars-x_prd-1;
   iiii=CountBars-x_prd-1;
   iiiii=CountBars-x_prd-1;
   
   t_prd=x_prd/2+1;

   while(i>=0)
   while(ii>=0)
   while(iii>=0)
   while(iiii>=0)
   while(iiiii>=0)   
     {
     Multi_Indic[i]=((iCustom(NULL, 0, "Indicators_Name", 0, 0, 0, i)  )) ; // CHANGE Indicators Name here
     Multi_Indic1[ii]=((iCustom(NULL, 0, "Indicators_Name", 0, 0, 0, ii)  )) ;// CHANGE Indicators Name here
     Multi_Indic2[iii]=((iCustom(NULL, 0, "Indicators_Name", 0, 0, 0, iii)  )) ;// CHANGE Indicators Name here
     Multi_Indic3[iiii]=((iCustom(NULL, 0, "Indicators_Name", 0, 0, 0, iiii)  )) ;// CHANGE Indicators Name here
     Multi_Indic4[iiiii]=((iCustom(NULL, 0, "Indicators_Name", 0, 0, 0, iiiii)  )) ;  // CHANGE Indicators Name here   

      i--;
      ii--;
      iii--;
      iiii--;
      iiiii--;     
     }
     
   return(0);
  }
  
//+------------------------------------------------------------------+  

Comments