input:N3N(1,1,500);
{N3N---预设参数可以微调,供参考并非绝对}
STICKLINE(CLOSE>OPEN,HIGH,LOW,0.8,0),color131ffd;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,9,0),color131ffd;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,4.5,0),color5454ff;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,3,0),color9393FF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,1.5,0),coloradadFF;
STICKLINE(CLOSE>OPEN,CLOSE,OPEN,0.9,0),colorefffff;
STICKLINE(CLOSE=OPEN and CLOSE>=REF(CLOSE,1),HIGH,LOW,0.8,0),color131ffd;
STICKLINE(CLOSE=OPEN and CLOSE>=REF(CLOSE,1),CLOSE,OPEN,9,1),color131ffd;
STICKLINE(CLOSE<OPEN,HIGH,LOW,0.3,0),colorff3311;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.1,0),colorFFFF00;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,9,0),colorff3311;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,4.5,0),colorff3311;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,3,0),colorffff77;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,1.5,0),colorFFff99;
STICKLINE(CLOSE<OPEN,CLOSE,OPEN,0.9,0),colorefffff;
//N3N:=1;
A1Y:=REF(HIGH,N3N)=HHV(HIGH,2*N3N+1);
B1Z:=FILTER(A1Y,N3N);
C1Z:=BACKSET(B1Z,N3N+1);
D1Z:=FILTER(C1Z,N3N);
A2Z:=REF(LOW,N3N)=LLV(LOW,2*N3N+1);
B2Z:=FILTER(A2Z,N3N);
C2Z:=BACKSET(B2Z,N3N+1);
D2Z:=FILTER(C2Z,N3N);
E1Z:=(REF(LLV(LOW,2*N3N),1)+REF(HHV(HIGH,2*N3N),1))/2;
E2Z:=(HIGH+LOW)/2;
H1Z:=(D1Z AND NOT(D2Z AND E1Z>=E2Z)) OR ISLASTBAR OR BAR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