2007年3月15日星期四

CS1.5 和 CS1.6 启动窗口模式进行游戏

在快捷方式里加个参数就行。例如:d:\cs1.5\cstrike.exe -win640
注意:加-win640这个参数表示用640X480窗口模式进行游戏,加-win800这个参数表示用800X600窗口模式进行游戏.
如果想恢复全屏游戏,在加个-full参数就行了。
例如:d:\cs1.5\cstrike.exe -win640 -full

--
一步一步教你从互联网赚钱 http://www.zqzn.com/index.asp?rid=key480769
投资理财 http://li-cai.blogspot.com/

2007年3月11日星期日

中文先生的MACD实战源码--yngs

【标题:】中文先生的MACD实战源码--yngs
 
input:LONG(26,20,100),SHORT(12,5,40),M(9,2,60);
DIFF:=(EMA(CLOSE,SHORT) - EMA(CLOSE,LONG));
DEA:=EMA(DIFF,M);
MACD2:=(2 * (DIFF - DEA));
VERTLINE(((CLOSE < 0) AND CROSS(DIFF,0))),color80;
VERTLINE(((CLOSE < 0) AND CROSS(MACD2,0))),color80;
VERTLINE(((CLOSE < 0) AND CROSS(0,DIFF))),color808080;
VERTLINE(((CLOSE < 0) AND CROSS(0,MACD2))),color808080;
DU0:=CROSS(DIFF,0);
UD0:=CROSS(0,DIFF);
TDU0:=BARSLAST(DU0);
TUD0:=BARSLAST(UD0);
DU3:=REF(DU0,1);
UD3:=REF(UD0,1);
TDU3:=BARSLAST(DU3);
TUD3:=BARSLAST(UD3);
UDGLINE:=IF((TDU3 < TUD3),REF(HHV(HIGH,2),TDU3),REF(LLV(LOW,2),TUD3));
JDU0:=(((REF(CLOSE,1) <= REF(UDGLINE,1)) AND (CLOSE > UDGLINE)) AND (TDU0 < TUD0));
JUD0:=(((REF(CLOSE,1) >= REF(UDGLINE,1)) AND (CLOSE < UDGLINE)) AND (TUD0 < TDU0));
JDU1:=(JDU0 AND (COUNT(JDU0,TDU0) = 1));
JUD1:=(JUD0 AND (COUNT(JUD0,TUD0) = 1));
JDU2:=(JDU1 AND (REF(BARSLAST(JUD1),1) < REF(BARSLAST(JDU1),1)));
JUD2:=(JUD1 AND (REF(BARSLAST(JUD1),1) > REF(BARSLAST(JDU1),1)));
JDU3:=(JDU1 AND (REF(BARSLAST(JUD1),1) > REF(BARSLAST(JDU1),1)));
JUD3:=(JUD1 AND (REF(BARSLAST(JUD1),1) < REF(BARSLAST(JDU1),1)));
BSLINE:=IF((BARSLAST(JDU2) < BARSLAST(JUD2)),IF(REF(CROSS(0,MACD2),1),LLV(LOW,2),REF(LLV(LOW,2),BARSLAST(REF(CROSS(0,MACD2),1)))),IF(REF(CROSS(MACD2,0),1),HHV(HIGH,2),REF(HHV(HIGH,2),BARSLAST(REF(CROSS(MACD2,0),1)))));
DRAWICON((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))),0,10),ALIGN4;
DRAWICON((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))),0,11),ALIGN5;
STICKLINE((MACD2 >= 0),0,MACD2,6,1),colorFF;
STICKLINE(((MACD2 >= 0) AND (MACD2 < REF(MACD2,1))),0,MACD2,6,0),colorFF;
STICKLINE((MACD2 < 0),0,MACD2,6,0),colorFFFF00;
STICKLINE(((MACD2 < 0) AND (MACD2 > REF(MACD2,1))),0,MACD2,6,1),colorFFFF00;
DIF:DIFF,LINETHICK2,colorFFFF;
MACD:DEA,colorFF00;
DEF:MACD2,LINETHICK0,colorFFFF00;
STICKLINE((CLOSE > 0),0,0,10,0),color808080;
DEFUT:=BARSLAST(CROSS(MACD2,0));
DEFDT:=BARSLAST(CROSS(0,MACD2));
DEFUL:=IF((MACD2 >= 0),HHV(MACD2,(DEFUT + 1)),REF(HHV(MACD2,(DEFUT + 1)),(DEFDT + 1)));
DEFDL:=IF((MACD2 < 0),LLV(MACD2,(DEFDT + 1)),REF(LLV(MACD2,(DEFDT + 1)),(DEFUT + 1)));
DEFU2L:=REF(DEFUL,(DEFUT + 1));
DEFD2L:=REF(DEFDL,(DEFDT + 1));
DRAWICON(((((LLV(MACD2,4) > 0) AND (MACD2 < REF(MACD2,1))) AND (REF(MACD2,1) > REF(MACD2,2))) AND (REF(MACD2,2) > REF(MACD2,3))),MACD2,5),ALIGN0;
DRAWICON(((((HHV(MACD2,4) < 0) AND (MACD2 > REF(MACD2,1))) AND (REF(MACD2,1) < REF(MACD2,2))) AND (REF(MACD2,2) < REF(MACD2,3))),MACD2,4);
DRAWICON(((((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))) AND (MACD2 >= 0)) AND (REF(MACD2,1) < REF(DEFU2L,1))) AND (MACD2 > DEFU2L)),MACD2,12),ALIGN0;
DRAWICON(((((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))) AND (MACD2 < 0)) AND (REF(MACD2,1) > REF(DEFD2L,1))) AND (MACD2 < DEFD2L)),MACD2,12);
EXPLAIN(JDU2,'注意长线趋势空转多');
EXPLAIN(JUD2,'注意长线趋势多转空');
EXPLAIN((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))),'长线为多头趋势');
EXPLAIN((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))),'长线为空头趋势');
EXPLAINEX((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))),'MACD多头防守价',BSLINE,2,1);
EXPLAINEX((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))),'MACD空头防守价',BSLINE,2,1);
EXPLAIN(((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))) AND (CLOSE < BSLINE)),'防守价跌破:多头小心');
EXPLAIN(((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))) AND (CLOSE > BSLINE)),'防守价突破:空头小心');
EXPLAIN(((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))) AND CROSS(MACD2,0)),'空头注意今明两日高点压力\n找日落K线放空,用线控盘');
EXPLAIN(((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))) AND CROSS(0,MACD2)),'多头注意今明两日低点支撑\n找日出K线做多,用线控盘');
EXPLAIN(((((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))) AND (MACD2 >= 0)) AND (REF(MACD2,1) < REF(DEFU2L,1))) AND (MACD2 > DEFU2L)),'DEF柱状特殊研判\n空头注意今明两日高点压力');
EXPLAIN(((((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))) AND (MACD2 < 0)) AND (REF(MACD2,1) > REF(DEFD2L,1))) AND (MACD2 < DEFD2L)),'DEF柱状特殊研判\n多头注意今明两日低点支撑');
EXPLAINEX((REF((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))),1) AND CROSS(REF(MACD2,1),0)),'空头注意压力',HHV(HIGH,2),2,1);
EXPLAIN((REF((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))),1) AND CROSS(REF(MACD2,1),0)),'找日落K线放空,用线控盘');
EXPLAINEX((REF((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))),1) AND CROSS(0,REF(MACD2,1))),'多头注意支撑',LLV(LOW,2),2,1);
EXPLAIN((REF((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))),1) AND CROSS(0,REF(MACD2,1))),'找日出K线进场,用线控盘');
EXPLAIN(((((LLV(MACD2,4) > 0) AND (MACD2 < REF(MACD2,1))) AND (REF(MACD2,1) > REF(MACD2,2))) AND (REF(MACD2,2) > REF(MACD2,3))),'请注意DEF柱状缩头');
EXPLAIN(((((HHV(MACD2,4) < 0) AND (MACD2 > REF(MACD2,1))) AND (REF(MACD2,1) < REF(MACD2,2))) AND (REF(MACD2,2) < REF(MACD2,3))),'请注意DEF柱状缩脚');
 
 

