Bootstrap

文华财经t8自动化交易程序模型源码

文华财经t8自动化交易程序模型源码:

//定义变量

B:=IF(LOWERLONG_PLACE>0,LOWERLONG_PRICE,SKPRICE);

S:=IF(ADDLONG_PLACE>0,ADDLONG_PRICE,BKPRICE);

//多头策略

DD,BK;

SKLOW>S-100*MINPRICE&&SKVOL>0&&C>REF(H+1*MINPRICE,BARSSK),BP;

SKLOW>S-100*MINPRICE&&SKVOL>0&&DD,BPK;

SKLOW<S-100*MINPRICE&&SKVOL>0&&DD&&COUNT(KK,BARSSK+1)>=2,BPK;

BKHIGH>B+100*MINPRICE&&BKVOL>0&&C<=B+10*MINPRICE,SP;

BKHIGH>B+150*MINPRICE&&BKVOL>0&&C<=B+70*MINPRICE,SP;

BKHIGH>B+300*MINPRICE&&BKVOL>0&&C<=B+120*MINPRICE,SP;

BKHIGH>B+400*MINPRICE,SP;

//空头策略

KK,SK;

BKHIGH<B+100*MINPRICE&&BKVOL>0&&C<REF(L-1*MINPRICE,BARSBK),SP;

BKHIGH<B+100*MINPRICE&&BKVOL>0&&KK,SPK;

BKHIGH>B+100*MINPRICE&&BKVOL>0&&KK&&COUNT(DD,BARSBK+1)>=2,SPK;

SKLOW<S-100*MINPRICE&&SKVOL>0&&C>=S-10*MINPRICE,BP;

SKLOW<S-150*MINPRICE&&SKVOL>0&&C>=S-70*MINPRICE,BP;

SKLOW<S-300*MINPRICE&&SKVOL>0&&C>=S-120*MINPRICE,BP;

SKLOW<S-400*MINPRICE&&SKVOL>0,BP;

//设置

AUTOFILTER;

SETSIGPRICETYPE(BPK,OTHER);

SETSIGPRICETYPE(SPK,OTHER);

SETOTHERPRICE(SPK,NEXT_OPEN);

SETOTHERPRICE(BPK,NEXT_OPEN);

;