用法:1、买入:当出现第一根红柱时可少量买入,当趋势线上穿生命线时加仓买入,只要趋势线大于生命线并一路红柱,就一直持有;
2、卖出:当出现第一根蓝柱时可半仓卖出,当趋势线下穿生命线时清仓观望。只要趋势线小于生命线并一路蓝柱,就一直观望。
源码:
QS0:=((CLOSE - LLV(LOW,120)) / (HHV(HIGH,120) - LLV(LOW,120)));
QS1:=((QS0 / 1) * EMA(CLOSE,20));
QS:=SMA(QS1,3,1);
QD0:=((CLOSE - LLV(LOW,119)) / (HHV(HIGH,119) - LLV(LOW,119)));
QD1:=((QD0 / 1) * EMA(CLOSE,20));
QD:=SMA(QD1,5,1);
QF0:=((CLOSE - LLV(LOW,118)) / (HHV(HIGH,118) - LLV(LOW,118)));
QF1:=((QF0 / 1) * EMA(CLOSE,20));
QF:=SMA(QF1,5,1);
PX1:=((((QS + QD) + QF) / 3) + EMA(CLOSE,20));
PX2:=MA(PX1,2);
PX3:=MA(PX1,3);
YY:=((((2 * CLOSE) + HIGH) + LOW) / 4);
MA1:=MA(YY,45);
收:=(PX1 - MA1);
中:=(PX2 - MA1);
开:=(PX3 - MA1);
MA2:=MA(收,8);
STICKLINE((收 = 开),收,(开 - 0.03),1,0),COLORred;
STICKLINE((收 = 开),收,(开 - 0.03),0,0),colorred;
STICKLINE((收 = 开),中,(开 - 0.03),8,0),colorred;
STICKLINE((收 = 开),中,(开 - 0.03),7,0),colorred;
STICKLINE((收 = 开),中,(开 - 0.03),6,0),colorred;
STICKLINE((收 = 开),中,(开 - 0.03),5,0),colorred;
STICKLINE((收 = 开),中,(开 - 0.03),4,0),colorred;
STICKLINE((收 = 开),中,(开 - 0.03),3,0),colorred;
STICKLINE((收 = 开),中,(开 - 0.03),2,0),colorred;
STICKLINE((收 = 开),中,(开 - 0.03),1,0),colorred;
STICKLINE((收 = 开),收,(开 + 0.03),1,0),COLORCYAN;
STICKLINE((收 = 开),收,(开 + 0.03),0,0),COLORCYAN;
STICKLINE((收 = 开),中,(开 + 0.03),8,0),COLORCYAN;
STICKLINE((收 = 开),中,(开 + 0.03),7,0),COLORCYAN;
STICKLINE((收 = 开),中,(开 + 0.03),6,0),COLORCYAN;
STICKLINE((收 = 开),中,(开 + 0.03),5,0),COLORCYAN;
STICKLINE((收 = 开),中,(开 + 0.03),4,0),COLORCYAN;
STICKLINE((收 = 开),中,(开 + 0.03),3,0),COLORCYAN;
STICKLINE((收 = 开),中,(开 + 0.03),2,0),COLORCYAN;
STICKLINE((收 = 开),中,(开 + 0.03),1,0),COLORCYAN;
趋势线:MA2,colorwhite;
生命线:MA(收,13),coloryellow;
IF((生命线 REF(生命线,0)),生命线,1),colorFF00FF;
DRAWICON(cross(趋势线,生命线) ,生命线*0.95 , 1);
DRAWICON(cross(生命线,趋势线) ,趋势线*1.01 , 2);
上述源码可同时适用于大智慧、同花顺、飞狐分析师