--
一步一步教你从互联网赚钱 http://www.zqzn.com/index.asp?rid=key480769
投资理财 http://li-cai.blogspot.com/

<绝佳买点>原码


不错的公式<绝佳买点>原码
http://bbs.88158.cn/thread-34591-1-1.html
 
{N:=3}
Var1:=MA(HHV(HIGH,485),17);
Var2:=MA(HHV(HIGH,222),17);
Var3:=MA(HHV(HIGH,96),17);
Var4:=MA(LLV(LOW,485),17);
Var5:=MA(LLV(LOW,222),17);
Var6:=MA(LLV(LOW,96),17);
Var7:=MA((Var4*0.96+Var5*0.96+Var6*0.96+Var1*0.558+Var2*0.558+Var3*0.558 )/6,17);
Var8:=MA((Var4*1.25+Var5*1.23+Var6*1.2+Var1*0.55+Var2*0.55+Var3*0.65)/6,17);
Var9:=MA((Var4*1.3+Var5*1.3+Var6*1.3+Var1*0.68+Var2*0.68+Var3*0.68)/6,17);
VarA:=MA((Var7*3+Var8*2+Var9)/6*1.738,17);
VarD:=REF(LOW,1);
VarE:=SMA(ABS(L-VarD),3,1)/SMA(MAX(L-VarD,0),N,1)*100;
VarF:=MA(IF(CLOSE*1.35<=VarA,VarE*10,VarE/10),N);
Var10:=LLV(LOW,30);
Var11:=HHV(VarF,30);
绝佳买点:=MA(IF(LOW<=Var10,(VarF+Var11*2)/2,0),N);
I:=IF(CLOSE<REF(CLOSE,1),VOL/CAPITAL*10053,0);
骤雨初晴:ABS(EMA(I,13.3)-18)/WINNER(CLOSE)*IF((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)<-0.03,1,0);
短线买:if(绝佳买点>500 and 绝佳买点>2500,100,0),coloryellow,LINETHICK3;
中线买:if(绝佳买点>10000 and 绝佳买点>20000,200,0),colorff00ff,LINETHICK3;
倾家荡产买:if(绝佳买点>30000 ,300,0),colorred,LINETHICK3 ;
 


--
一步一步教你从互联网赚钱 http://www.zqzn.com/index.asp?rid=key480769
投资理财 http://li-cai.blogspot.com/

<实战助手>原码奉献

好多人想要的<实战助手>原码奉献
http://bbs.88158.cn/thread-34594-1-1.html
 
Var3:=(2*CLOSE+HIGH+LOW)/4;
Var4:=LLV(LOW,34);
Var5:=HHV(HIGH,34);
散户: EMA((Var3-Var4)/(Var5-Var4)*100,13);
新庄: EMA(0.667*REF(散户,1)+0.333*散户,2) ;
高抛低吸分界线: 50, CROSSDOT;
DRAWTEXT(CROSS(散户,新庄) AND 散户<22,20,'行情在绝望中诞生!'),colorwhite, ;
DRAWICON(CROSS(散户,新庄) AND 散户<22,25,1);
DRAWTEXT(CROSS(散户,30) AND 新庄<散户,40,'在犹豫中上扬! '),coloryellow, ;
DRAWICON(CROSS(散户,30) AND 新庄<散户,35,1);
DRAWTEXT(CROSS(散户,65) AND 新庄<散户,55,'在无奈中叹息! '),colorffff00 , ;
DRAWICON(CROSS(散户,65) AND 新庄<散户,70,2);
DRAWTEXT(CROSS(散户,75) AND 新庄<散户,67,'小心!在清醒时套牢! '),colorred , ;
DRAWICON(CROSS(散户,75) AND 新庄<散户,80,2);
DRAWTEXT(CROSS(新庄,散户) AND 新庄>75,80,'在憧憬中毁灭!'),colorgreen , ;
DRAWICON(CROSS(新庄,散户) AND 新庄>75,85,2);
逢低吸呐: IF(CROSS(散户,新庄) AND 散户<40,25,10),colorred,linethick2;
逢高减磅: IF(CROSS(新庄,散户) AND 新庄>75,75,90),colorgreen,linethick2;
 


--
一步一步教你从互联网赚钱 http://www.zqzn.com/index.asp?rid=key480769

2007年3月8日星期四

抓主升浪公式

{ 抓主升浪公式}
Var1:=WINNER(CLOSE*0.900)*100;
Var2:=VOL/CAPITAL*100;
Var3:=Var1-Var2;
Var4:=Var3<1;
Var5:=Var3>=1 AND Var3<5;
Var6:=Var3>=5 AND Var3<10;
Var7:=Var3>=10 AND Var3<25;
Var8:=Var3>=25;
极弱股:IF(Var4, (-10), 0),COLORff3399, STICK;
弱势股:IF(Var5, (-5), 0),coloryellow, STICK;
转型股:IF(Var6, 5, 0),COLOR0066FF, STICK;
强势股:IF(Var7, 10, 0),colorgreen, STICK;
主升浪:IF(Var8, 15, 0),colorffff00, STICK;
{中期见顶原码 }
庄筹估算:EMA(WINNER(C)*70,5) ;
散筹估算:EMA((WINNER(C*1.1)-WINNER(C*0.9))*80,5) ;
cc:=FILTER( (CROSS(5,庄筹估算) and 散筹估算<20 )*60,10 );
抄底:cc,coloryellow;
DRAWTEXT(cc ,11 ,'抄底' ) ,coloryellow;
aa:= ref(庄筹估算,30)>40 or ref(庄筹估算,20)>40;
bb:=CROSS(28,庄筹估算) and 散筹估算>40 and aa=1 {and LLV(l ,60 )>LLV(l ,250 )};
洗盘:IF(bb ,30 ,60 );
DRAWTEXT(FILTER(bb,4) ,66 ,'洗盘' ) ;
DRAWTEXT(庄筹估算>60,58,'★'),colorred;
stickline(庄筹估算<散筹估算 and 散筹估算<60,散筹估算,55,1,0),colorgreen;
stickline(庄筹估算>散筹估算,散筹估算,50,1,0),colorred;
stickline(庄筹估算<散筹估算,庄筹估算,0,0,0),coloryellow
{庄家行踪}
Var1:=EMA(EMA(CLOSE,13),13);
控盘:= (Var1-REF(Var1,1))/REF(Var1,1)*1000,colorffcccc,pointdot;
STICKLINE(控盘<0,控盘,0,4,0),colorwhite;
无庄控盘:控盘<0,colorwhite;
STICKLINE(控盘>REF(控盘,1) AND 控盘>0,控盘,0,4,1),colorred;
有庄控盘: 控盘>REF(控盘,1) AND 控盘>0,colorred;
Var2:=100*WINNER(CLOSE*0.95);
STICKLINE(控盘<REF(控盘,1) AND 控盘>0,控盘,0,4,0),color00ff00;
主力出货: 控盘<REF(控盘,1) AND 控盘>0,color00ff00;
STICKLINE(Var2>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0,4,0),colorff00ff;
高度控盘: Var2>50 AND COST(85)<CLOSE AND 控盘>0,colorff00ff;
a10:=CROSS(控盘,0);
开始控盘:if(a10,6,0),coloryellow;
解读一下3个副图指标的用途
1.指标能反应出强势股的特征,结合均线金叉原理找买进点(日线均线参数10-30-60-120-250-500).在操作中要用指标的起点,不要用在发现指标的尾段。
2.避免了在长期均线(日线120-250-500)压制下的股票操作。
3.3个副图指标要一起用,用在找股票是很好的,发现启动点后,实际操作用30-60分钟波段指标,更为准确。
4.用这3个指标可以查一下你手上操作股票,就能知道是强势还是弱势股票。
还可以关注现在,在横向运行的股票何时发出强势的信号。
5.这3个指标大智慧里分钟图里不能用,真是太可惜了。
 
 
 
