同花顺趋势战略副图源码
2017-10-09网络 编 辑:翔博软件
给大家一个战略型的指标。它是一个反映波段顶部和底部的指标,底部白色柱状线出现买入,顶部白色柱状线出现卖出。同时红柱出现为波段启动点,绿柱出现为降落点。
VARA:=LLV(LOW,35);
VARB:=HHV(HIGH,30);
VARC:=EMA((CLOSE-VARA)/(VARB-VARA)*4,4)*25;
趋势: VARC,COLORFF00FF,LINETHICK2;
底背: STICKLINE(VARC<10 AND 100*(HHV(HIGH,14)-CLOSE)/(HHV(HIGH,14)-LLV(LOW,14))>97,0,25,5,0),coloryellow;
顶背: STICKLINE(VARC>90,100,85,10,0),colorred;
VARD:=87.5;
VARE:=(VARC-LLV(VARC,4))/(HHV(VARC,4)-LLV(VARC,4))*4*25;
目标位: DRAWTEXT(IF(CROSS(趋势,VARD) AND VARE=100,50,0),56,'目标'),COLORFF00FF;
跑: DRAWTEXT(IF(CROSS(VARD,趋势),87,0),85,'跑'),COLOR00FF00;
卖: DRAWTEXT(IF(CROSS(趋势,VARE) AND 趋势>87,87,0),70,'卖'),COLOR00FF00;
VAR6:=(2*C+H+L)/4;
VAR8:=LLV(LOW,30);
VARA1:=HHV(HIGH,30);
B:=EMA((VAR6-VAR8)/(VARA1-VAR8)*100,8);
B1:=EMA(B,5);
STICKLINE(B>0 AND B-B1>=0,79,80,6,0),COLOR00FF00;
STICKLINE(B>0 AND B-B1<0,79,80,6,0),colorcyan;
STICKLINE(B>0 AND B-B1>=0,49,50,6,0),colorred;
STICKLINE(B>0 AND B-B1<0,49,50,6,0),colorcyan;
STICKLINE(B>0 AND B-B1>=0,19,20,6,0),COLOR00FF00;
STICKLINE(B>0 AND B-B1<0,19,20,6,0),colorcyan;
STICKLINE(B-B1>0,B,B1,8,1),colorred;
STICKLINE(B-B1<0,B,B1,8,1),COLOR00FF00;
V1:=(2*CLOSE+HIGH+LOW)/4;
V2:=LLV(LOW,21);
VA:=HHV(HIGH,34);
防线B:=EMA((V1-V2)/(VA-V2)*100,13);
防线BB:=EMA((0.667*REF(防线B,1)+0.333*防线B),2);
战略线:EMA(0.382*REF(防线B,2)+0.618*防线B,12),coloryellow;