九毛八公式指标
公式模块:
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,8,0),colorAA;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,8,0),color998855;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,5,0),colorCC;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),colorDD;
STICKLINE(CLOSE>OPEN,HIGH,LOW,0,0),colorFF;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,5,0),colorBBAA77;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,3,0),colorDDCC99;
STICKLINE(CLOSE<OPEN,HIGH,LOW,0,0),colorFFEEBB;
FH:=HIGH;
FL:=LOW;
SELL:=0*FH;
BUY:=SELL;
SIGNAL:=SELL;
BOXH:SELL,LINETHICK0;
BOXL:SELL,LINETHICK0;
VARIABLE:HC=0,LC=0,BT=FH[1],BB=FH[1];
FOR I=1 TO DATacOUNT DO BEGIN
IF HC>1 THEN BEGIN
IF LC>2 AND BT<=FH[I] THEN BEGIN
BUY[I]:=1;
FOR J=I-1 DOWNTO I-HC DO BEGIN
BOXH[J]:=FH[I-HC],LINETHICK0;
BOXL[J]:=FL[I-LC],LINETHICK0;
END;
HC:=0;
LC:=0;
END;
IF BT>FH[I] THEN BEGIN
IF LC>2 THEN BEGIN
IF BB>=FL[I] THEN BEGIN
SELL[I]:=1;
FOR J=I-1 DOWNTO I-HC DO BEGIN
BOXH[J]:=FH[I-HC],LINETHICK0;
BOXL[J]:=FL[I-LC],LINETHICK0;
END;
HC:=-1;
LC:=0;
END;ELSE BEGIN
BOXH[I]:=FH[I-HC],LINETHICK0;
BOXL[I]:=FL[I-LC],LINETHICK0;
END;
END;
HC:=HC+1;
IF LC>1 THEN BEGIN
IF BB<FL[I] THEN BEGIN
LC:=LC+1;
IF LC=3 THEN BEGIN
SIGNAL[I-HC+1]:=1;
FOR J=I DOWNTO I-HC+1 DO BEGIN
BOXH[J]:=FH[I-HC+1],LINETHICK0;
BOXL[J]:=FL[I-LC+1],LINETHICK0;
END;
END;
END;ELSE
LC:=0;
END;ELSE
IF LC=1 THEN BEGIN
IF BB<FL[I] THEN BEGIN
LC:=LC+1;
END;ELSE
LC:=0;
END;
IF LC=0 AND HC>1 THEN BEGIN
BB:=FL[I];
LC:=LC+1;
END;
END;ELSE BEGIN
HC:=0;
LC:=0;
END;
END;ELSE
IF HC=1 THEN BEGIN
IF BT>FH[I] THEN
HC:=HC+1;ELSE BEGIN
HC:=0;
LC:=0;
END;
END;
IF HC=0 THEN BEGIN
BT:=FH[I];
HC:=HC+1;
END;
END;
PARTLINE(BOXH AND BOXH=REF(BOXH,1),BOXH),LINEDOT,colorFFFF;
PARTLINE(BOXL AND BOXL=REF(BOXL,1),BOXL),LINEDOT,colorFFFF;
STICKLINE((SIGNAL OR REFX(BUY OR SELL,1)) AND BOXH,BOXH,BOXL,0.1,0),LINEDOT,colorFFFF;
DRAWICON(BUY,LOW*0.98,4);
DRAWICON(SELL,HIGH*1.02,5);
PARTLINE(BOXH AND BOXH=REF(BOXH,1),(BOXH-BOXL)/2+BOXL),colorWHITE ;
PARTLINE(BOXH AND BOXH=REF(BOXH,1),(BOXH-BOXL)/3+BOXL),colorMAGENTA;
PARTLINE(BOXH AND BOXH=REF(BOXH,1),(BOXH-BOXL)*0.125+BOXL),colorGREEN;
STICKLINE((SIGNAL OR REFX(BUY OR SELL,1)) AND BOXH,BOXH,BOXL,0.1,0),LINEDO