合成一个(分析家)
 

{ 抓主升浪公式}
Var1:=WINNER(CLOSE*0.900)*100;
Var2:=VOL/CAPITAL*100;
Var3:=Var1-Var2;
Var4:=Var3<1;
Var5:=Var3>=1 AND Var3<5;
Var6:=Var3>=5 AND Var3<10;
Var7:=Var3>=10 AND Var3<25;
Var8:=Var3>=25;
极弱股:IF(Var4, (-10), 0),LINETHICK2,COLORff3399, STICK;
弱势股:IF(Var5, (-5), 0),LINETHICK2,coloryellow, STICK;
转型股:IF(Var6, 5, 0),LINETHICK2,COLOR0066FF, STICK;
强势股:IF(Var7, 10, 0),LINETHICK2,colorgreen, STICK;
主升浪:IF(Var8, 15, 0),LINETHICK2,colorffff00, STICK;
{庄家行踪}
Var11:=EMA(EMA(CLOSE,13),13);
控盘:= (Var11-REF(Var11,1))/REF(Var11,1)*1000;
STICKLINE(控盘<0,控盘,0,8,0),colorwhite;
无庄控盘:控盘<0,colorwhite;
STICKLINE(控盘>REF(控盘,1) AND 控盘>0,控盘,0,8,1),colorred;
有庄控盘: 控盘>REF(控盘,1) AND 控盘>0,colorred;
Var22:=100*WINNER(CLOSE*0.95);
STICKLINE(控盘<REF(控盘,1) AND 控盘>0,控盘,0,8,0),color00ff00;
主力出货: 控盘<REF(控盘,1) AND 控盘>0,color00ff00;
STICKLINE(Var22>50 AND COST(85)<CLOSE AND 控盘>0,控盘,0,8,0),colorff00ff;
高度控盘: Var22>50 AND COST(85)<CLOSE AND 控盘>0,colorff00ff;
a10:=CROSS(控盘,0);
开始控盘:if(a10,6,0),coloryellow;
{中期见顶原码 }
庄筹估算:=EMA(WINNER(C)*70,5) -25;
散筹估算:=EMA((WINNER(C*1.1)-WINNER(C*0.9))*80,5)-25 ;
cc:=FILTER( (CROSS(-20,庄筹估算) and 散筹估算<-5 )*60,10 );
抄底:cc,coloryellow;
DRAWTEXT(cc ,-10 ,'抄底' ) ,coloryellow;
aa:= ref(庄筹估算,30)>15 or ref(庄筹估算,20)>15;
bb:=CROSS(5,庄筹估算) and 散筹估算>15 and aa=1 {and LLV(l ,60 )>LLV(l ,250 )};
洗盘:IF(bb ,20 ,25 );
DRAWTEXT(FILTER(bb,4) ,20 ,'洗盘' ) ,coloryellow ;
DRAWTEXT(庄筹估算>35,25,'▼'),colorred;


--
一步一步教你从互联网赚钱
http://www.zqzn.com/index.asp?rid=key480769

《135均线战法主图》源码[大智慧]

http://bbs.macd.cn/viewthread.php?tid=1092638
《135均线战法主图》源码[大智慧]
 
ema13:ema(c,13),colorwhite,linethick2;
ema34:ema(c,34),coloryellow;
ema55:ema(c,55),colorff00ff;
ema120:ema(c,120),colorffcc66;
ar1:=ema55>ema34 and ema34>ema13;
ar2:=BARSLAST((c-ema13)/ema13*100<-6);
ar3:=ema13>=ref(ema13,2);
ar4:=count(cross(c,ema13),ar2)=1;
ar5:=ar1 and ar2 and ar3 and ar4;
ar6:=ar5 and filter(ar5,10);
drawtext(ar6,l-0.09,'红杏出墙'),coloryellow;
stickline(ar6,h,l,0.5,1),coloryellow;
stickline(ar6,o,c,6,1),linethick2,coloryellow;
br1:=count(BETWEEN((c-ref(c,1))/ref(c,1)*100,0,5) ,5)=5;
br2:=abs((ema13-ema34)+(ema34-ema55))/c<0.2;
br3:=c>ema55 and (ref(c,1)<ref(ema55,1) or ref(c,2)<ref(ema55,2) or ref(c,3)<ref(ema55,3) or ref(c,4)<ref(ema55,4) or ref(c,5)<ref(ema55,5));
br4:=br1 and br2 and br3;
drawtext(br4 and filter(br4,10),l-0.09,'蚂蚁上树'),color00C5FF;
stickline(br4 and filter(br4,10),h,l,0.5,1),color00C5FF;
stickline(br4 and filter(br4,10),o,c,6,1),linethick2,color00C5FF;
cr1:=(c-ref(c,1))/ref(c,1)*100>0.5;
cr2:=v>ma(v,5)*0.6;
cr3:=count(cross(ema13,ema55),3)=1;
cr4:=abs(ema34-ema55)/ema55<0.03;
cr5:=ema55<=ema120 and ema55>=ref(ema55,1);
cr6:=FILTER(cr1 and cr2 and cr3 and cr4 and cr5,2);
stickline(cr6,h,l,0.5,1),colorf00ff0;
stickline(cr6,o,c,6,1),linethick2,colorf00ff0;
drawtext(cr6,l-0.09,'红衣侠女'),colorf00ff0;
dr1:=ema13>ema34 and ema34<ema55;
dr2:=BARSLAST(cross(c,ema55) );
dr3:=h=hhv(h,dr2);
dr4:=BARSLAST(dr3);
dr5:=count(o>c and c<ref(c,1) and c>ema55 and BETWEEN((c-ema55)/ema55,0,0.02),dr4)=1;
dr6:=c>ref(c,1) ;
dr7:= dr1 and dr5 and dr6 ;
dr8:=dr7 and FILTER(dr7 ,10);
drawtext(dr8,l-0.09,'黑客点击'),colord6ba63;
stickline(dr8,h,l,0.5,1),colord6ba63;
stickline(dr8,o,c,6,1),linethick2,colord6ba63;
er:=barslast(ref(cross(ema55,ema34),1)) and cross(ema34,ema55);
DRAWTEXT(er, l-0.09,'均线互换'),color0099ff;
stickline(er,h,l,0.5,1),color0099ff;
stickline(er,o,c,6,1),linethick2,color0099ff;
fr:=barslast(ref(cross(ema34,ema13),1)) and cross(ema13,ema34);
DRAWTEXT(fr,l-0.09,'梅开二度'),colorwhite;
stickline(fr,h,l,0.5,1),colorwhite;
stickline(fr,o,c,6,1),linethick2,colorwhite;
gr1:=BARSLAST(BETWEEN("bias.bias2"(6,13,24),0,5) );
gr2:=ema13>ema34 and ema34>ema55 and ema13>ref(ema13,1);
gr3:=count("bias.bias2"(6,13,24)>10 and h=hhv(h,gr1),gr1);
gr4:=h=hhv(h,gr1);
gr5:="macd.macd"(12,26,9)<ref("macd.macd"(12,26,9),1);
gr6:=gr2 and gr3 and gr4;
gr7:=gr2 and gr3 and gr4 and gr5;
drawtext(gr6 and gr7,h+0.13,'见好就收!'),color00ff00;
stickline(gr6 and gr7,h,h+0.09,4,0),color00ff00;
hr2:=ema13>=ref(ema13,3) and ema34>=ref(ema34,1) and ema55>=ref(ema55,1) and cross(c,ema13) and cross(c,ema34) and cross(c,ema55);
DRAWTEXT(hr2 and filter(hr2,10),l-0.09,'三线推进'),colorFFC8FF;
stickline(hr2 and filter(hr2,10),h,l,0.5,1),colorFFC8FF;
stickline(hr2 and filter(hr2,10),o,c,6,1),linethick2,colorFFC8FF;
 
135均线用法
 
