一笑之决策系统
参数N=163,M=1
VAR1:=1;
平衡:EMA(CLOSE,20),CIRCLEDOT,colorFFFFFF;
上轨:平衡+2*STD(CLOSE,20),LINETHICK2,colorFFFF;
下轨:平衡-2*STD(CLOSE,20),LINETHICK2,colorFFFF;
BB:=BARPOS=SYSPARAM(1);
买线:=EMA(CLOSE,2)*VAR1;
卖线:=(EMA(SLOPE(CLOSE,13)*20+CLOSE,40))*VAR1;
低吸:CROSS(买线,卖线),LINETHICK0;
高抛:CROSS(卖线,买线),LINETHICK0;
DRAWTEXT(低吸,LOW*0.996,'←低吸'),PXUP6,colorFF;
DRAWTEXT(高抛,HIGH*1.028,'←高抛'),PXUP6,colorFFFF00;
STICKLINE(买线>=卖线,LOW,HIGH,1,0),colorFF;
STICKLINE(买线>=卖线,CLOSE,OPEN,4.5,0),colorAA;
STICKLINE(买线>=卖线,CLOSE,OPEN,4,0),colorCC;
STICKLINE(买线>=卖线,CLOSE,OPEN,3,0),colorCC;
STICKLINE(买线>=卖线,CLOSE,OPEN,2,0),colorEE;
STICKLINE(买线<卖线,CLOSE,OPEN,4.5,0),colorAAAA00;
STICKLINE(买线<卖线,CLOSE,OPEN,4,0),colorBBBB00;
STICKLINE(买线<卖线,CLOSE,OPEN,3,0),colorCCCC00;
STICKLINE(买线<卖线,CLOSE,OPEN,2,0),colorEEEE00;
STICKLINE(买线<卖线,LOW,HIGH,1,0),colorFFFF00;
STICKLINE(CROSS(买线,卖线) OR CROSS(卖线,买线),OPEN,CLOSE,3,0),colorFFFF;
主力短期成本:EMA((EMA(CLOSE,3)+EMA(CLOSE,6)+EMA(CLOSE,12)+EMA(CLOSE,24))/4,2)*VAR1,LINETHICK1,colorFFFFFF;
主力中期成本:MA(CLOSE,21)*VAR1,LINETHICK1,colorFF00;
主力长期成本:MA(CLOSE,30)*VAR1,LINETHICK2,colorFF00FF;
一笑线:EMA(CLOSE,55),POINTDOT,LINETHICK3,colorFF0000;
DRAWTEXTEX(CLOSE,1,4,40,'【一笑之决策系统】'),LINETHICK4,colorFF;
V1:=EMA(CLOSE,5)*VAR1;
V2:=EMA(EMA(CLOSE,90)*1.01,10)*VAR1;
DRAWTEXT(CROSS(V1,V2),V1+0.05,'←黑马起飞'),PXUP4,colorFF00FF;
黑马起飞:IF(CROSS(V1,V2),1,0),LINETHICK0;
VAR1:=LLV(LOW,21)*VAR1;
VAR2:=HHV(HIGH,21)*VAR1;
AK1:=EMA((CLOSE-VAR1)/(VAR2-VAR1)*100,5)*VAR1;
AK:=EMA((CLOSE-VAR1)/(VAR2-VAR1)*50,13)*VAR1;
AB:=CROSS(AK1,AK);
DRAWICON(CROSS(V1,V2),V2,1);
DRAWTEXT(AB=1,LOW*0.99,'←黑马起步'),colorFFFF;
黑马起步:IF(AB=1,1,0),LINETHICK0;
A:=SYSPARAM(4)-SYSPARAM(5);
AB:=SYSPARAM(4)+A/3;
P1:=0;
P2:=VOL;
N1:=SYSPARAM(2);
N2:=SYSPARAM(3);
FOR I=N1 TO N2 DO BEGIN
IF P1<P2[I] THEN
P1:=P2[I];
LC:=REF(CLOSE,1);
RSI:=(SMA(MAX(CLOSE-LC,0),3,1))/(SMA(ABS(CLOSE-LC),3,1))*100;
FF:=EMA(CLOSE,3);
MA21:=EMA(CLOSE,21);
DRAWTEXT(CROSS(FF,MA21),LOW*0.96,'底\n背\n离'),ALIGN0,colorFFFACD;
DRAWTEXT(CROSS(88,RSI),HIGH*1.08,'顶\n背\n离'),ALIGN0,colorFF00;
底背离:CROSS(FF,MA21),LINETHICK0,colorFFFACD;
顶背离:CROSS(88,RSI),LINETHICK0,colorFF00;
END;
B:=P1;
D:=B/A*2;
E:=SYSPARAM(5)-A/2;
VX:=VOL/D+E;
STICKLINE(CLOSE>OPEN OR CLOSE>REF(CLOSE,1),E,VX,6,0),colorFF;
STICKLINE(CLOSE<OPEN OR CLOSE<=REF(CLOSE,1),E,VX,6,0),colorFFFF00;
|