注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

天意(专注股票)

对股票一往情深,享受成功与失败

 
 
 

日志

 
 
关于我

对股票一往情深,享受成功与失败。 声明: 本博客只是个人的一些看法,不对任何个人和团体构成投资依据和建议,据此操作,风险自担。

网易考拉推荐

SBMA  

2013-11-23 13:59:37|  分类: 股票编程 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
{MA & MACD}
MA6: MA(C,5);
MA12: MA(C,13);
MA24: MA(C,21);
MA33: MA(C,33);
MA60: MA(C,60);
MA120: MA(C,120);
M250: MA(C,250);

DIF:=EMA(CLOSE,12)-EMA(CLOSE,26);
DEA:=EMA(DIF,9);
SLOPE_DEA:=(DEA-REF(DEA,1))*100;
买线:=EMA(C,2);
卖线:=EMA(SLOPE(C,21)*20+C,42);   

{抄底}
UP:=0.02; {当日涨幅}
QTY:=1.7; {放量比}
FANTAN:=0.15; {创新低后的反弹涨幅}
DOWN:=0.30; {累计跌幅}
CD1:=DEA<0 AND DIF<0 AND (CLOSE-OPEN)/OPEN>UP AND (HIGH-CLOSE)/(CLOSE-OPEN)<0.4;
CD2:=(VOL/REF(MA(VOL,5),1))>QTY OR ((MA(VOL,2)/REF(MA(VOL,5),2))>QTY AND (REF(HIGH,1)-REF(CLOSE,1))/(REF(CLOSE,1)-REF(OPEN,1))<0.4); {放量}
CD3:=(REF(CLOSE,1)-LLV(CLOSE, 20))/REF(CLOSE,1)<FANTAN; {创新低后的反弹涨幅}
CD4:=((HHV(CLOSE, 60)-LLV(CLOSE,20))/HHV(CLOSE, 60))>DOWN;{累计跌幅}
CD:=CD1 AND CD2 AND CD3 AND CD4; {抄底}
CHIYOU_CD:=CD OR (REF(CD, 1) AND CLOSE>OPEN) OR (REF(CD, 1) AND DIF>REF(DIF, 1)) OR (REF(CD, 2) AND DIF>REF(DIF, 1)) OR (REF(CD, 3) AND DIF>REF(DIF, 1)) OR (REF(CD, 4) AND DIF>REF(DIF, 1)) OR (REF(CD, 1) AND CLOSE>MA(CLOSE, 5)) OR (REF(CD, 2) AND CLOSE>MA(CLOSE, 5)) OR (REF(CD, 3) AND CLOSE>MA(CLOSE, 5)) OR (REF(CD, 4) AND CLOSE>MA(CLOSE, 5)); {防回吐}


{低位买进DEA<0}
TIAOJIAN_MA:=((CLOSE>MA(C,5) AND MA(C,10)>REF(MA(C,10),1)) OR (CLOSE>MA(C,5) AND CLOSE>MA(C,20))) AND MA(C,5)>REF(MA(C,5),1);
BUY_LOW:=DEA<0 AND 买线>卖线 AND DIF>DEA AND DIF>REF(DIF,1) AND CLOSE>OPEN AND TIAOJIAN_MA AND SLOPE_DEA>0.5;
CHIYOU0:=REF(BUY_LOW,1) AND DIF>DEA AND DEA>REF(DEA,1); {防震仓}
CHIYOU1:=(CHIYOU0 OR REF(CHIYOU0,1) OR REF(CHIYOU0,2) OR REF(CHIYOU0,3) OR REF(CHIYOU0,4)) AND DIF>DEA AND DEA>REF(DEA,1) AND (CLOSE>MA(C,12) OR CLOSE>MA(C,7));{防震仓}

{上升通道买进DEA>0 AND DIF>DEA}
BUY_SHENG:=(DIF>0 OR DEA>0) AND DIF>DEA AND DEA>REF(DEA,1) AND CLOSE>MA(C,9) AND CLOSE>OPEN AND SLOPE_DEA>1;
CHIYOU21:=BUY_SHENG OR REF(BUY_SHENG,1) OR REF(BUY_SHENG,2) OR REF(BUY_SHENG,3) OR REF(BUY_SHENG,4) OR REF(BUY_SHENG,5) OR REF(BUY_SHENG,6) OR REF(BUY_SHENG,7) OR REF(BUY_SHENG,8) OR REF(BUY_SHENG,9);
CHIYOU22:=(DIF>REF(DIF,1) OR (DIF-DEA)>0.03);
CHIYOU23:=CLOSE>MA(CLOSE,12) OR (CLOSE>MA(CLOSE,15) AND (CLOSE-LLV(CLOSE,60))/LLV(CLOSE,60)<0.4);
CHIYOU2:=CHIYOU21 AND CHIYOU22 AND CHIYOU23;