135即13日均线、34日均线、55日均线组合系统的简称。135均线系统视角独特,操作简便,实战性强。该指标选择的买卖点只是组合系统的一部分,该系统有13个以上买卖点:如底部形态之"红杏出墙"和"蚂蚁上树";即将拉升的启动形态之"黑客点击"和"红衣侠女";中途的整理形态之"走四方"和"浪子回头";顶部形态之"见好就收"和"独上高楼";其他形态还有"均线互换"、"三线推进"、"梅开二度"等。该指标选用了以上的8种,用来实战也足够了。
简要介绍如下:
1、红杏出墙
 
形态特征:13日均线由下降趋于走平。股价从下向上突破
13日均线,并且在13日均线上企稳,这根站在13日均线上的阳线称之为"红杏出墙"。红杏出墙是135均线的第一买点,也是行情最初启动点。
2、蚂蚁上树
 

形态特征:两条略微向右下方倾斜的主均线相距很近或基本持平。股价踏上13日均线后,以连续上攻的小阳线缓步盘升,把股价轻松地送上55日均线。这几根持续上升的小阳线称之为"蚂蚁上树"。"蚂蚁上树"的出现,是股价见底,开始转强的标志。
3、黑客点击
 

形态特征:股价有效突破55日均线后开始回落,但在55日均线附近获得支撑,如果K线收阴,回落的股价恰好落在13日均线与55日均线的结点处,即"黑客点击"形态成立。是即将拉升的标志之一。"黑客点击"出现以后,应密切关注均线系统以及量能的变化,一旦发现放量上攻,要毫不犹豫地进场为庄家抬轿,当股价有了20%左右的涨幅以后,若发现上攻力度减弱,13日均线有走软迹象,应先出局观望。
4、红衣侠女
 

形态特征:股价经过长期下跌或充分调整以后,55日均线基本处于水平状态。股价沿着13日均线爬至55日均线附近进行窄幅整理。在13日均线上穿55日均线之日,如果股价携量上攻,形态即告成立。把站在"右上角"结点处的那根阳线称之为"红衣侠女"。是即将拉升的标志之二。
5、梅开二度
 

形态特征:13日均线向上穿越55日均线以后,股价滞涨回落,13日均线弱势下叉34日均线,随着股价的止跌企稳,13日均线开始勾头向上二次穿越34日均线,我们把在主均线之上的13日均线金叉穿越34日均线,称之为"梅开二度"。属上升中继形态。
6、均线互换
 

形态特征:前期34日均线顺势上穿55日均线。34日均线下穿再上穿55日均线的过程,就是"均线互换"。"均线互换"的完成,标志着股价开始走强,此后均线系统构成的多头排列,支持股价延续上行趋势,后市必有一波上攻行情。
7、三线推进
 

形态特征:股价长期在底部区域昏昏欲睡,均线系统呈胶合状态或间距极小的多头或空头排列,股价始终在三线附近小幅波动,时间一般持续半年左右。此时如出现一阳穿三线或股价在三线上揭竿而起,"三线推进"形态即告成立。那将是绝佳进场时机。
8、海底捞月
 

形态特征:中长期均线能够长时间保持平行移动,说明市场对目前的股价趋于认同,同时也封闭了股价在短期内的下跌空间。13日均线弱势下叉中长期均线并在其不远处作半弧状运动,显示上方抛压并不沉重,暗示回档幅度不会太深。13日均线重新上穿55日均线,表明有新的资金进场,均线系统可望迅速构成多头排列状态,从而支持股价继续上行。
9、见好就收
 
逃顶形态。见好就收,清仓换股。
 
*免费模拟帐户,供您永久使用*==>MG 金融集团,美国注册外汇经纪商
 
 
 


--
一步一步教你从互联网赚钱
http://www.zqzn.com/index.asp?rid=key480769

真假黑马识别器 , 主力做盘

http://bbs.macd.cn/viewthread.php?tid=1045389
真假黑马识别+主力作盘(<带图>)
 
    现在已经凌晨1点呢,这几天很忙,所以发的公式没有检测,弄出很多错误,现在全做了改正和测试,为表示歉意,特再加一原码(方法自己琢磨,很直观),如果有朋友有什么不爽的地方,请针对公式别针对人!拜托!谢谢!   
