Accrete_5mTunnel
Download scriptThe Accrete 5 Minute Tunnel is a visual trading tool designed to help market participants identify price trends and potential entry zones by analyzing historical price data through several layers of moving averages. Rather than looking at a single price point, this script creates a "tunnel" or corridor on your chart, providing a multi-dimensional view of where the market is currently positioned relative to its recent history.
How the Logic Works
The core functionality of this tool relies on calculating eight distinct mathematical averages simultaneously. These are categorized into three primary roles:
1. Long-Term Trend Analysis (The Outer Framework) The script utilizes three expansive moving averages (based on periods of 169, 144, and 55). By tracking these larger price cycles, the tool establishes the "big picture" direction of the market. These act as the boundaries of the tunnel, helping traders distinguish between major trend shifts and minor daily fluctuations.
2. Short-Term Momentum & Volatility (The Inner Core) To capture immediate price action, the logic incorporates three rapid moving averages (based on very short periods of 13). Interestingly, these are calculated using different price points:
- One tracks the High prices.
- One tracks the Close prices.
- One tracks the Low prices. By mapping all three simultaneously, the script creates a dynamic "envelope" that shows the current range of price volatility. This allows you to see how much room the market is moving within its current momentum.
3. Sensitivity & Refinement The logic concludes with two final averages (based on periods of 8 and 5). These serve as high-sensitivity markers that react quickly to new information. They provide a layer of refinement, helping to smooth out "noise" while ensuring the most recent price movements are represented in the overall visual data.
Visual Summary
When viewed on a chart, these eight layers work together to form a cohesive visual structure:
- The Trend: Defined by the wide gaps between the long-term averages.
- The Tunnel: Formed by the tight grouping of the short-term high, low, and close averages.
- The Interaction: Traders look for instances where price moves toward the edges of this tunnel or reacts to the intersection of these various lines to identify potential buying or selling opportunities.
In essence, the script transforms complex historical data into a navigable visual "pathway," allowing you to see not just where the price is now, but the momentum and boundaries that are driving it there.
/*
*********************************************************************
Accrete 5 minute Tunnel
Copyright © 2006
*********************************************************************
*/
#property copyright "Code written by - Accrete"
#property copyright "Modified for use in the Power 62 model as taught by FXPartners"
#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 Magenta
#property indicator_color2 Lime
#property indicator_color3 Aqua
#property indicator_color4 Magenta
#property indicator_color5 Magenta
#property indicator_color6 Magenta
#property indicator_color7 Lime
#property indicator_color8 Lime
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
double ExtMapBuffer3[];
double ExtMapBuffer4[];
double ExtMapBuffer5[];
double ExtMapBuffer6[];
double ExtMapBuffer7[];
double ExtMapBuffer8[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//---- to set style to a dot use the following:
// SetIndexStyle(0,DRAW_ARROW,EMPTY);
// SetIndexArrow(0,115); [use 160 if a smaller dot is desired]
SetIndexStyle(0,DRAW_LINE, 1, 1);
SetIndexShift(0,0);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE, 1, 1);
SetIndexShift(1,1);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_LINE, 0, 2);
SetIndexShift(2,1);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_LINE, 2, 1);
SetIndexShift(3,1);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(4,DRAW_LINE, 0, 2);
SetIndexShift(4,0);
SetIndexBuffer(4,ExtMapBuffer5);
SetIndexStyle(5,DRAW_LINE, 2, 1);
SetIndexShift(5,0);
SetIndexBuffer(5,ExtMapBuffer6);
SetIndexStyle(6,DRAW_LINE, 0, 2);
SetIndexShift(6,0);
SetIndexBuffer(6,ExtMapBuffer7);
SetIndexStyle(7,DRAW_LINE, 0, 1);
SetIndexShift(7,0);
SetIndexBuffer(7,ExtMapBuffer8);
//----
return(0);
}
int deinit()
{
return(0);
}
int start()
{
int i,j,limit,counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
for(i=0; i<limit; i++){
ExtMapBuffer1[i]=iMA(NULL,0,169,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer2[i]=iMA(NULL,0,144,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer3[i]=iMA(NULL,0,55,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer4[i]=iMA(NULL,0,13,0,MODE_EMA,PRICE_HIGH,i);
ExtMapBuffer5[i]=iMA(NULL,0,13,0,MODE_EMA,PRICE_CLOSE,i);
ExtMapBuffer6[i]=iMA(NULL,0,13,0,MODE_EMA,PRICE_LOW,i);
ExtMapBuffer7[i]=iMA(NULL,0,8,0,MODE_SMA,PRICE_CLOSE,i);
ExtMapBuffer8[i]=iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,i);
}
Comment("Accrete 5 minute 13CHLema + 2640ema Fibo Extensions");
return(0);
}
//+------------------------------------------------------------------+
Comments