{高位买进DIF>0 AND DEA>0 AND DIF<DEA};
BUY_HIGH:=DIF>0 AND DEA>0.2 AND REF(DIF,1)<REF(DEA,1) AND DIF>REF(DIF,1) AND MA(C,5)>REF(MA(C,5),1);
CHIYOU3:=(BUY_HIGH OR REF(BUY_HIGH,1) OR REF(BUY_HIGH,2) OR REF(BUY_HIGH,3) OR REF(BUY_HIGH,4) OR REF(BUY_HIGH,5)) AND DEA>REF(DEA,1) AND CLOSE>MA(CLOSE,7); {防震仓}

{买卖条件}
BUY1:=CD OR CHIYOU_CD OR BUY_LOW OR CHIYOU0 OR CHIYOU1 OR BUY_SHENG OR CHIYOU2 OR BUY_HIGH OR CHIYOU3;
{逃顶}
YING:=20; {长影比}
AA:=0.03; {冲高幅度}
{逃顶:跌破9日线}
TAODING1:=(HHV(HIGH, 20)=HIGH) AND CLOSE<MA(C,9);{逃顶:跌破9日线}
{逃顶:长上影}
TAODING2:=(HHV(HIGH, 60)=HIGH) AND ((HIGH-CLOSE)/(CLOSE-LOW)>YING) AND ((HIGH-CLOSE)/CLOSE>AA) AND DEA>0.3 ;{逃顶:长上影}
{逃顶:放量}
TAODING3:=(HHV(HIGH, 60)=HIGH) AND (VOL/REF(MA(VOL,5),1)>1.7) AND DEA>0.3 AND (CLOSE-OPEN)/OPEN<0.02;{逃顶:放量}
{逃顶:涨幅>50%, SLOPE_DEA<1}
TAODING4:=(CLOSE-LLV(CLOSE,60))/LLV(CLOSE,60)>1.5 AND SLOPE_DEA<1;
{逃顶:涨幅>30%}
TAODING:=(TAODING1 OR TAODING2 OR TAODING3) AND TAODING4 AND (CLOSE-LLV(CLOSE,60))/LLV(CLOSE,60)>1.3;
BUY:=BUY1 AND NOT(TAODING) AND NOT(REF(TAODING,1)) AND NOT(REF(TAODING,2)) AND NOT(REF(TAODING,3)) AND NOT(REF(TAODING,4)) AND NOT(REF(TAODING,5)) AND NOT(REF(TAODING,6)) AND NOT(REF(TAODING,7)) AND NOT(REF(TAODING,8)) AND NOT(REF(TAODING,9)) AND NOT(REF(TAODING,10));
SALE:=NOT(BUY) OR TAODING OR REF(TAODING,1) OR REF(TAODING,2) OR REF(TAODING,3) OR REF(TAODING,4) OR REF(TAODING,5) OR REF(TAODING,6) OR REF(TAODING,7) OR REF(TAODING,8) OR REF(TAODING,9) OR REF(TAODING,10);


{画图}
BU:=REF(SALE,1) AND BUY;
SAL:=REF(BUY,1) AND SALE;
DRAWTEXT(BU,LOW,'B'),COLORRED;
DRAWTEXT(SAL,HIGH,'S'),COLORGREEN;
EN_DISP1:=TAODING AND NOT(REF(TAODING,1)) AND NOT(REF(TAODING,2)) AND NOT(REF(TAODING,3)) AND NOT(REF(TAODING,4)) AND NOT(REF(TAODING,5)) AND NOT(REF(TAODING,6)) AND NOT(REF(TAODING,7)) AND NOT(REF(TAODING,8));
DRAWTEXT(EN_DISP1,HIGH,' 顶'),COLORGREEN;
EN_DISP2:=BUY_HIGH AND NOT(REF(BUY_HIGH,1)) AND NOT(REF(BUY_HIGH,2)) AND NOT(REF(BUY_HIGH,3)) AND NOT(REF(BUY_HIGH,4));
DRAWTEXT(EN_DISP2,LOW,' 高'),COLORRED;
EN_DISP3:=CD AND NOT(REF(CD,1)) AND NOT(REF(CD,2)) AND NOT(REF(CD,3)) AND NOT(REF(CD,4)) AND NOT(REF(CD,5)) AND NOT(REF(CD,6));
DRAWTEXT(EN_DISP3,LOW,' 底'),COLORRED;

{选股}
{BUYBUY:BUY AND CLOSE>OPEN AND NOT(EN_DISP2) AND NOT(REF(BUY1,4));};
  评论这张
 
阅读(339)| 评论(0)
推荐 转载

历史上的今天

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017