发此贴同时在此感谢论坛老师和高手\朋友们的指点和帮助!感谢论坛提供我们交流的平台! 
[ 使用方法:当指标发出"黑马"两字时,要结合量指标中变色红白线,"黑马"出现在变色线红色线时,信号可以信赖,出现在白色线时,要继续观察!同时绿色线要和变色线前期形成金叉!(公式还存在缺点,可继续优化,谢谢
 
                                             真假黑马识别器
收益:(FINANCE(33)),colorwhite;
净资产:(FINANCE(34));
现流通盘:((FINANCE(7))/(10000)),color806080;
RSV:=(((CLOSE - LLV(LOW,21))/(HHV(HIGH,21) - LLV(LOW,21)))*(100));
趋势:(MA((3)*(SMA(RSV,6,1)) - (2)*(SMA(SMA(RSV,5,1),5,1)),2)),Linethick2,coloryellow;
VAR2:=(3)*(SMA(((OPEN - LLV(LOW,89))/(HHV(HIGH,89) - LLV(LOW,89)))*(100),20,1)) - (2)*(SMA(SMA(((OPEN - LLV(LOW,89))/(HHV(HIGH,89) - LLV(LOW,89)))*(100),20,1),15,1));
VAR3:=VAR2 - 100;
背离:(FORCAST(((-1))*(VAR3),21)),Linethick2,Color9933FF;
DRAWTEXT((CROSS(趋势,背离)),背离,'黑马'),colorred;
DRAWTEXT((CROSS(背离,趋势)),背离,'↓ '),Color00FF00;
发现天数:(BARSLAST((趋势 < 背离))),colorff80ff;
DRAWTEXT(((趋势)/(背离) > 8) and (背离 < 10) and (趋势 > 80),(趋势)*(1.12),'走'),Color00FF00;
DRAWTEXT((背离< 5) and (趋势 > 60),趋势*1.12,'逃'),Colorwhite;
量:=(EMA(IF(C>=REF(C,2),V,(-V)),34)/MA(V,34))*100;
量9:EMA(量,9),COLOR00FF00;
X26:=EMA(量,26),COLORFF00FF;
STICKLINE(X26>=REF(X26,1), X26, X26,8,0),COLORRED,LINETHICK2;
STICKLINE(X26<REF(X26,1), X26, X26,8,0),COLORWHITE,LINETHICK2;
 

第2个主力做盘
 
主力做盘轨迹:(((CLOSE - MA(LLV(LOW,40),40)) / MA(LLV(LOW,40),40)) * 100),colorF0F000;
BIAS1 : (CLOSE-MA(CLOSE,9))/MA(CLOSE,9)*100,colorwhite;
坚决买:=(主力做盘轨迹-BIAS1)<5.5;
DRAWTEXT(坚决买 ,38,'金子 '),COLORf0ff00;
stickline (坚决买 ,0,30,5,0),colorred;
AA:=(CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21))*1000;
BB:=MA(AA,10);
趋势线:SMA(BB,3,1)/10,linethick2,colorred;
JNYY2:=(((CLOSE - LLV(LOW,26)) / (HHV(HIGH,26) - LLV(LOW,26))) * 100);
判断:SMA(JNYY2,32,1)-20,color00ff00,linethick1;
买:DRAWTEXT(CROSS(趋势线,判断),趋势线+10,'买▲牛'),LINETHICK2,colorwhite;
建仓:DRAWTEXT(CROSS(判断,趋势线),判断,'建▲仓'),LINETHICK2,coloryellow;
不怕死:DRAWTEXT(CROSS(主力做盘轨迹,判断),判断-10,'加▲码'),LINETHICK2,colorred;
 
这是能引入的
 
收益: (FINANCE(33)),colorwhite;
净资产: (FINANCE(34));
现流通盘: ((FINANCE(7))/(10000)),color806080;
VAR88:=1;
RSV:=(((CLOSE - LLV(LOW,21))/(HHV(HIGH,21) - LLV(LOW,21)))*(100))*(VAR88);
趋势: (MA((3)*(SMA(RSV,6,1)) - (2)*(SMA(SMA(RSV,5,1),5,1)),2))*(VAR88),Linethick2,coloryellow;
VAR2:=(3)*(SMA(((OPEN - LLV(LOW,89))/(HHV(HIGH,89) - LLV(LOW,89)))*(100),20,1)) - (2)*(SMA(SMA(((OPEN - LLV(LOW,89))/(HHV(HIGH,89) - LLV(LOW,89)))*(100),20,1),15,1));
VAR3:=VAR2 - 100;
背离: (FORCAST(((-1))*(VAR3),21))*(VAR88),Linethick2,Color9933FF;
DRAWTEXT((CROSS(趋势,背离))*(VAR88),背离,'黑马'),colorred;
DRAWTEXT((CROSS(背离,趋势))*(VAR88),背离,'↓ '),Color00FF00;
发现天数: (BARSLAST((趋势 < 背离)))*(VAR88),colorff80ff;
DRAWTEXT(((趋势)/(背离) > 8) and (背离 < 10) and (趋势 > 80),(趋势)*( 1.12),'走'),Color00FF00;
DRAWTEXT((背离 < 5) and (趋势 > (60)*(VAR88)),(趋势)*(1.12),'逃'),Colorwhite;
量:=(EMA(IF(C>=REF(C,2),V,(-V)),34)/MA(V,34))*100;
量9:EMA(量,9),COLOR00FF00;
X26:=EMA(量,26),COLORFF00FF;
STICKLINE(X26>=REF(X26,1), X26, X26,8,0),COLORRED,LINETHICK2;
STICKLINE(X26<REF(X26,1), X26, X26,8,0),COLORWHITE,LINETHICK2;
 


--
一步一步教你从互联网赚钱
http://www.zqzn.com/index.asp?rid=key480769

2007年3月7日星期三

几个MACD相关的公式

飞狐特色指标MACD实战(解盘)源码
 
 
 

input:LONG(26,20,100),SHORT(12,5,40),M(9,2,60);
DIFF:=(EMA(CLOSE,SHORT) - EMA(CLOSE,LONG));
DEA:=EMA(DIFF,M);
MACD2:=(2 * (DIFF - DEA));
VERTLINE(((CLOSE < 0) AND CROSS(DIFF,0))),color80;
VERTLINE(((CLOSE < 0) AND CROSS(MACD2,0))),color80;
VERTLINE(((CLOSE < 0) AND CROSS(0,DIFF))),color808080;
VERTLINE(((CLOSE < 0) AND CROSS(0,MACD2))),color808080;
DU0:=CROSS(DIFF,0);
UD0:=CROSS(0,DIFF);
TDU0:=BARSLAST(DU0);
TUD0:=BARSLAST(UD0);
DU3:=REF(DU0,1);
UD3:=REF(UD0,1);
TDU3:=BARSLAST(DU3);
TUD3:=BARSLAST(UD3);
UDGLINE:=IF((TDU3 < TUD3),REF(HHV(HIGH,2),TDU3),REF(LLV(LOW,2),TUD3));
JDU0:=(((REF(CLOSE,1) <= REF(UDGLINE,1)) AND (CLOSE > UDGLINE)) AND (TDU0 < TUD0));
JUD0:=(((REF(CLOSE,1) >= REF(UDGLINE,1)) AND (CLOSE < UDGLINE)) AND (TUD0 < TDU0));
JDU1:=(JDU0 AND (COUNT(JDU0,TDU0) = 1));
JUD1:=(JUD0 AND (COUNT(JUD0,TUD0) = 1));
JDU2:=(JDU1 AND (REF(BARSLAST(JUD1),1) < REF(BARSLAST(JDU1),1)));
JUD2:=(JUD1 AND (REF(BARSLAST(JUD1),1) > REF(BARSLAST(JDU1),1)));
JDU3:=(JDU1 AND (REF(BARSLAST(JUD1),1) > REF(BARSLAST(JDU1),1)));
JUD3:=(JUD1 AND (REF(BARSLAST(JUD1),1) < REF(BARSLAST(JDU1),1)));
BSLINE:=IF((BARSLAST(JDU2) < BARSLAST(JUD2)),IF(REF(CROSS(0,MACD2),1),LLV(LOW,2),REF(LLV(LOW,2),BARSLAST(REF(CROSS(0,MACD2),1)))),IF(REF(CROSS(MACD2,0),1),HHV(HIGH,2),REF(HHV(HIGH,2),BARSLAST(REF(CROSS(MACD2,0),1)))));
DRAWICON((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))),0,10),ALIGN4;
DRAWICON((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))),0,11),ALIGN5;
STICKLINE((MACD2 >= 0),0,MACD2,6,1),colorFF;
STICKLINE(((MACD2 >= 0) AND (MACD2 < REF(MACD2,1))),0,MACD2,6,0),COLORCYAN;
STICKLINE((MACD2 < 0),0,MACD2,6,0),colorFFFF00;
STICKLINE(((MACD2 < 0) AND (MACD2 > REF(MACD2,1))),0,MACD2,6,1),COLORRED;
STICKLINE((CLOSE > 0),0,0,10,0),color808080;
DIF:DIFF,LINETHICK2,colorFFFF;
DEF:DEA,colorFF00;
MACD:MACD2,LINETHICK0,colorFFFF00;
DEFUT:=BARSLAST(CROSS(MACD2,0));
DEFDT:=BARSLAST(CROSS(0,MACD2));
DEFUL:=IF((MACD2 >= 0),HHV(MACD2,(DEFUT + 1)),REF(HHV(MACD2,(DEFUT + 1)),(DEFDT + 1)));
DEFDL:=IF((MACD2 < 0),LLV(MACD2,(DEFDT + 1)),REF(LLV(MACD2,(DEFDT + 1)),(DEFUT + 1)));
DEFU2L:=REF(DEFUL,(DEFUT + 1));
DEFD2L:=REF(DEFDL,(DEFDT + 1));
DRAWICON(((((LLV(MACD2,4) > 0) AND (MACD2 < REF(MACD2,1))) AND (REF(MACD2,1) > REF(MACD2,2))) AND (REF(MACD2,2) > REF(MACD2,3))),MACD2,5),ALIGN0;
DRAWICON(((((HHV(MACD2,4) < 0) AND (MACD2 > REF(MACD2,1))) AND (REF(MACD2,1) < REF(MACD2,2))) AND (REF(MACD2,2) < REF(MACD2,3))),MACD2,4);
DRAWICON(((((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))) AND (MACD2 >= 0)) AND (REF(MACD2,1) < REF(DEFU2L,1))) AND (MACD2 > DEFU2L)),MACD2,12),ALIGN0;
DRAWICON(((((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))) AND (MACD2 < 0)) AND (REF(MACD2,1) > REF(DEFD2L,1))) AND (MACD2 < DEFD2L)),MACD2,12);
EXPLAIN(JDU2,'注意长线趋势空转多');
EXPLAIN(JUD2,'注意长线趋势多转空');
EXPLAIN((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))),'长线为多头趋势');
EXPLAIN((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))),'长线为空头趋势');
EXPLAINEX((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))),'MACD多头防守价',BSLINE,2,1);
EXPLAINEX((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))),'MACD空头防守价',BSLINE,2,1);
EXPLAIN(((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))) AND (CLOSE < BSLINE)),'防守价跌破:多头小心');
EXPLAIN(((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))) AND (CLOSE > BSLINE)),'防守价突破:空头小心');
EXPLAIN(((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))) AND CROSS(MACD2,0)),'空头注意今明两日高点压力\n找日落K线放空,用线控盘');
EXPLAIN(((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))) AND CROSS(0,MACD2)),'多头注意今明两日低点支撑\n找日出K线做多,用线控盘');
EXPLAIN(((((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))) AND (MACD2 >= 0)) AND (REF(MACD2,1) < REF(DEFU2L,1))) AND (MACD2 > DEFU2L)),'DEF柱状特殊研判\n空头注意今明两日高点压力');
EXPLAIN(((((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))) AND (MACD2 < 0)) AND (REF(MACD2,1) > REF(DEFD2L,1))) AND (MACD2 < DEFD2L)),'DEF柱状特殊研判\n多头注意今明两日低点支撑');
EXPLAINEX((REF((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))),1) AND CROSS(REF(MACD2,1),0)),'空头注意压力',HHV(HIGH,2),2,1);
EXPLAIN((REF((JUD1 OR (BARSLAST(JDU1) > BARSLAST(JUD1))),1) AND CROSS(REF(MACD2,1),0)),'找日落K线放空,用线控盘');
EXPLAINEX((REF((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))),1) AND CROSS(0,REF(MACD2,1))),'多头注意支撑',LLV(LOW,2),2,1);
EXPLAIN((REF((JDU1 OR (BARSLAST(JDU1) < BARSLAST(JUD1))),1) AND CROSS(0,REF(MACD2,1))),'找日出K线进场,用线控盘');
EXPLAIN(((((LLV(MACD2,4) > 0) AND (MACD2 < REF(MACD2,1))) AND (REF(MACD2,1) > REF(MACD2,2))) AND (REF(MACD2,2) > REF(MACD2,3))),'请注意DEF柱状缩头');
EXPLAIN(((((HHV(MACD2,4) < 0) AND (MACD2 > REF(MACD2,1))) AND (REF(MACD2,1) < REF(MACD2,2))) AND (REF(MACD2,2) < REF(MACD2,3))),'请注意DEF柱状缩脚');
MA1:=((2*C+(12-1)*EMA(C,12))/(12+1))-((2*C+(26-1)*EMA(C,26))/(26+1));
MA2:=(2*MA1+(9-1)*DEA)/(9+1);
[MACD预测]:2*(MA1-MA2),LINETHICK0,COLORRED;
 
 
 
