-- 作者:yong
-- 发布时间:2012/3/21 11:37:59
-- 求改写公式
下面是飞狐的公式,如果可以的话把那个柱子改成图2样子,谢谢
Var1:=(HIGH+LOW)/2; AO:=MA(Var1,5)-MA(Var1,34); AOGreen:IF(AO>REF(AO,1),AO,0),COLORRED,LINETHICK0; STICKLINE(AO>=REF(AO,1),0,AO,6,1),COLORRED; AORed:IF(AO<REF( AO,1),AO,0),COLORGREEN,LINETHICK0; STICKLINE(AO<REF(AO,1),0,AO,6,1),COLORGREEN; SignalLine:MA(AO,5),COLORBLUE;
b1:=CROSS(AO,0); DRAWICON(b1,AO,4),ALIGN0; DRAWTEXT(b1,AO,\'B\'),ALIGN4,COLORWHITE; {//----------------------------以上是上穿0信号;} b2:=ao>0 and REF(ao,1)<REF(ao,2) and ao>REF(ao,1) ; {DRAWNUMBER(1>0,ao,lu2,0);} DRAWICON(b2,AO,4),ALIGN0; DRAWTEXT(b2,AO,\'B\'),ALIGN4,COLORWHITE; {//-----------------------------以上碟型买入信号;} bcount:=BARSLAST(ao>0);{//上一次ao>0后到现在的周期数;} {//DRAWNUMBER(1>0,ao-0.1,bcount,0);} bd:=LLV(ao,bcount);{//求上面周期的最小ao;} bcountd:=LLVBARS(ao,bcount);{//求最小值到现在的周期数;} {//DRAWNUMBER(1>0,ao-0.3,bcountd,0);} b3:=ao<0 and REF(ao,1)<REF(ao,2) and ao>REF(ao,1);{//满足峰的条件;} b31:=COUNT(b3,bcountd);{//满足上面条件的次数;} {//DRAWNUMBER(1>0,ao-0.5,lu31,0);} DRAWICON(b31>=2 and b3,AO,4),ALIGN0; DRAWTEXT(b31>=2 and b3,AO,\'B\'),ALIGN4,COLORWHITE; {//----------------------------以上是双峰买进信号;}
s1:=CROSS(0,AO); DRAWICON(s1,AO,5),ALIGN0; DRAWTEXT(s1,AO,\'S\'),ALIGN5,COLORWHITE; {//----------------------------以上是下穿0信号;} s2:=ao<0 and REF(ao,1)>REF(ao,2) and ao<REF(ao,1); {DRAWNUMBER(1>0,ao,lu2,0);} DRAWICON(s2,AO,5),ALIGN0; DRAWTEXT(s2,AO,\'S\'),ALIGN5,COLORWHITE; {//-----------------------------以上碟型卖出信号;}
scount:=BARSLAST(ao<0);{//上一次ao>0后到现在的周期数;} {//DRAWNUMBER(1>0,ao-0.1,scount,0);} sd:=HHV(ao,scount);{//求上面周期的最大ao;} scountd:=HHVBARS(ao,scount);{//求最大值到现在的周期数;} {//DRAWNUMBER(1>0,ao-0.3,scountd,0);} s3:=ao>0 and REF(ao,1)>REF(ao,2) and ao<REF(ao,1);{//满足峰的条件;} s31:=COUNT(s3,scountd);{//满足上面条件的次数;} {//DRAWNUMBER(1>0,ao-0.5,s31,0);} DRAWICON(s31>=2 and s3,AO,5),ALIGN0; DRAWTEXT(s31>=2 and s3,AO,\'S\'),ALIGN5,COLORWHITE;
{//----------------------------以上是双峰卖出信号;}
此主题相关图片如下:2012-03-21_113007.png
![dvubb 图片点击可在新窗口打开查看](UploadFile/2012-3/201232111373150346.png)
此主题相关图片如下:2012-03-21_113223.png
![dvubb 图片点击可在新窗口打开查看](UploadFile/2012-3/201232111373142889.png)
|