SJ:=1;
N111:=6;
HH:=HHV(HIGH,N111);
LL:=LLV(LOW,N111);
HH1:=HHV(HIGH,19);
LL1:=LLV(LOW,19);
VAR199:=EMA(CLOSE,15)*SJ;
VAR299:=EMA(CLOSE,60)*SJ;
红多:=(CLOSE*SJ-VAR199*SJ)*2/(15+1)+VAR199,LINETHICK1, COLORRED;
VAR399:=(CLOSE*SJ-VAR299*SJ)*2/(60+1)+VAR299;
绿空:=IF(红多*SJ>VAR399,VAR399*SJ,红多*SJ),LINETHICK1, COLORGREEN;
生命线6:=VAR399*SJ,LINETHICK1, COLORYELLOW;
X1:=(CLOSE+LOW+HIGH+OPEN)/4;
X2:=EMA(X1,6);
X3:=EMA(X2,2);
VAR200:=EMA(EMA(X1,1),18);
VAR300:=EMA(VAR200,18);
XCLOSE:=EMA((OPEN+HIGH+LOW+CLOSE)/4,3);
XOPEN:=EMA((REF(OPEN,1)+REF(XCLOSE,1))/2,3);
TEMPG:=MAX(HIGH,XOPEN);
XHIGH:=EMA(MAX(TEMPG,XCLOSE),3);
TEMP:=MIN(LOW,XOPEN);
XLOW:=EMA(MIN(TEMP,XCLOSE),3);
O100:=IF(XOPEN<XCLOSE,XOPEN,XCLOSE);
C100:=IF(XOPEN<XCLOSE,XCLOSE,XOPEN);
STICKLINE(VAR200*SJ>=VAR300 AND C>=O , C,O,3,1),COLORRED;
STICKLINE(VAR200*SJ>=VAR300 AND C>=O,L,MIN(C,O),0,0),COLORRED;
STICKLINE(VAR200*SJ>=VAR300 AND C>=O,H,MAX(C,O),0,0),COLORRED;
STICKLINE(VAR200*SJ>=VAR300 AND C<O,C,O,3,0),COLORRED;
STICKLINE(VAR200*SJ>=VAR300 AND C<O , HIGH,LOW,0,0),COLORRED;
STICKLINE(VAR200<VAR300*SJ AND C>=O , C,O,3,1),COLORCYAN;
STICKLINE(VAR200<VAR300 *SJ AND C>=O,LOW,MIN(C,O),0,0),COLORCYAN;
STICKLINE(VAR200<VAR300*SJ AND C>=O,HIGH,MAX(C,O),0,0),COLORCYAN;
STICKLINE(VAR200<VAR300*SJ AND C<O,C,O,3,0),COLORCYAN;
STICKLINE(VAR200<VAR300*SJ AND C<O , HIGH,LOW,0,0),COLORCYAN;
生命线:EMA(MA(C,66),60),LINETHICK2,COLORRED;
{生命线:EMA(MA(C,34),60),LINETHICK2,COLORRED;}
DRAWTEXT(ISLASTBAR AND (生命线<XCLOSE*SJ),生命线,' -做多为主'),COLORRED;
DRAWTEXT(ISLASTBAR AND (生命线*SJ>=XCLOSE),生命线,' -做空为主'),COLORGREEN;
DRAWTEXT(CROSS(VAR200,VAR300) AND XCLOSE*SJ>=生命线,LL,'多'),COLORRED;
DRAWICON(CROSS(VAR200,VAR300) AND XCLOSE*SJ>=生命线,LL,38),COLORRED;
DRAWTEXT(CROSS(VAR300,VAR200) AND XCLOSE*SJ>=生命线,XHIGH,'平多'),COLORMAGENTA;
DRAWTEXT(CROSS(VAR300,VAR200) AND XCLOSE<生命线*SJ,HH,'空'),COLORGREEN;
DRAWICON(CROSS(VAR300,VAR200) AND XCLOSE<生命线*SJ,HH,39),COLORGREEN,DRAWABOVE;
DRAWTEXT(CROSS(VAR200,VAR300) AND XCLOSE<生命线*SJ,XLOW,'平空');
DRAWTEXT(CROSS(XCLOSE,生命线) AND VAR200*SJ>=VAR300,LL,'多'),COLORRED;
DRAWICON(CROSS(XCLOSE,生命线) AND VAR200*SJ>=VAR300,LL,38),COLORRED;
DRAWTEXT(CROSS(生命线,XCLOSE) AND VAR200<VAR300*SJ,HH,'空'),COLORGREEN;
DRAWICON(CROSS(生命线,XCLOSE) AND VAR200<VAR300*SJ,HH,39),COLORGREEN,DRAWABOVE;
IF((生命线*SJ>=XCLOSE),生命线,DRAWNULL),LINETHICK3,COLORGREEN;
IF((生命线<XCLOSE*SJ),生命线,DRAWNULL),LINETHICK3,COLORRED;
{CCA:=MAX(C,O);
CCB:=MIN(C,O);
CCC:=(C-O)+(CCB-L)-(H-CCA);
CCI:=BARSLAST(NOT(DAY=REF(DAY,1)));
CCD:=CCC*(V/2) ;
CCE:=SUM(CCD,0);
CCF:=MA(CCE,1);
CE1:=MA(CCF,1);
CE2:=CE1,COLORRED,LINETHICK1;
PJZ:=MA(ABS(CE2-REF(CE2,1)),30);
DRAWTEXT(CE2*SJ-REF(CE2,1)*SJ>PJZ*8&&CE2-REF(CE2,1)>REF(CE2,1)-REF(CE2,2),L,'买多'),COLORYELLOW;
DRAWTEXT(REF(CE2,1)*SJ-CE2>PJZ*8&&REF(CE2,1)-CE2>REF(CE2,2)-REF(CE2,1),H,'卖空'),COLORGREEN;}
趋势线: 3*SMA((CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100,5,1),3,1);
见底信号: 9;
买入准备: IF(趋势线<=9,50,0)*SJ,COLORMAGENTA;
买入时间: IF(CROSS(趋势线,见底信号)*SJ,100,0),COLORRED;