{MACD 实战逃顶}
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);
DEA  : EMA(DIFF,9);
MACD : 2*(DIFF-DEA), COLORSTICK;
D1:=EMA(C,3)-EMA(C,8);
D2:=EMA(O,3)-EMA(O,8);
D3:=EMA(H,3)-EMA(H,8);
D4:=EMA(L,3)-EMA(L,8);
DRAWICON(cross(diff,d1) and diff>0.1 ,d3+0.1,2);
STICKLINE(D1>=D2,D1,D2,8,0),COLOR0055AA;
STICKLINE(D1<=D2,D1,D2,8,0),COLOR006600;
STICKLINE(D1>=D2,D1,D2,5,0),COLOR0077CC;
STICKLINE(D1>=D2,D1,D2,3,0),COLOR0099DD;
STICKLINE(D1>=D2,D3,D4,0,0),COLOR00BBFF;
STICKLINE(D1<=D2,D1,D2,5,0),COLOR009900;
STICKLINE(D1<=D2,D1,D2,3,0),COLOR00BB00;
STICKLINE(D1<=D2,D3,D4,0,0),COLOR00EE00;
 
 
{MACD实战破译}
{参数 :SHORT  12、  LONG  26、  M   9}
 
INPUT:SHORT(12,1,100,1),LONG(26,1,100,1), M(9,1,100,2);
 
