网站标志
当前日期时间
当前时间:
公布别人的一套源码,请勿实盘。
作者:管理员    发布于:2015-06-07 15:09:36    文字:【】【】【

这是一组别人的模型,经过测试,不想亏钱的不要使用,可以学习模型的编写

abb:=not(islastbar) or (islastbar and tholding2=0);
ma1:ma(c,5);
ma2:ma(c,10);
ma3:ma(c,20);
ma4:ma(c,60);

创丰1号-A:VALUEWHEN(TIME=0916,O),COLORMAGENTA;

DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);
DEA  := EMA(DIFF,9);
MACD1 := 2*(DIFF-DEA), COLORSTICK;

VARIABLE: aspect=0;
VARIABLE: stopprice=0;
VARIABLE: stopnum = 1.6;

RUNMODE:0;  

if barpos = 0 then
  stopprice := l - stopnum;

if aspect = 0 then
begin
 
 if l <= stopprice then
 begin

  aspect:= 1;
  stopprice := h+stopnum;
 end
 

 if l - stopnum > stopprice then
  stopprice := l-stopnum;
end

if aspect = 1 then
begin

 if h >= stopprice then
 begin

  aspect:= 0;
  stopprice := l-stopnum;
 end
 

 if h + stopnum < stopprice then
  stopprice := h+stopnum;
end //www.jgy8.com


RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;

手数:=1;
a1:=k>ref(k,1) and c-ENTERPRICE>=9 ;
a2:=k<ref(k,1) and c-ENTERPRICE<=-9 ;


EMA13:=EMA(C,10),COLORWHITE;
EMA21:=EMA(C,21),COLORYELLOW;
EMA34:=EMA(C,34),COLORFF00FF;
EMA60:=MA(C,55),COLORFFCC66;
X1:=(C+L+H)/3;
X2:=EMA(X1,5);
X3:=EMA(X2,4);

STICKLINE(C>stopprice,LOW,HIGH,0.1,1),COLORRED;
STICKLINE(C>stopprice,CLOSE,OPEN,3,1),COLORRED;
STICKLINE(C<stopprice,LOW,HIGH,0.1,1),COLORFFFF52;
STICKLINE(C<stopprice,CLOSE,OPEN,3,0),COLORFFFF52;

 

BUY1:=(K>REF(K,1)&&D<REF(D,1)&&J>REF(J,1))&&C>stopprice&&time>0915&&time<=1510 and macd1>ref(macd1,1) and  holding<=0 ;
SELL1:=(J<REF(J,1)&&K<REF(K,1)&&D>REF(D,1))&&C<stopprice&&time>0915&&time<=1510 and  macd1<ref(macd1,1) and holding>=0 ;

VARIABLE:DUOKONG=0;
TSFS:=0;
ORDVOL:=1;     {开仓手数}
ZSDS:=8;    

VARIABLE:YDZY=1; 
VARIABLE:HIGHPRICE=0,LOWPRICE=0;
VARIABLE:DHCDS=5,KHCDS=5;
VARIABLE:DYLDS=1,KYLDS=1; 
VARIABLE:Z3B1:=1; 
DUOKONG:=1;

IF HOLDING<0 THEN BEGIN
 IF BUY1 THEN BEGIN  
  空平:SELLSHORT(1,ORDVOL,THISCLOSE),ORDERQUEUE;
 END
 

 IF  a1 THEN BEGIN
  空损:SELLSHORT(1,ORDVOL,THISCLOSE),ORDERQUEUE;
   多1开:BUY(1=1,ORDVOL,THISCLOSE),ORDERQUEUE;
 END
 

 IF YDZY=1 THEN BEGIN

  IF L<LOWPRICE THEN BEGIN
   LOWPRICE:=L;
  END
 

  IF ENTERPRICE-LOWPRICE>=KYLDS and c-ENTERPRICE<=-0.2 THEN BEGIN
   IF L-LOWPRICE>=KHCDS THEN BEGIN 
    空赢:SELLSHORT(1,ORDVOL,THISCLOSE),ORDERQUEUE;
   END
  END
 END
 

 IF Z3B1=1 THEN BEGIN
  IF ENTERPRICE-LOWPRICE>=3 THEN BEGIN
   IF ENTERPRICE-L<=1.2 THEN BEGIN

   END
  END
 END
END

IF HOLDING=0 THEN BEGIN
 IF DUOKONG=1 OR DUOKONG=2 THEN BEGIN
  IF BUY1  and abb  THEN BEGIN
   多开:BUY(1=1,ORDVOL,THISCLOSE),ORDERQUEUE;
   HIGHPRICE:=ENTERPRICE;
  END
 END
END

IF HOLDING>0 THEN BEGIN
 IF SELL1 THEN BEGIN 
  多平:SELL(1,ORDVOL,THISCLOSE),ORDERQUEUE;;
 END
 

 IF a2 THEN BEGIN
  多损:SELL(1,ORDVOL,THISCLOSE),ORDERQUEUE;
     空1开:BUYSHORT(1=1,ORDVOL,THISCLOSE),ORDERQUEUE;
 END

 IF YDZY=1 THEN BEGIN

  IF H>HIGHPRICE THEN BEGIN
   HIGHPRICE:=H;
  END
 

  IF HIGHPRICE-ENTERPRICE>=DYLDS and c-ENTERPRICE>=0.2 THEN BEGIN
   IF HIGHPRICE-H>=DHCDS THEN BEGIN 
    多赢:SELL(1,ORDVOL,THISCLOSE),ORDERQUEUE;
   END
  END
 END
 
 IF Z3B1=1 THEN BEGIN
  IF HIGHPRICE-ENTERPRICE>=3 THEN BEGIN
   IF H-ENTERPRICE<=1.2 THEN BEGIN

   END
  END
 END
END// www.jgy8.com

IF HOLDING=0 THEN BEGIN
 IF DUOKONG=1 OR DUOKONG=3 THEN BEGIN
  IF SELL1  and abb  THEN BEGIN
   空开:BUYSHORT(1=1,ORDVOL,THISCLOSE),ORDERQUEUE;
   LOWPRICE:=ENTERPRICE;
  END
 END
END // www.jgy8.com


  IF time>=1513 THEN BEGIN
  收盘平空:SELLSHORT(1,ORDVOL,THISCLOSE),ORDERQUEUE;
  END // www.jgy8.com QQ511411198

  IF time>=1513 THEN BEGIN
  收盘平多:SELL(1,ORDVOL,THISCLOSE),ORDERQUEUE;
  END

 

浏览 (1167) | 评论 (0) | 评分(0) | 支持(0) | 反对(0) | 发布人:管理员
将本文加入收藏夹
文章评论
最新点评
更多点评 发表点评
发表评论
您的评价
差(1) 一般(2) 好(3) 很好(4) 非常好(5)
评论标题
评论内容
验 证 码
看不清?更换一张
匿名发表 
脚注信息

Copyright @ 2009-2011  金广元投资咨询有限公司 福建省泉州安溪金融中心4#楼4楼 4000 258 130