Author: Copyright � 2010, basisforex@gmail.com
BB_Support

This tool is designed for traders who need to visualize multiple timeframes simultaneously on a single chart. Instead of forcing you to switch back and forth between different time periods—like moving from a 1-minute view to a daily view—this script overlays the technical boundaries of four different timeframes (1 Minute, 5 Minutes, 1 Hour, and Daily) onto your current screen at once.

How It Works

The logic centers on a popular technical analysis tool known as Bollinger Bands. These bands act as dynamic "envelopes" that show price volatility and potential support or resistance levels. The script calculates the upper and lower boundaries for four distinct timeframes:

  • M1 (1 Minute)
  • M5 (5 Minutes)
  • H1 (1 Hour)
  • D1 (Daily)

Key Features

  • Multi-Timeframe Synchronization: The script performs complex calculations in the background to align data from larger timeframes (like the Daily chart) with your smaller timeframe (the 1-Minute chart). It ensures that even though you are looking at "fast" price movements, you can see where the "slow" trends are heading.
  • Visual Support and Resistance: By plotting both the upper and lower bands for all four periods, the indicator provides a visual map of market "zones." This allows traders to identify areas where the price might be overextended or where it may find significant support.
  • Strict Environment Control: To maintain accuracy, the script is specifically designed to run on the 1-Minute chart. If it is opened on any other timeframe, it will notify you, ensuring that the visual data remains consistent and reliable for your analysis.

Practical Use

By using this indicator, a trader can get a "bird's eye view" of the market. You can see exactly how the immediate price action (1 Minute) relates to the broader market structure (Daily), helping to identify high-probability entry points where multiple timeframes align.

Indicators Used
Bollinger bands indicator
Miscellaneous
Implements a curve of type %1
14 Views
0 Downloads
0 Favorites
BB_Support
/*------------------------------------------------------------------+
 |                                               BB_Support.mq4.mq4 |
 |                                                 Copyright © 2010 |
 |                                             basisforex@gmail.com |
 +------------------------------------------------------------------*/
#property copyright "Copyright © 2010, basisforex@gmail.com"
#property link      "basisforex@gmail.com"
//-----
#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 White
#property indicator_color2 Yellow
#property indicator_color3 Blue
#property indicator_color4 Black
#property indicator_color5 White
#property indicator_color6 Yellow
#property indicator_color7 Blue
#property indicator_color8 Black
//-----
extern int        M1Period    = 20;
extern int        M1Deviation = 2;
extern int        M5Period    = 20;
extern int        M5Deviation = 2;
extern int        H1Period    = 20;
extern int        H1Deviation = 2;
extern int        D1Period    = 20;
extern int        D1Deviation = 2;
//-----
extern int        MaShift     = 0;
extern int        PRICE_Ma    = 6;
//-----
double M1up[];
double M5up[];
double H1up[];
double D1up[];
double M1dn[];
double M5dn[];
double H1dn[];
double D1dn[];
//+------------------------------------------------------------------+
int init()
 {
   SetIndexShift(0, MaShift);
   SetIndexShift(1, MaShift);
   SetIndexShift(2, MaShift);
   SetIndexShift(3, MaShift);
   SetIndexShift(4, MaShift);
   SetIndexShift(5, MaShift);
   SetIndexShift(6, MaShift);
   SetIndexShift(7, MaShift);
   //-----
   SetIndexBuffer(0, M1up);
   SetIndexBuffer(1, M5up);
   SetIndexBuffer(2, H1up);
   SetIndexBuffer(3, D1up);
   SetIndexBuffer(4, M1dn);
   SetIndexBuffer(5, M5dn);
   SetIndexBuffer(6, H1dn);
   SetIndexBuffer(7, D1dn);
   //-----
   SetIndexStyle(0, DRAW_LINE);
   SetIndexStyle(1, DRAW_LINE);
   SetIndexStyle(2, DRAW_LINE);
   SetIndexStyle(3, DRAW_LINE);
   SetIndexStyle(4, DRAW_LINE);
   SetIndexStyle(5, DRAW_LINE);
   SetIndexStyle(6, DRAW_LINE);
   SetIndexStyle(7, DRAW_LINE);
   //-----
   SetIndexLabel(0, "M1up");
   SetIndexLabel(1, "M5up");
   SetIndexLabel(2, "H1up");
   SetIndexLabel(3, "D1up");
   SetIndexLabel(4, "M1dn");
   SetIndexLabel(5, "M5dn");
   SetIndexLabel(6, "H1dn");
   SetIndexLabel(7, "D1dn");
   //-----
   return(0);
 }
//+------------------------------------------------------------------+
int start()
 {
   if (Period() != 1)
    {
		Comment("Not a right Period!!!   It should be M1");
		return(0);	
	 }
   int limit;
   int counted_bars = IndicatorCounted();
   if(counted_bars < 0) return(-1);
   if(counted_bars > 0) counted_bars--;
   limit = Bars - counted_bars;
   for(int i = 0; i < limit; i++)
    {
      M1up[i]   = iBands(NULL, PERIOD_M1, M1Period, M1Deviation, 0, PRICE_Ma, MODE_UPPER, i);
      M5up[i]   = iBands(NULL, PERIOD_M5, M5Period, M5Deviation, 0, PRICE_Ma, MODE_UPPER, i / PERIOD_M5);
      H1up[i]   = iBands(NULL, PERIOD_H1, H1Period, H1Deviation, 0, PRICE_Ma, MODE_UPPER, i / PERIOD_H1);
      D1up[i]   = iBands(NULL, PERIOD_D1, D1Period, D1Deviation, 0, PRICE_Ma, MODE_UPPER, i / PERIOD_D1);
      //-----
      M1dn[i]  = iBands(NULL, PERIOD_M1, M1Period, M1Deviation, 0, PRICE_Ma, MODE_LOWER, i);
      M5dn[i]  = iBands(NULL, PERIOD_M5, M5Period, M5Deviation, 0, PRICE_Ma, MODE_LOWER, i / PERIOD_M5);
      H1dn[i]  = iBands(NULL, PERIOD_H1, H1Period, H1Deviation, 0, PRICE_Ma, MODE_LOWER, i / PERIOD_H1);
      D1dn[i]  = iBands(NULL, PERIOD_D1, D1Period, D1Deviation, 0, PRICE_Ma, MODE_LOWER, i / PERIOD_D1);
    }  
   //-----
   return(0);
 }
//+------------------------------------------------------------------+

Comments