DIF:EMA(CLOSE,SHORT)-EMA(CLOSE,LONG);
MACD:EMA(DIF,M),COLOR58FF58;
DEF:2*(DIF-MACD),COLORFFFF00,LINETHICK0;
STICKLINE(DEF>=0 AND DEF>=REF(DEF,1),0,DEF,6,1),COLOR6058FF;
STICKLINE(DEF>=0 AND DEF< REF(DEF,1),0,DEF,6,0),COLOR6058FF;
STICKLINE(DEF<0 AND DEF>=REF(DEF,1),0,DEF,6,1),COLORFFFF00;
STICKLINE(DEF<0 AND DEF< REF(DEF,1),0,DEF,6,0),COLORFFFF00;
PARTLINE(DIF<1000,0),COLORBROWN;
多头趋势:=IF(DIF>=0 AND MACD>=0 OR (DIF<0 AND MACD>=0),1,0);
空头趋势:=DIF<0 AND MACD<0 OR (DIF>=0 AND MACD<0);
缩头:=IF(DEF>0 AND REF(DEF,1)>REF(DEF,2) AND DEF< REF(DEF,1),1,0);
缩脚:=IF(DEF<0 AND REF(DEF,1)< REF(DEF,2) AND DEF>REF(DEF,1),1,0);
阻力:=IF(CROSS(C,MA(C,20)) OR CROSS(C,MA(C,60)),1,0);
支撑:=IF(CROSS(MA(C,20),C) OR CROSS(MA(C,60),C),1,0);
做多:=IF(CROSS(MACD,DIF) AND DIF>0 AND MACD>0,1,0);
放空:=IF(CROSS(DIF,MACD) AND DIF<0 AND MACD<0,1,0);
DRAWICON(多头趋势,DIF,10),ALIGN4;
DRAWICON(空头趋势,DIF,11),ALIGN5;
PARTLINE(DIF<1000,DIF),,COLORCCFFFF,LINETHICK2;
PARTLINE(MACD<1000,MACD),COLOR58FF58;
DRAWICON(FILTER(缩头,3) AND 缩头,DEF+0.01,5),ALIGN0;
DRAWICON(FILTER(缩脚,3) AND 缩脚,DEF,4),ALIGN1;
DRAWICON(FILTER(阻力,16) AND DEF>=0,DEF+0.01,12),ALIGN0;
DRAWICON(FILTER(支撑,16) AND DEF<0,DEF,12),ALIGN1;
EXPLAIN(DIF<1000,''----------------------------------------------------------------------------''),COLORBROWN;
EXPLAIN(多头趋势, ''§§§长线为多头趋势§§§§''),COLORRED;
EXPLAIN(空头趋势, ''§§§长线为空头趋势§§§§''),COLORGREEN;
EXPLAIN(DIF<1000,''----------------------------------------------------------------------------''),COLORBROWN;
EXPLAIN(缩头, ''§请注意DEF柱状缩头''),COLORFFFF00;
EXPLAIN(缩脚, ''§请注意DEF柱状缩脚''),COLORFFFF00;
EXPLAIN(FILTER(支撑,16) AND DEF<0, ''§DEF柱状特殊研判''),COLORFFFF00;
EXPLAIN(做多=0 AND FILTER(支撑,16) AND DEF<0, ''§多头注意今明两日低点支撑''),COLORFFFF00;
EXPLAIN(FILTER(阻力,16) AND DEF>=0, ''§DEF柱状特殊研判''),COLORFFFF00;
EXPLAIN(放空=0 AND FILTER(阻力,16) AND DEF>=0, ''§空头注意今明两日高点压力''),COLORFFFF00;
EXPLAIN(做多, ''§多头注意今明两日低点支撑''),COLORFFFF00;
EXPLAIN(做多, ''§找日出K线做多,用线控盘''),COLORFFFF00;
EXPLAIN(放空, ''§空头注意今明两日高点压力''),COLORFFFF00;
EXPLAIN(放空, ''§找日落K线放空,用线控盘''),COLORFFFF00;
EXPLAIN(CROSS(MACD,0), ''§注意长线趋势空转多''),COLORRED;
EXPLAIN(CROSS(0,MACD), ''§注意长线趋势多转空''),COLORGREEN;
A:=C>=REF(C,2);
B:=C< REF(C,2);
ZA:=BARSLAST(A);
ZB:=BARSLAST(B);
LA:=REF(L,ZA);
HB:=REF(H,ZB);
EXPLAIN(多头趋势 AND C< LA, ''§防守价跌破:多头小心''),COLORRED;
EXPLAIN(空头趋势 AND C>HB, ''§防守价突破:空头小心''),COLORRED;
EXPLAIN(DIF<1000,''----------------------------------------------------------------------------''),COLORBROWN;
EXPLAINEX(多头趋势, ''MACD多头防守价:'',LA,2,0),COLOR3399FF ;
EXPLAINEX(空头趋势, ''MACD空头防守价:'',HB,2,0),COLOR3399FF ;
EXPLAIN(DIF<1000,''----------------------------------------------------------------------------''),COLORBROWN;
EXPLAIN((COUNT(C>REF(C,1),30)>18 AND (COUNT(C>REF(C,1),3)=3)) AND (COUNT(DEF< REF(DEF,1),30)>18),''§反转--股价将可能反转向下''),COLOR58FF58;
EXPLAIN((COUNT(C< REF(C,1),30)>18 AND (COUNT(C< REF(C,1),3)=3)) AND (COUNT(DEF>REF(DEF,1),30)>18),''§反转--股价将可能反转向上''),COLOR58FF58;
EXPLAIN(DEF<0 AND ABS(DEF)>REF(ABS(DEF),1),''§MACD绿柱增长''),COLOR58FF58;
EXPLAIN(DEF<0 AND ABS(DEF)< REF(ABS(DEF),1),''§MACD绿柱缩短''),COLOR58FF58;
EXPLAIN(DEF>0 AND DEF>REF(DEF,1),''§MACD红柱增长''),COLOR58FF58;
EXPLAIN(DEF>0 AND DEF< REF(DEF,1),''§MACD红柱缩短''),COLOR58FF58;
EXPLAIN((LLV(L,60)=L) AND (NOT(LLV(MACD,60)=MACD)),''§底背离--属买入信号''),COLOR58FF58;
EXPLAIN((HHV(H,60)=H) AND (NOT(HHV(MACD,60)=MACD)),''§顶背离--属卖出信号''),COLOR58FF58;
EXPLAIN(CROSS(MACD,DIF) AND MACD<0,''§MACD在0轴下死叉''),COLOR58FF58;
EXPLAIN(CROSS(DIF,MACD) AND MACD<0,''§MACD在0轴下金叉''),COLOR58FF58;
EXPLAIN(CROSS(DIF,MACD),''§金叉--属买入信号''),COLOR58FF58;
EXPLAIN(CROSS(MACD,DIF),''§死叉--属卖出信号''),COLOR58FF58;
EXPLAIN(CROSS(DIF,MACD) AND MACD>0,''§MACD在0轴上金叉''),COLOR58FF58;
EXPLAIN(CROSS(MACD,DIF) AND MACD>0,''§MACD在0轴上死叉''),COLOR58FF58;
EXPLAIN(CROSS(DIF,MACD) AND CROSS(DEF,0),''§上穿0轴,可考虑买入''),COLOR58FF58;
EXPLAIN(FILTER(CROSS(DIF,MACD) AND MACD>0,13),''§高位金叉''),COLOR58FF58;
EXPLAIN(FILTER(CROSS(DIF,MACD) AND MACD<0,6),''§低位金叉''),COLOR58FF58;
EXPLAIN(COUNT(CROSS(DIF,MACD) AND MACD>0,20)=2 AND CROSS(DIF,MACD) AND
MACD>0,''§0轴上二次金叉''),COLOR58FF58;
EXPLAIN(COUNT(CROSS(DIF,MACD) AND MACD>0,20)=3 AND CROSS(DIF,MACD) AND
MACD>0,''§0轴上三次金叉''),COLOR58FF58;
EXPLAIN(COUNT(CROSS(DIF,MACD) AND MACD>0,20)=4 AND CROSS(DIF,MACD) AND MACD>0,''§0轴上四次金叉''),COLOR58FF58;
EXPLAIN(COUNT(CROSS(MACD,DIF),20)=2 AND CROSS(MACD,DIF),''§二次死叉,跌幅可能较深''),COLOR58FF58;
EXPLAIN(COUNT(CROSS(DIF,MACD),20)=2 AND CROSS(DIF,MACD),''§二次金叉,涨幅可能较大''),COLOR58FF58;
EXPLAIN(DIF>=0 AND DEF>=0 AND DEF<=REF(DEF,1),''§上涨趋势有所减缓,短线投资者可逢高卖出,但当回落至均线或其他支撑位时应及时回补''),COLOR58FF58;
EXPLAIN(DIF<0 AND DEF>0 AND DEF>REF(DEF,1),''§目前正处于反弹阶段,应保持谨慎''),COLOR58FF58;
EXPLAIN(DEF>0 AND DIF>0 AND DIF>MACD AND DIF>REF(DIF,1) AND C>REF(C,1),''§上升趋势尚未改变''),COLOR58FF58;
EXPLAIN(DIF<0 AND DEF>0 AND DEF< REF(DEF,1),''§短线反弹已经结束,应继续坚持谨慎原则''),COLOR58FF58;
EXPLAIN(DIF<0 AND DEF<=0 AND DEF< REF(DEF,1),''§有加速下跌趋势''),COLOR58FF58;
EXPLAIN(DIF<0 AND DEF<=0 AND DEF>=REF(DEF,1),''§下跌趋势有所减缓,可在W&R指标大于90时逢低买入,但有可能再次加速下跌,注意及时止损''),COLOR58FF58;
EXPLAIN(DEF<0 AND DIF<0 AND DIF< MACD AND DIF< REF(DIF,1) AND C< REF(C,1),''§下降趋势尚未改变''),COLOR58FF58;
EXPLAIN(DIF>=0 AND DEF>=0 AND DEF>REF(DEF,1),''§有加速上涨趋势''),COLOR58FF58;
EXPLAIN(DIF>=0 AND DEF<0 AND DEF< REF(DEF,1),''§目前正处于回落整理阶段,且回落有加速趋势''),COLOR58FF58;
EXPLAIN(DIF>=0 AND DEF<0 AND DEF>=REF(DEF,1),''§目前正处于回落整理阶段,但整理即将结束,可在均线或其他支撑位附近逢低买入,但当整理完成后选择再次向下突破时应注意及时止损''),COLOR58FF58;
EXPLAIN(DEF<-0.35,''§超卖中,随时有可能反弹''),COLOR58FF58;
EXPLAIN(DEF>0.35,''§股价超买中,随时有可能回档''),COLOR58FF58;
EXPLAIN(DIF<1000,''----------------------------------------------------------------------------''),COLORBROWN;
G:=26;
S:=12;
CC:=CLOSE;
ESS:=EMA(CC,12);
EGG:=EMA(CC,12);
RDIF:=REF(DIF,1);
RSS:=REF(ESS,1);
RGG:=REF(EGG,1);
RMACD:=REF(MACD,1);
RDEF:=REF(DEF,1);
RZZZ:=(RMACD+((M+1)/(2*(M-1)))*RDEF);
XDIF:=((G-1)*(S+1)*RGG-(G+1)*(S-1)*RSS+(S+1)*(G+1)*RDIF)/(2*G-2*S);
XMACD:=((G-1)*(S+1)*RGG-(G+1)*(S-1)*RSS+(S+1)*(G+1)*RMACD)/(2*G-2*S);
XDEF:=((G-1)*(S+1)*RGG-(G+1)*(S-1)*RSS+(S+1)*(G+1)*RZZZ)/(2*G-2*S);
AA:=ISLASTBAR;
BB:=BACKSET(AA=1,1);
Y:=BARSLAST(BB=1);
X:=Y+1;
TDIF:=DIF*X;
TSS:=ESS*X;
TGG:=EGG*X;
TMACD:=MACD*X;
TDEF:=DEF*X;
TZZZ:=(TMACD+((M+1)/(2*(M-1)))*TDEF);
YDIF:=((G-1)*(S+1)*TGG-(G+1)*(S-1)*TSS+(S+1)*(G+1)*TDIF)/(2*G-2*S);
YMACD:=((G-1)*(S+1)*TGG-(G+1)*(S-1)*TSS+(S+1)*(G+1)*TMACD)/(2*G-2*S);
YDEF:=((G-1)*(S+1)*TGG-(G+1)*(S-1)*TSS+(S+1)*(G+1)*TZZZ)/(2*G-2*S);
EE:=1;
EXPLAINEX(EE=1,''§DIF....今日转折'',XDIF,2,1),COLORCCFFFF ;
EXPLAINEX(EE=1,''§MACD今日转折'',XMACD,2,1),COLOR3399FF ;
EXPLAINEX(EE=1,''§DEF...今日转折'',XDEF,2,1),COLORFF9966 ;
EXPLAIN(DIF<1000,''----------------------------------------------------------------------------''),COLORBROWN;
EXPLAINEX(EE=1,''§DIF....明日转折'',YDIF,2,1),COLORCCFFFF;
EXPLAINEX(EE=1,''§MACD明日转折'',YMACD,2,1),COLOR3399FF;
EXPLAINEX(EE=1,''§DEF...明日转折'',YDEF,2,1),COLORFF9966;
EXPLAIN(DIF<1000,''----------------------------------------------------------------------------''),COLORBROWN;
 
 

