如下模型請轉為股票交易模型
作者:金字塔 來源:cxh99.com 發布時間:2016年03月16日
- 咨詢內容:
老師好如下模型請轉為股票交易模型.要求開多不開空!
VARIABLE:a=0,b=0,s1=2,s2=2;m:=26;k:=2;MID: MA(CLOSE,M);//布林中軌UPPER: MID + K*STD(CLOSE,M);//布林上軌LOWER: MID - K*STD(CLOSE,M);//布林下軌
kk:cross(h,upper);kd:cross(l,lower);tt:=upper-lower>=30;if kd and tt and holding=0 then begin buy(1,1,market);a:=0;s1:=2;endif enterprice-l=10 and holding>0 and a<6 then beginbuy(1,s1,market);a:=a+1;s1:=2*s1;endif h-enterprice>=16 then sell(holding>0,holding,market);//多頭止盈if enterprice-l>=30 then sell(holding>0,holding,market);//多頭止損if kk and tt and holding=0 then begin buyshort(1,1,market); b:=0; s2:=2; endif enterprice-l=10 and holding<0 and b<6 then beginbuyshort(1,s2,market);b:=b+1;s2:=2*s2;endif enterprice-l>=16 then sellshort(holding<0,holding,market);//空頭止盈if h-ENTERPRICE>=30 then sellshort(holding<0,holding,market);//空頭止損
- 金字塔客服:
你把開空的拿一些刪了不就行了?
- 用戶回復:
不行呢.放到股票試無信號出呢
- 網友回復:
那么原封不動的,有有信號沒?
- 網友回復:
期貨有股票無