ADXm_MTF
Download scriptThis technical indicator is designed to provide traders with a multi-layered view of market trends and momentum by analyzing price action across different timeframes simultaneously. It combines three specific types of data—ADX, +DI, and -DI—to help users identify the strength of a move and the direction of the prevailing trend.
Core Functionality
The tool operates by monitoring the relationship between price movements and market strength. Instead of just looking at the current chart, it has the capability to "look ahead" or "look back" into different timeframes (such as Minutes, Hours, Days, or Months) to provide a broader perspective on the market's health.
Key Components Explained
- ADX (Average Directional Index): This serves as the primary measure of trend strength. It tells you how powerful a current move is, regardless of whether the price is going up or down.
- +DI and -DI (Directional Indicators): These two components work in tandem to show the "tug-of-war" between buyers and sellers.
- The +DI represents upward pressure (buying momentum).
- The -DI represents downward pressure (selling momentum).
How the Logic Works
- Multi-Timeframe Synchronization: The script is programmed to align data from various timeframes with your current chart. This allows a trader to see, for example, how a 1-hour trend is affecting a 5-minute price action, helping to filter out "noise" and identify more significant market shifts.
- Dynamic Data Fetching: The logic automatically calculates the necessary historical data points based on user-defined periods (such as 14 or 21 units). It processes this information to ensure that the lines drawn on your screen are accurate reflections of both short-term volatility and long-term direction.
- Visual Analysis: By displaying these three metrics in a separate window, the tool allows users to visually confirm when a trend is gaining strength (rising ADX) and which side—the buyers or the sellers—is currently winning the battle based on the crossing and spacing of the +DI and -DI lines.
Practical Application
The goal of this logic is to provide clarity. By observing where these indicators intersect and how they interact with the "levels" provided in the settings, a visitor can better understand if the market is trending strongly, ranging sideways, or if a reversal in momentum is likely to occur. It serves as a sophisticated filter for identifying high-probability trading environments.
//+------------------------------------------------------------------+
//| Copyright © 2006, Keris2112 |
//| IgorAd www.forex-tsd.com |
//+------------------------------------------------------------------+
//2008fxtsd ki
//mod +di-di & adx separate settings
#property copyright "Copyright © 2006, Keris2112"
#property link "http://www.forex-tsd.com"
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 DimGray
#property indicator_color2 Green
#property indicator_color3 Maroon
#property indicator_style3 2
#property indicator_width2 2
#property indicator_level1 20
#property indicator_levelcolor SlateGray
extern int TimeFrame = 0;
extern int ADX_Period = 14;
extern int DI_Period = 21;
extern int applied_price = 0;
extern int MaxBarsToCount = 1500;
extern string note_Price = "0C 1O 2H 3L 4Md 5Tp 6WghC: Md(HL/2)4,Tp(HLC/3)5,Wgh(HLCC/4)6";
extern string TimeFrames = "M1;5,15,30,60H1;240H4;1440D1;10080W1;43200MN";
double ADX_buff[],PADX_buff[],NADX_buff[];
//+------------------------------------------------------------------+
int init()
{
//----
SetIndexBuffer(0,ADX_buff);
SetIndexStyle (0,DRAW_LINE);
SetIndexBuffer(1,PADX_buff);
SetIndexStyle (1,DRAW_LINE);
SetIndexBuffer(2,NADX_buff);
SetIndexStyle (2,DRAW_LINE);
switch(TimeFrame)
{
case 1 : string TimeFrameStr="M1"; break;
case 5 : TimeFrameStr="M5"; break;
case 15 : TimeFrameStr="M15"; break;
case 30 : TimeFrameStr="M30"; break;
case 60 : TimeFrameStr="H1"; break;
case 240 : TimeFrameStr="H4"; break;
case 1440 : TimeFrameStr="D1"; break;
case 10080 : TimeFrameStr="W1"; break;
case 43200 : TimeFrameStr="MN"; break;
default : TimeFrameStr="TF0";
}
TimeFrame = MathMax(TimeFrame, Period());
IndicatorShortName("ADX("+ADX_Period+") +DI-DI ("+DI_Period+") ["+TimeFrameStr+"]");
SetIndexLabel(0,"ADX ["+TimeFrame+"] ");
SetIndexLabel(1,"+DI ["+TimeFrame+"]");
SetIndexLabel(2,"-DI ["+TimeFrame+"]");
SetIndexDrawBegin(0,ADX_Period);
SetIndexDrawBegin(1,ADX_Period);
SetIndexDrawBegin(2,ADX_Period);
return(0);
}
//+---
int deinit()
{
return(0);
}
//+-------
int start()
{
int i,y,limit;
datetime TimeArray[];
ArrayCopySeries(TimeArray,MODE_TIME,Symbol(),TimeFrame);
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
limit=Bars-counted_bars;
limit = MathMax (limit,TimeFrame/Period());
limit = MathMin (limit,MaxBarsToCount);
for(i =0, y=0; i<limit; i++)
{
if (Time[i]<TimeArray[y]) y++;
ADX_buff[i] =iADX(NULL,TimeFrame,ADX_Period,applied_price,0,y);
PADX_buff[i] =iADX(NULL,TimeFrame,DI_Period, applied_price,1,y);
NADX_buff[i] =iADX(NULL,TimeFrame,DI_Period, applied_price,2,y);
}
return(0);
}
//+-------------------------------------------------------------
Comments