龙听期货论坛's Archiver

龙听 发表于 2018-4-27 13:56

郑糖领航[文华赢智源码]

源码如下:
[code]
O:=OPEN;
H:=HIGH;
L:=LOW;
C:=CLOSE;
HH:=IF(H>REF(H,1)&&H>REF(H,2)&&H>REF(H,3)&&H>REF(H,4)&&H>REF(H,5)&&L<REF(L,1)&&L<REF(L,2) &&L<REF(L,3)&&L<REF(L,4)&&L<REF(L,5),H-(H-L)*0.333,H);
LL:=IF(H>REF(H,1)&&H>REF(H,2)&&H>REF(H,3)&&H>REF(H,4)&&H>REF(H,5)&&L<REF(L,1)&&L<REF(L,2) &&L<REF(L,3)&&L<REF(L,4)&&L<REF(L,5),(H-L)*0.333+L,L);
H1:=VALUEWHEN(H>REF(H,1)&&H>REF(H,2)&&H>REF(H,3)&&H>REF(H,4)&&H>REF(H,5),HH);
H2:=VALUEWHEN(H>REF(H,1)&&H>REF(H,2)&&H>REF(H,3)&&H>REF(H,4)&&H>REF(H,5),LL);
L1:=VALUEWHEN(L<REF(L,1)&&L<REF(L,2)&&L<REF(L,3)&&L<REF(L,4)&&L<REF(L,5),LL);
L2:=VALUEWHEN(L<REF(L,1)&&L<REF(L,2)&&L<REF(L,3)&&L<REF(L,4)&&L<REF(L,5),HH);
BH:=BARSLAST(H>REF(H,1)&&H>REF(H,2)&&H>REF(H,3)&&H>REF(H,4)&&H>REF(H,5));
BL:=BARSLAST(L<REF(L,1)&&L<REF(L,2)&&L<REF(L,3)&&L<REF(L,4)&&L<REF(L,5));
B:=IF(BL<BH&&C>L2||BH<BL&&C>REF(H1,1)||C>REF(HHV(H,5),1),1,IF(BH<BL&&C<H2||BL<BH&&C<REF(L1,1)||C<REF(LLV(L,5),1),-3,0));
B1:=VALUEWHEN(B<>0,B);
G:=IF(BL<BH&&B1=1,REF(L1,1),IF(BH<BL&&B1=1,REF(H2,1),IF(BH<BL&&B1=-3,REF(H1,1),IF(BL<BH&&B1=-3,REF(L2,1),REF(L2,1)))));
G1:=VALUEWHEN(ISLASTBAR,G);
DRAWNUMBER(L>0,G1,G1,0,COLORMAGENTA);
W1:=IF(C>=G,1,-3);
W1=1 && DATE<20080501,BPK;
W1=-3,SPK;
[/code]

页: [1]