2007年3月4日星期日

应大家要求组合的指标(分析家、飞狐、大智慧、通达信、同花顺)通用

应大家要求组合的指标(分析家、飞狐、大智慧、通达信、同花顺)通用

//{H买卖奇准}
你:=MA(CLOSE,1);
老:=(LOW+HIGH+CLOSE)/3;
板:= MA(老,5);
好:= HHV(板,10);
急卖奇准:IF(HHV((你<好),5),100,50),colorblue;
短卖奇准:IF(HHV((你<好),10),100,50),colorgreen;

老板:= MA(老,5);
买卖:=LLV(老板,10);
急买奇准:IF(LLV((你<买卖),5),50,0),colorred;
短买奇准:IF(LLV((你<买卖),10),50,0),colorwhite;

TR:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),5);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
DMP:=(SUM(IF(((HD > 0) AND (HD > LD)),HD,0),5) );
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),5);
神偷线:=(((DMP ) * 100) / TR);
辅助线:=((DMM * 100) / TR);
动向趋势线:=(MA(((ABS((辅助线 - 神偷线)) / (辅助线 + 神偷线)) * 100),3));
ADXR:=((动向趋势线 + REF(动向趋势线,3)) / 2);
VAR1:=MA(LOW,1);
VAR2:=MA(HIGH,2);
VAR3:=MA(CLOSE,2);
VAR7:=REF(VAR3,1);
【强弱】:=((SMA(MAX((VAR3 - VAR7),0),5,1) / SMA(ABS((VAR3 - VAR7)),5,1)) * 100);
没神的只有不错:( IF(((动向趋势线 > 88) AND (神偷线 < 5.8)),80,0)),LINETHICK3,colorFF00FF;

2007年3月3日星期六

subversion问题

今天,用subversion的时候,发现了一个问题,不能checkout ,总是有

svn  畸形的网络数据

的错误,不知道是怎么回事,在网上查了一下,发现有人说可能是多个subverion引起的。这才想起来,我先用源代码自己编译的方式装了1.3.2,后来又下了1.4.2的RPM包安装,然后就出现了这个问题。只好把1.4.2给去了,然后重新编译1.3.2, make ; make install,后,正常

2007年3月2日星期五

版本库同步

如有转发请注明出处:http://www.subversion.org.cn/index.php?option=com_content&task=view&id=85&Itemid=9


版本库同步

Subversion 1.4增加了同步机制,可以实现一个版本库同另一个版本库的同步(但好像只是单向的),我们可以用来实现版本库的备份或镜像。

3.1. 对目标库初始化
svnsync init svn: //localhost/project2 svn://localhost/project1 
 

其中project2是目标的版本库,而project1是源版本库。其中的目标版本库必须为空,而且必须允许修订版本属性的修改,也就是在目标的版本库的hooks目录里添加一个文件pre-revprop-change.bat,内容为空即可。

3.2. 同步project2到project1
svnsync sync svn://localhost/project2 
 

这 时候你update一下你的project2的一个工作拷贝,就会发现有了project1的所有内容。如果project1又有提交,这时候 project2的版本库无法看到最新的变化,还需要再运行一遍sync操作,这样才能将最新的变化同步。需要注意的是,目标版本库只能做成只读的,如果 目标版本库发生了变更,则无法继续同步了。

3.3. 同步历史属性的修改

因为同步不会更新对历史属性的修改,所以svnsync还有子命令copy-revprops,可以同步某个版本的属性。

3.4. 钩子自动同步

希望在每次提交时同步,则需要在源版本库增加post-commit脚本,内容如下:

echo off
set SVN_HOME="D:\S ubversion"
%SVN_HOME%\bin\svnsync sync --non-interactive svn://localhost/project2
 

把以上内容存放为post-commit.bat,然后放到版本库project1下的hooks目录下,这样project1每次提交,都会引起project2的同步。

2007年3月1日星期四

Muse语法

Muse的语法与wiki是一样的

directives
以'#'开头,前面不能有空白,具有的形式是 "#directive  content of directive"。它在写在任意的段落前,支持任意大小写组合。你可以任意定义,以下4个是常用的。

#title  标题
#author  作者
#desc  简单描述
#date  日期

段落
由至少一个空行分开的文本为一个段落
若某段由6个以上空格(包括tab)开头,则表示该段落中心对齐。也可以用<center></center>标记
若某段由空格开头,但少于6个,则表示该段是quote形,与<quote></quote>标记是等价的。
还有两个标记常用:
<example>
<literal> 使用这个标记,表示对里面的内容不作任何解释,原封不动地保留。这样,你就可以在里面手工写上HTML代码输出到你的HTML类型的项目中。

标题
分为4级,在新段落中,以一个或多个'*'开头,后面跟一个空格,就是标题。示例如下:
* First level
** Second level
*** Third level
**** Fourth level

4种常用的文本书写方式,可以在正文中的任何地方出现,如
*emphasis*
**strong emphasis**
***very strong emphasis***
_underlined_
=verbatim and monospace=
其中'='也可以用<code></code>来代替。

列表
有3种方式:
以减号'-'表示 ,在减号前后都有空格。
- bullet item one
- bullet item two

也可以用数字加上'.'表示,前后仍然有空格
1. Enum item one
2. Enum item two

或者也可以用
Term1 ::
This is a first definition
And it has two lines;
no, make that three.

Term2 ::
This is a second definition


表格
实现是很简单的,它也只能实现简单的表格
Double bars || Separate header fields

Single bars | Separate body fields
Here are more | body fields

Triple bars ||| Separate footer fields



链接
在文章中引入链接很简单
[[link target][link description]]
[[link target without description]]

[[http://ubuntu-fans.blogspot.com][我爱Linux]]


任何行,以'#anchor'开头,其中anchor可以是任意的不含空格的文本,都被当作是个锚,你可以 pages#anchor 的形式链接。

水平线
多过4个'-'的段落就表示一条水平线,如
----

Muse的使用

前面配置好Muse,并且设置好项目,我们就可以开始开发了。

首先,启动Emacs后,
 M-x muse-project-find-file
如果你有多个项目,则会有提示
Find in project:
否则就是
Find page: (default: index)
你可以使用缺省的index,也可以输入随意一个名字。然后,你就可以开始编写你的项目了。它的语法与wiki是完全一样的。我会在后面边学边用。
写好后,直接用 C-c C-p就可以发布整个项目了。

muse 中的项目

前面讲了如何安装好 emacs muse 。 现在我们开始建立项目

muse 中的项目类似于 emacs-wiki 中的项目定义,可以按照如下格式写:

;; Muse projects
(require 'muse-project)

(setq muse-project-alist
`(("proj1"
("~/muse/proj1/" :default "index")
(:base "pdf" :path "~/publicsh/proj1/pdf)
(:base "xhtml" :path "~/publish/proj1/"))
("proj2"
("~/muse/proj2/" :default "index")
(:base "style2" :path "~/publish/proj2/"))))
base 后面指定的是本项目所使用的 style。一个项目可以有多个 style 。当使用 C-c C-p 发布项目的时候会自动同时完成

Debian新维护人员手册

代码:
sudo aptitude install maint-guide-zh //这个是中文版

然后看文档就行了
文档的位置在 /usr/share/doc/maint-guide/maint-guide.zh_CN.html/index.html