<PARAM>
[KPCL,0.000000,3333.000000,1.000000]
[YKJ,0.000000,9999.000000,600.000000]
[CK,0.000000,9999.000000,1.000000]
</PARAM>
<PARAMDEFAULTSET>
1
[333.000000,666.000000,333.000000,999.000000]
[600.000000,1000.000000,1000.000000,1000.000000]
[1.000000,1.000000,1.000000,1.000000]
</PARAMDEFAULTSET>
<CODE>
//请手动输入参数YKJ(0,9999,2000) KPCL(0,3333,1)//
A:=EMA(C,1);
B:=EMA(C,5);
NN:=BARSLAST(DATE<>REF(DATE,1))+1;
NR:=VALUEWHEN(NN,DATE);
SETEXPIREDATE('20181002');
RQ:=990806;
NXZ:=NR<(RQ);
DRAWTEXT(NR>=RQ && ISLASTBAR=1,H,'意'),COLORWHITE,FONTSIZE20;
BKN:=COUNTSIG(BK,50);
SKN:=COUNTSIG(SK,50);
M:=0.3;
M1:=0.3;
K1:=0.3;
K2:=0.3;
N:=BARSLAST(DATE<>REF(DATE,1))+1;
OO:=VALUEWHEN(DATE<>REF(DATE,1),O);
HH1:=REF(HHV(H,N*M),N);
LL1:=REF(LLV(L,N*M),N);
HC1:=REF(HHV(C,N*M),N);
LC1:=REF(LLV(C,N*M),N);
HH2:=REF(HHV(H,N*M1),N);
LL2:=REF(LLV(L,N*M1),N);
HC2:=REF(HHV(C,N*M1),N);
LC2:=REF(LLV(C,N*M1),N);
SELLR:=IFELSE((HH1-LC1)>=(HC1-LL1),HH1-LC1,HC1-LL1);
BUYR:=IFELSE((HH2-LC2)>=(HC2-LL2),HH2-LC2,HC2-LL2);
BT:=K1*BUYR;
ST:=K2*SELLR;
HH:=OO+BT;
LL:=OO-ST;
YK:=TPROFIT_REF(1)<YKJ*(KPCL*3) && TPROFIT_REF(2)<YKJ*(KPCL*3) && TPROFIT_REF(3)<YKJ*(KPCL*3);
VL:=IFELSE(TNUMSEQLOSS>=2,3*KPCL,IFELSE(TNUMSEQLOSS=1,KPCL*2,KPCL));
VOX:=IFELSE(YK,VL,KPCL);
BKVOL=0 && A>HH && NXZ && BKN=0 && A>B,BK(VOX);
BKVOL>0 && A<LL && A<BKHIGH*0.99 && A<BKPRICE,SP(BKVOL);
BKVOL>0 && A<HH && A<BKHIGH*0.98,SP(BKVOL);
SKVOL=0 && A<LL && NXZ && SKN=0 && A<B,SK(VOX);
SKVOL>0 && A>HH && A>SKLOW*1.01 && A>SKPRICE,BP(SKVOL);
SKVOL>0 && A>LL && A>SKLOW*1.02,BP(SKVOL);
SETALLSIGPRICETYPE(TRACING_ORDER);
SETMOVEOPIPRICE(TRACING_ORDER);
TRADE_OTHER('AUTO');
P1:IFELSE(A>BKPRICE,BKHIGH*0.98,BKHIGH*0.99),DOT,COLORRED;
P2:IFELSE(A<SKPRICE,SKLOW*1.02,SKLOW*1.01),DOT,COLORCYAN;
CLOSEKLINE(2,CK);
累积盈亏..MONEYREAL-INITMONEY,COLORYELLOW,BOLD;
//TRADE_OTHER('AUTO');//映射交易主力合约
</CODE>
<VERSION>
130112
</VERSION>
<EDITTIME>
2018年12月29日19:28:20
</EDITTIME>
<PROPERTY>
1
</PROPERTY>