TTM Squeeze squeeze indicator stock selection formula, judging energy release through volatility and momentum

TTM Squeeze is a volatility and momentum indicator invented by John Carter and introduced in his book Mastering Trading. When the price is consolidating in a narrow range to accumulate energy for the next big rise or fall, it can be identified by the squeeze indicator. Squeeze means "squeeze", which is translated as "squeeze cards" in the Chinese version of the book. This name is also used in this article.

The TTM Squeeze indicator contains two parts: volatility and momentum:

Volatility Section: The TTM Squeeze indicator uses Bollinger Bands and Keltner Bands to measure price volatility compression. If the Bollinger Bands enter the Keltner Channel, it indicates a period of very low volatility, a condition known as a squeeze. When the Bollinger Bands expand and return outside the Keltner Channel, volatility increases and the price is likely to break out of a narrow range either upward or downward, which is the time to trade.

Momentum part: The TTM Squeeze indicator uses the MTM momentum indicator to determine the expected direction of change when the trading opportunity occurs. The MTM indicator swings freely up and down around the 0 axis, so it is also called a momentum oscillator. When the MTM indicator is above the 0 axis, the price has upward momentum, and when the MTM indicator is below the 0 axis, the price has downward momentum.

1.TTM Squeeze IndicatorSupport Picture

The volatility part of the squeeze indicator is displayed on the 0 axis. Green indicates that the squeeze is on, that is, the Bollinger Bands enter the Keltner Channel; red indicates that the squeeze is closed, that is, the Bollinger Bands expand and return to outside the Keltner Channel. Bollinger Bands uses the 20-day moving average as the middle rail and 2 standard deviations as the upper and lower rails. The parameters can be adjusted according to trading needs. Keltner Channel uses the 20-day moving average as the middle track and 1.5 times ATR as the upper and lower track, and the parameters can also be adjusted.

The momentum part is displayed as a four-color bar. Above the zero axis, rising is red and falling is yellow; below the zero axis, falling is cyan and rising is magenta.

BOLL:=MA(C,20);

UB:=BOLL+2*STD(C,20);

LB:=BOLL-2*STD(C,20);

MTR:=MAX(MAX((H-L),ABS(REF(C,1)-H)),ABS(REF(C,1)-L));

ATR:=MA(MTR,14);

MID:=MA(C,20);

UK:=MID+1.5*ATR;

LK:=MID-1.5*ATR;

MTM:=C-REF(C,12);

MTMMA:=EMA(MTM,5);

STICKLINE(MTMMA>0 AND MTMMA>REF(MTMMA,1),MTMMA,0,2,0),COLORRED;

STICKLINE(MTMMA>0 AND MTMMA<REF(MTMMA,1),MTMMA,0,2,0),COLORYELLOW;

STICKLINE(MTMMA<0 AND MTMMA<REF(MTMMA,1),MTMMA,0,2,0),COLORCYAN;

STICKLINE(MTMMA<0 AND MTMMA>REF(MTMMA,1),MTMMA,0,2,0),COLORMAGENTA;

NOTEXT:0,COLORGREEN,LINETHICK6;

IF(UB>UK,0,DRAWNULL),COLORRED,LINETHICK6;

2.TTM Squeeze indicatorMain picture

Idea: After the squeeze is closed, that is, the Bollinger Bands expand and return to outside the Keltner Channel, the MTM momentum indicator is above the 0 axis, sending a signal.

BOLL:=MA(C,20);

UB:BOLL+2*STD(C,20);

LB:BOLL-2*STD(C,20);

MTR:=MAX(MAX((H-L),ABS(REF(C,1)-H)),ABS(REF(C,1)-L));

ATR:=MA(MTR,14);

MID:=MA(C,20);

UK:MID+1.5*ATR,DOTLINE;

LK:MID-1.5*ATR,DOTLINE;

JC:=CROSS(UB,UK);

T1:=BARSLAST(JC);

MTM:=C-REF(C,12);

MTMMA:=EMA(MTM,5);

CY:=CROSS(MTMMA,0);

T2:=BARSLAST(CY);

DY:=MTMMA>0;

AA:=DY AND COUNT(DY,T1+1)=1 AND UB>UK AND T1<20;

XG:=AA AND COUNT(AA,T2+1)=1 AND T2<=3;

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;

DRAWICON(XG,L,11);

3.TTM Squeeze indicatorStock selection formula

BOLL:=MA(C,20);

UB:=BOLL+2*STD(C,20);

LB:=BOLL-2*STD(C,20);

MTR:=MAX(MAX((H-L),ABS(REF(C,1)-H)),ABS(REF(C,1)-L));

ATR:=MA(MTR,14);

MID:=MA(C,20);

UK:=MID+1.5*ATR;

LK:=MID-1.5*ATR;

JC:=CROSS(UB,UK);

T1:=BARSLAST(JC);

MTM:=C-REF(C,12);

MTMMA:=EMA(MTM,5);

CY:=CROSS(MTMMA,0);

T2:=BARSLAST(CY);

DY:=MTMMA>0;

AA:=DY AND COUNT(DY,T1+1)=1 AND UB>UK AND T1<20;

XG:AA AND COUNT(AA,T2+1)=1 AND T2<=3;

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.

おすすめ

転載: blog.csdn.net/m0_74754828/article/details/134736691