Holy Grail Trading System stock selection formula, ADX indicator and EMA moving average used together

The Holy Grail Trading System was developed by Linda Bradford Raschke, who was interviewed in Jack Schwager's book The New Financial Geeks. The goal of the Holy Grail strategy is to detect the first retracement after the establishment of a strong trend, and to determine the strength of the trend and the appropriate trading area based on the synergy of the average trend indicator ADX and the exponential moving average EMA.

1. Average trend indicator ADX

In the previous article, the trend indicator DMI indicator was introduced. It is a technical indicator used to measure the trend direction and trend strength of the market. It consists of four lines: PDI, MDI, ADX, and ADXR. Among them, PDI is used to measure the strength of an upward trend, MDI is used to measure the strength of a downward trend, ADX is used to measure the strength of a trend, and ADXR is used to measure the average trend strength. When ADX exceeds 25, it means that the market may be in a trend state; when ADX is below 25, it means that the market may be in a volatile state. The value 25 can only be used as a reference for judgment. You can set 20 or 30 according to the situation to measure the current market status. The smaller the ADX value, the less trendy the market is.

To expand, when PDI is higher than MDI, it means that the current market is rising; when PDI is higher than MDI, it means that the current market is falling, and ADX reflects the trend strength of the market. If the value of the ADX line is high, it indicates that the market is in a strong trend, otherwise it indicates that the market is in a volatile consolidation. The ADX indicator does not determine how the market will develop, but only provides a way to judge market trends.

2. Holy Grail Trading System Main Chart Indicator Formula

Holy Grail Trading System Idea: Use ADX and EMA together. First, use ADX above 30 to determine whether there is a strong trend; then wait for the price to pull back to the 20-day EMA for the first time, with ADX remaining above 30 during the pullback; and finally break through the first K-line high that touches the 20-day EMA. as a trigger signal.

N:=14;

M:=14;

MTR:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);

HD :=HIGH-REF(HIGH,1);

LD :=REF(LOW,1)-LOW;

DMP:=SUM(IF(HD>0&&HD>LD,HD,0),N);

DMM:=SUM(IF(LD>0&&LD>HD,LD,0),N);

PDI:=DMP*100/MTR;

MDI:=DMM*100/MTR;

ADX:=MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);

ADXR:=(ADX+REF(ADX,M))/2;

EMA20:EMA(C,20);

JC:=CROSS(ADX,30);{ADX crosses 30}

T1:=BARSLAST(JC);

XC:=CROSS(EMA20,L) AND COUNT(CROSS(EMA20,L),T1)=1;{ADX pulled back to the EMA20 moving average for the first time since it crossed 30}

T2:=BARSLAST(XC);

HH:=REF(H,T2);{The first K-line high that touches the 20-day EMA}

T3:=BARSLAST(CROSS(C,EMA20));

AA:=CROSS(C,HH) AND EVERY(ADX>30,T1) AND EXIST(XC,T1) AND T2<20;

XG:=AA AND COUNT(AA,T1)=1;

STICKLINE(XG,H,L,0,1),COLORYELLOW;

STICKLINE(XG,C,O,3,0),COLOR117777;

STICKLINE(XG,C,O,2.5,0),COLOR119999;

STICKLINE(XG,C,O,2,0),COLOR11BBBB;

STICKLINE(XG,C,O,1.5,0),COLOR11DDDD;

STICKLINE(XG,C,O,1,0),COLOR44FFFF;

3. Holy Grail Trading System Sub-Chart Indicator Formula

N:=14;

M:=14;

MTR:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);

HD:=HIGH-REF(HIGH,1);

LD:=REF(LOW,1)-LOW;

DMP:=SUM(IF(HD>0&&HD>LD,HD,0),N);

DMM:=SUM(IF(LD>0&&LD>HD,LD,0),N);

PDI:=DMP*100/MTR;

MDI:=DMM*100/MTR;

ADX: MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);

30;

4. Holy Grail Trading System Stock Selection Formula

N:=14;

M:=14;

MTR:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(REF(CLOSE,1)-LOW)),N);

HD:=HIGH-REF(HIGH,1);

LD:=REF(LOW,1)-LOW;

DMP:=SUM(IF(HD>0&&HD>LD,HD,0),N);

DMM:=SUM(IF(LD>0&&LD>HD,LD,0),N);

PDI:=DMP*100/MTR;

MDI:=DMM*100/MTR;

ADX:=MA(ABS(MDI-PDI)/(MDI+PDI)*100,M);

ADXR:=(ADX+REF(ADX,M))/2;

EMA20:=EMA(C,20);

JC:=CROSS(ADX,30);

T1:=BARSLAST(JC);

XC:=CROSS(EMA20,L) AND COUNT(CROSS(EMA20,L),T1)=1;

T2:=BARSLAST(XC);

HH1:=IF(T2<T1,REF(H,T2),DRAWNULL);

HH:=REF(H,T2);

T3:=BARSLAST(CROSS(C,EMA20));

AA:=CROSS(C,HH) AND EVERY(ADX>30,T1) AND EXIST(XC,T1) AND T2<20;

XG:AA AND COUNT(AA,T1)=1;

Finally, let me explain that the K line may cross the EMA20 moving average multiple times, so the signal of the first callback is difficult to filter, resulting in some signals being at a higher position. The signals can be screened and checked with the naked eye.

Pay attention to Technical Pie and learn more about Tongdaxin indicator formula writing. All rights reserved, please indicate the source.

Friendly reminder: This article is only for learning and communicating technical indicator formulas and does not constitute any investment advice. Investment is risky, so be cautious when entering the market.

Guess you like

Origin blog.csdn.net/m0_74754828/article/details/132766641