FX168財經網>人物頻道>帖子
【分享】ADX指標的基本用法
國外投資者經常使用ADX指標,國內用的反而比較少,不過我經常用到ADX指標判斷盤整、振蕩和單邊趨勢。尤其是在單邊行情的判斷上非常不錯,可以較好的指引手上倉位的出單時機。
1.ADX指數是反映趨向變動的程度,而不是方向的本身。 2.進場與出場是采用+DI14與-DI14的穿越信號。
3.當極端點交易法則生效時,法則2將有例外。當DI發生穿越信號時,取當天的極端點做為止損點;換言之,多頭頭寸取當天的低價為止損點,空頭頭寸取當天的高價。在隨後的幾之內,如果止損點未被觸及,即使DI再發生穿越信號也不需理會。
4.當ADX的位置高於兩條DI而方向發生改變,這是趨勢反轉的早期信號,可以做部份的獲利了結。最後的平倉信號是來自於DI穿越或極端點的止損被引發。當ADX改變方向時,如果+DI14高於-DI14,這代表趨勢的變動是由上亦下,反之亦然。
5.如果ADX高於兩條DI,而且讀數明顯偏高,這代表既有的趨勢已經持續一段時間。這並不是建立新頭寸的理想時機,因場信號很可能反複。換言之,ADX的讀數偏高,相當於是超買/超賣,順勢的新交易頭寸通常很難獲利。
6.如果ADX同時低於兩條DI,避免采用順勢交易的系統,因為市場中沒有明顯的趨勢。
7.如果ADX的讀數低於20~25,不論它與兩條DI的相對位置如何,都避免采用順勢交易的系統,因為市場中沒有明顯的趨勢。 |
這里只是一些基本的用法,之後有時間會給大家帶來一些實戰的結合講解。
做野心男人,創千秋偉業
標簽閱讀:
黃金
聲明:本文為入駐FX168財經網人物頻道的作者發布,不代表FX168財經網的觀點。文中觀點僅供參考,投資有風險,入市需謹慎
全部回複
0/140
-
我的是自己輸入程序加上去的 可以用MT4中的MetaEditor編寫
下面把程序代碼分享一下
//+------------------------------------------------------------------+
//| ADX.mq4 |
//| Copyright ?2004, MetaQuotes Software Corp. |
//| http://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright ?2004, MetaQuotes Software Corp."
#property link "http://www.metaquotes.net/"
#property indicator_separate_window
#property indicator_buffers 3
#property indicator_color1 LightSeaGreen
#property indicator_color2 YellowGreen
#property indicator_color3 Wheat
//---- input parameters
extern int ADXPeriod=14;
//---- buffers
double ADXBuffer[];
double PlusDiBuffer[];
double MinusDiBuffer[];
double PlusSdiBuffer[];
double MinusSdiBuffer[];
double TempBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- 3 additional buffers are used for counting.
IndicatorBuffers(6);
//---- indicator buffers
SetIndexBuffer(0,ADXBuffer);
SetIndexBuffer(1,PlusDiBuffer);
SetIndexBuffer(2,MinusDiBuffer);
SetIndexBuffer(3,PlusSdiBuffer);
SetIndexBuffer(4,MinusSdiBuffer);
SetIndexBuffer(5,TempBuffer);
//---- name for DataWindow and indicator subwindow label
IndicatorShortName("ADX("+ADXPeriod+")");
SetIndexLabel(0,"ADX");
SetIndexLabel(1,"+DI");
SetIndexLabel(2,"-DI");
//----
SetIndexDrawBegin(0,ADXPeriod);
SetIndexDrawBegin(1,ADXPeriod);
SetIndexDrawBegin(2,ADXPeriod);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Average Directional Movement Index |
//+------------------------------------------------------------------+
int start()
{
double pdm,mdm,tr;
double price_high,price_low;
int starti,i,counted_bars=IndicatorCounted();
//----
i=Bars-2;
PlusSdiBuffer[i+1]=0;
MinusSdiBuffer[i+1]=0;
if(counted_bars>=i) i=Bars-counted_bars-1;
starti=i;
//----
while(i>=0)
{
price_low=Low[i];
price_high=High[i];
//----
pdm=price_high-High[i+1];
mdm=Low[i+1]-price_low;
if(pdm<0) pdm=0; // +DM
if(mdm<0) mdm=0; // -DM
if(pdm==mdm) { pdm=0; mdm=0; }
else if(pdm else if(mdm //---- 懨麒耠屐 桉蜩眄 檜蟈屙謔
double num1=MathAbs(price_high-price_low);
double num2=MathAbs(price_high-Close[i+1]);
double num3=MathAbs(price_low-Close[i+1]);
tr=MathMax(num1,num2);
tr=MathMax(tr,num3);
//---- counting plus/minus direction
if(tr==0) { PlusSdiBuffer[i]=0; MinusSdiBuffer[i]=0; }
else { PlusSdiBuffer[i]=100.0*pdm/tr; MinusSdiBuffer[i]=100.0*mdm/tr; }
//----
i--;
}
//---- last counted bar will be recounted
if(counted_bars>0) counted_bars--;
int limit=Bars-counted_bars;
//---- apply EMA to +DI
for(i=0; i<=limit; i++)
PlusDiBuffer[i]=iMAOnArray(PlusSdiBuffer,Bars,ADXPeriod,0,MODE_EMA,i);
//---- apply EMA to -DI
for(i=0; i<=limit; i++)
MinusDiBuffer[i]=iMAOnArray(MinusSdiBuffer,Bars,ADXPeriod,0,MODE_EMA,i);
//---- Directional Movement (DX)
i=Bars-2;
TempBuffer[i+1]=0;
i=starti;
while(i>=0)
{
double div=MathAbs(PlusDiBuffer[i]+MinusDiBuffer[i]);
if(div==0.00) TempBuffer[i]=0;
else TempBuffer[i]=100*(MathAbs(PlusDiBuffer[i]-MinusDiBuffer[i])/div);
i--;
}
//---- ADX is exponential moving average on DX
for(i=0; i ADXBuffer[i]=iMAOnArray(TempBuffer,Bars,ADXPeriod,0,MODE_EMA,i);
//----
return(0);
}
//+------------------------------------------------------------------+
做野心男人,創千秋偉業
-

本社區僅針對特定人員開放
查看需注冊登錄並通過風險意識測評
4秒後跳轉登錄頁面...