「翔博精选指标」反转上升结构趋势,波段类(通达信公式 副图 源
2022-05-25原创 编 辑:翔博软件
双抛物线,有未来函数
SAR是非常经典好用的指标,本主图带有两个未来函数,SAR指标本身就是有未来函数的,后加的“金手指”提示信号也是有未来函数的。
有未来函数不一定就不能用,特别是懂SAR这个经典常用指标的同学,而“金手指”这个未来函数,个人观察下来是属于收盘后确认的未来函数,盘中会变化,但好像没有出现后补的情况。
至于SAR指标的使用方法,有不了解这个指标的同学请自行百度一下,另外多对比这个指标的细节部分,什么时候会加速上涨。。。。。。我这里就不多说了哈。
主图中两条趋势线也是另外加的,EMA5 EMA10好像是,也就是5 10的收盘价线,不起大作用,只是为了方便观察趋势形态。
{公式名称: 双抛物线}
EMA5:EMA(CLOSE,5),COLORMAGENTA;
EMA10:EMA(CLOSE,10),COLORYELLOW;
A:IF(CLOSE>SAR(4,2,20),SAR(4,2,20),DRAWNULL),CIRCLEDOT,COLORRED;
B:IF(CLOSE<SAR(4,2,20),SAR(4,2,20),DRAWNULL),CIRCLEDOT,COLORCYAN;
VAR1:=CLOSE>SAR(4,2,20);
VAR2:=CLOSE<SAR(4,2,20);
买入:DRAWICON(CROSS(VAR1,VAR2),LOW-0.1,1);
卖出:DRAWICON(CROSS(VAR2,VAR1),HIGH+0.1,2);
STICKLINE(VAR1,CLOSE,OPEN,3,0),COLOR000099;
STICKLINE(VAR1,HIGH,LOW,0.5,0),COLOR000099;
STICKLINE(VAR2,CLOSE,OPEN,3,0),COLORFF0099;
STICKLINE(VAR2,HIGH,LOW,0.5,0),COLOR660099;
STICKLINE(VAR1,CLOSE,OPEN,3,0),COLOR9900CC;
STICKLINE(VAR1,CLOSE,OPEN,2.5,0),COLORFF00CC;
STICKLINE(VAR1,CLOSE,OPEN,1.9,0),COLORMAGENTA;
STICKLINE(VAR1,CLOSE,OPEN,1,0),COLORFF33FF;
STICKLINE(VAR1,CLOSE,OPEN,0.5,0),COLORFF66FF;
STICKLINE(VAR1,CLOSE,OPEN,0.2,0),COLORFF99FF;
STICKLINE(VAR2,CLOSE,OPEN,3,0),COLOR006633;
STICKLINE(VAR2,CLOSE,OPEN,2.5,0),COLOR339933;
STICKLINE(VAR2,CLOSE,OPEN,1.9,0),COLOR669933;
STICKLINE(VAR2,CLOSE,OPEN,1.5,0),COLOR33CC33;
STICKLINE(VAR2,CLOSE,OPEN,1,0),COLOR66CC33;
STICKLINE(VAR2,CLOSE,OPEN,0.2,0),COLORCCFF33;
STICKLINE(买入,OPEN,(CLOSE-OPEN)/2+OPEN,3,0),COLOR335555;
STICKLINE(买入,OPEN,(CLOSE-OPEN)/2+OPEN,2.2,0),COLOR338888;
STICKLINE(买入,OPEN,(CLOSE-OPEN)/2+OPEN,1.5,0),COLOR33AAAA;
STICKLINE(买入,OPEN,(CLOSE-OPEN)/2+OPEN,1,0),COLOR33CCCC;
STICKLINE(买入,OPEN,(CLOSE-OPEN)/2+OPEN,0,0),COLOR33EEEE;
STICKLINE(卖出,OPEN,(CLOSE-OPEN)/2+OPEN,3,0),COLOR550055;
STICKLINE(卖出,OPEN,(CLOSE-OPEN)/2+OPEN,2.2,0),COLOR880088;
STICKLINE(卖出,OPEN,(CLOSE-OPEN)/2+OPEN,1.5,0),COLORAA00AA;
STICKLINE(卖出,OPEN,(CLOSE-OPEN)/2+OPEN,1,0),COLORCC00CC;
STICKLINE(卖出,OPEN,(CLOSE-OPEN)/2+OPEN,0.5,0),COLOREE00EE;
修正SAR:SAR(5,4,7),POINTDOT,COLORBLUE,LINETHICK6;
VAR3:=EMA(CLOSE,14);
VAR4:=(VAR3-REF(VAR3,1))/REF(VAR3,1)*100;
出击:IF(VAR4>=0,REF(EMA(CLOSE,14),BARSLAST(CROSS(VAR4,0))+1),DRAWNULL),NODRAW;
休假:IF(VAR4<0,REF(EMA(CLOSE,14),BARSLAST(CROSS(0,VAR4))+1),DRAWNULL),NODRAW;
STICKLINE(CROSS(VAR4,0),CLOSE,OPEN,2,0),NODRAW;
STICKLINE(CROSS(0,VAR4),CLOSE,OPEN,2,0),NODRAW;
STICKLINE(CROSS(VAR4,0) OR CROSS(0,VAR4),REF(EMA(CLOSE,14),1),REF(EMA(CLOSE,14),1)*0.998,2,0),NODRAW;
STICKLINE(ISLASTBAR,REF(EMA(CLOSE,14),1),REF(EMA(CLOSE,14),1)*0.998,5,0),NODRAW;
VAR5:=EMA(CLOSE,14);
止盈线:EMA(CLOSE,7),NODRAW;
工作区:IF(CLOSE>=VAR5 AND EMA(CLOSE,14)>=EMA(CLOSE,25),VAR5,DRAWNULL),NODRAW;
准备区:IF(CLOSE>=VAR5 AND EMA(CLOSE,14)<EMA(CLOSE,25),VAR5,DRAWNULL),NODRAW;
休息区:IF(CLOSE<VAR5,VAR5,DRAWNULL),NODRAW;
生命:EMA(CLOSE,25),NODRAW;
IF(CROSS(VAR5,生命),VAR5*0.975,DRAWNULL),CIRCLEDOT,COLORRED;
DRAWICON(CROSS(CLOSE,生命) AND CLOSE>EMA(CLOSE,14),LOW*0.99,1);
DRAWICON(COUNT(CLOSE<EMA(CLOSE,7),2)=2 AND EMA(CLOSE,7)>EMA(CLOSE,14) AND COUNT(CLOSE>止盈线,6)>=3,HIGH*1.03,2);
DRAWICON(CROSS(VAR5,CLOSE) AND EMA(CLOSE,14)>EMA(CLOSE,25),HIGH*1.01,8);
IF(CROSS(生命,VAR5),HIGH*1.04,DRAWNULL),CIRCLEDOT,COLORGREEN;
MA1:MA(CLOSE,5),NODRAW;
MA2:MA(CLOSE,10),NODRAW;
MA3:MA(CLOSE,25),NODRAW;
MA4:MA(CLOSE,60),NODRAW;
MA5:MA(CLOSE,610),NODRAW;
DRAWTEXT_FIX(1,0,0,0,HYBLOCK),COLOR0080FF;
DRAWTEXT_FIX(1,0.14,0,0,DYBLOCK),COLORYELLOW;
DRAWTEXT_FIX(1,0,0.06,0,EXTERNSTR(0,1)),COLORRED;
DRAWTEXT_FIX(1,0,0.12,0,EXTERNSTR(0,2)),COLORMAGENTA;
DRAWTEXT_FIX(1,0,0.18,0,EXTERNSTR(0,3)),COLORFF88FF;
DRAWTEXT_FIX(1,0,0.24,0,EXTERNSTR(0,5)),COLORLICYAN;
VAR6:=TROUGH(CLOSE,10,1)*1.02;
VAR7:=COUNT(LOW<VAR6,3);
VAR8:=TROUGH(CLOSE,10,1)*1.05;
DRAWTEXT(VAR7>=1 AND VAR6<MA3 AND CROSS(CLOSE,VAR8),LOW*0.9999,1),COLOR00CCCC;
DRAWTEXT(MA3>MA4 AND VAR7>=1 AND VAR6<MA3 AND CROSS(CLOSE,VAR8),LOW*0.9999,2),COLOR00CCCC;
金手指:VAR7>=1 AND VAR6<MA3 AND CROSS(CLOSE,VAR8),NODRAW,COLOR00AAAA;
STICKLINE(金手指,OPEN,CLOSE,2,0),COLOR008888;
STICKLINE(金手指,OPEN,CLOSE,1.6,0),COLOR00AAAA;
STICKLINE(金手指,OPEN,CLOSE,0.8,0),COLOR00CCCC;
STICKLINE(金手指,OPEN,CLOSE,0.2,0),COLORYELLOW;
VAR9:=REF(EVERY(CLOSE<OPEN,2),1) AND CLOSE>OPEN;
wwwzbsircom:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
VAR10:=MA(CLOSE,5);
VAR11:=MA(CLOSE,10);
VAR12:=(VAR10-CLOSE)/CLOSE>3/100;
VAR13:=(VAR11-VAR10)/VAR10>0.03;
VAR14:=LLV(CLOSE,30)=LLV(CLOSE,120);
VAR15:=VAR12 AND VAR13 AND VAR14;
STICKLINE(BARSLAST(VAR15)<=2 AND VAR9,OPEN,CLOSE,2,0),COLORFF0066;
VAR16:=MA(CLOSE,13);
VAR17:=MA(CLOSE,33);
VAR18:=MA(CLOSE,55);
VAR19:=((CLOSE-REF(MA(CLOSE,20),1))/20+VAR16)*1.2;
DRAWTEXT(CROSS(VAR16,CLOSE) AND INDEXC>MA(INDEXC,13) AND VAR16>REF(VAR16,1) AND VOL<REF(VOL,1) AND VAR16>VAR18,LOW*0.985,3),COLORRED;
VAR20:=PEAK(CLOSE,10,1)*1.001;
VAR21:=(CLOSE-LLV(LOW,13))/(HHV(HIGH,13)-LLV(LOW,13))*100;
VAR22:=SMA(VAR21,3,1);
VAR23:=SMA(VAR22,3,1);
VAR24:=3*VAR22-2*VAR23;
VAR25:=(CLOSE-LLV(LOW,55))/(HHV(HIGH,55)-LLV(LOW,55))*100;
VAR26:=SMA(VAR25,3,1);
VAR27:=SMA(VAR26,3,1);
VAR28:=3*VAR26-2*VAR27;
VAR29:=IF(CROSS(VAR28,VAR24),HIGH,REF(HIGH,BARSLAST(CROSS(VAR28,VAR24))));
VAR30:=IF(CROSS(VAR24,VAR28),LOW,REF(LOW,BARSLAST(CROSS(VAR24,VAR28))));
VAR31:=VAR29<VAR20 AND CROSS(CLOSE,VAR20);
DRAWTEXT(VAR29<VAR20 AND CROSS(CLOSE,VAR20),LOW,4),COLORCC8868;
VAR32:=REF(VOL,1);
VAR33:=DVOL;
VAR34:=VAR33/VAR32;
VAR35:=VAR34-REF(VAR34,1);
VAR36:=REF(CLOSE,1);
VAR37:=DCLOSE;
VAR38:=(VAR37-VAR36)/VAR36*100;
VAR39:=VAR38-REF(VAR38,1);
VAR40:=CROSS(VAR35,500) AND CROSS(VAR39,10);
DRAWTEXT(VAR40=1,LOW*0.985,5),COLORCC8868;
DRAWICON(VAR40=1,LOW*0.99,11);
DRAWTEXT_FIX(1,0,0.7,0,6),COLORMAGENTA;
DRAWTEXT_FIX(1,0.08,0.7,0,EXTERNSTR(0,403)),COLORMAGENTA;
DRAWTEXT_FIX(1,0,0.75,0,7),COLORYELLOW;
DRAWTEXT_FIX(1,0.08,0.75,0,EXTERNSTR(0,402)),COLORYELLOW;
DRAWTEXT_FIX(1,0,0.81,0,8),COLORLIBLUE;
DRAWTEXT_FIX(1,0.08,0.81,0,EXTERNSTR(0,404)),COLORLIBLUE;
DRAWTEXT_FIX(1,0,0.86,0,9),COLORGREEN;
DRAWTEXT_FIX(1,0.08,0.86,0,EXTERNSTR(0,401)),COLORGREEN;