王新银 发表于 2010-8-21 13:06

编写了基于倍量、梯量,平量的一个指标不完善大家看下

编写了基于倍量、梯量,平量的一个指标不完善大家看下

VOL:VOL#VOLUMN;
倍量:(VOL-REF(VOL,1))>=REF(VOL,1),linethick0;
小倍量:(VOL-REF(VOL,1))>=(VOL*0.4),linethick0;
X:=IF(VOL==REF(VOL,1) OR (VOL>REF(VOL,1) AND (VOL-REF(VOL,1))<=(VOL*0.05)) OR (VOL<REF(VOL,1) AND (REF(VOL,1)-VOL)<=(REF(VOL,1)*0.05)),1,0);
X1:=IF(X==0 AND VOL>REF(VOL,1) AND (VOL==REF(VOL,2) OR (VOL>REF(VOL,2) AND (VOL-REF(VOL,2))<=(VOL*0.05)) OR (VOL<REF(VOL,2) AND (REF(VOL,2)-VOL)<=(REF(VOL,2)*0.05))),2,0);
X2:=IF(X==0 AND X1==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND (VOL==REF(VOL,3) OR (VOL>REF(VOL,3) AND (VOL-REF(VOL,3))<=(VOL*0.05)) OR (VOL<REF(VOL,3) AND (REF(VOL,3)-VOL)<=(REF(VOL,3)*0.05))),3,0);
X3:=IF(X==0 AND X1==0 AND X2==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND (VOL==REF(VOL,4) OR (VOL>REF(VOL,4) AND (VOL-REF(VOL,4))<=(VOL*0.05)) OR
(VOL<REF(VOL,4) AND (REF(VOL,4)-VOL)<=(REF(VOL,4)*0.05))),4,0);
X4:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND
      (VOL==REF(VOL,5) OR (VOL>REF(VOL,5) AND (VOL-REF(VOL,5))<=(VOL*0.05)) OR (VOL<REF(VOL,5) AND (REF(VOL,5)-VOL)<=(REF(VOL,5)*0.05))),5,0);
X5:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND
      (VOL==REF(VOL,6) OR (VOL>REF(VOL,6) AND (VOL-REF(VOL,6))<=(VOL*0.05)) OR (VOL<REF(VOL,6) AND (REF(VOL,6)-VOL)<=(REF(VOL,6)*0.05))),6,0);
X6:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND
       VOL>REF(VOL,6) AND (VOL==REF(VOL,7) OR (VOL>REF(VOL,7) AND (VOL-REF(VOL,7))<=(VOL*0.05)) OR (VOL<REF(VOL,7) AND (REF(VOL,7)-VOL)<=(REF(VOL,7)*0.05))),7,0);
X7:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND X6==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND
       VOL>REF(VOL,6) AND VOL>REF(VOL,7) AND (VOL==REF(VOL,8) OR (VOL>REF(VOL,8) AND (VOL-REF(VOL,8))<=(VOL*0.05)) OR (VOL<REF(VOL,8) AND (REF(VOL,8)-VOL)<=(REF(VOL,8)*0.05))),8,0);
X8:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND X6==0 AND X7==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND
       VOL>REF(VOL,6) AND VOL>REF(VOL,7) AND VOL>REF(VOL,8) AND (VOL==REF(VOL,9) OR (VOL>REF(VOL,9) AND (VOL-REF(VOL,9))<=(VOL*0.05)) OR (VOL<REF(VOL,9) AND (REF(VOL,9)-VOL)<=(REF(VOL,9)*0.05))),9,0);
X9:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND X6==0 AND X7==0 AND X8==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND
       VOL>REF(VOL,6) AND VOL>REF(VOL,7) AND VOL>REF(VOL,8) AND VOL>REF(VOL,9) AND
      (VOL==REF(VOL,10) OR (VOL>REF(VOL,10) AND (VOL-REF(VOL,10))<=(VOL*0.05)) OR (VOL<REF(VOL,10) AND (REF(VOL,10)-VOL)<=(REF(VOL,10)*0.05))),10,0);
X10:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND X6==0 AND X7==0 AND X8==0 AND X9==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND
       VOL>REF(VOL,6) AND VOL>REF(VOL,7) AND VOL>REF(VOL,8) AND VOL>REF(VOL,9) AND VOL>REF(VOL,10) AND
      (VOL==REF(VOL,11) OR (VOL>REF(VOL,11) AND (VOL-REF(VOL,11))<=(VOL*0.05)) OR (VOL<REF(VOL,11) AND (REF(VOL,11)-VOL)<=(REF(VOL,11)*0.05))),11,0);
X11:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND X6==0 AND X7==0 AND X8==0 AND X9==0 AND X10==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF   (VOL,5) AND VOL>REF(VOL,6) AND VOL>REF(VOL,7) AND VOL>REF(VOL,8) AND VOL>REF(VOL,9) AND VOL>REF(VOL,10) AND VOL>REF(VOL,11) AND
      (VOL==REF(VOL,12) OR (VOL>REF(VOL,12) AND (VOL-REF(VOL,12))<=(VOL*0.05)) OR (VOL<REF(VOL,12) AND (REF(VOL,12)-VOL)<=(REF(VOL,12)*0.05))),12,0);
X12:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND X6==0 AND X7==0 AND X8==0 AND X9==0 AND X10==0 AND X11==0 AND
   VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND VOL>REF(VOL,6) AND VOL>REF(VOL,7) AND VOL>REF(VOL,8) AND VOL>REF(VOL,9) AND VOL>REF(VOL,10) AND
   VOL>REF(VOL,11) AND VOL>REF(VOL,12)AND
    (VOL==REF(VOL,13) OR (VOL>REF(VOL,13) AND (VOL-REF(VOL,13))<=(VOL*0.05)) OR (VOL<REF(VOL,13) AND (REF(VOL,13)-VOL)<=(REF(VOL,13)*0.05))),13,0);
黄:((((REF(VOL,3)-REF(VOL,4))>=REF(VOL,4)) OR
(REF(VOL,3)-REF(VOL,4))>=(REF(VOL,3)*0.4))OR
(REF(VOL,4)<REF(VOL,3) AND REF(VOL,5)<REF(VOL,4) AND REF(VOL,6)<REF(VOL,5)) OR REF((X+X1+X2+X3+X4+X5+X6+X7+X8+X9+X10+X11+X12),3)>0)   
AND
VOL<REF(VOL,1) AND REF(VOL,1)<REF(VOL,2) AND REF(VOL,2)<REF(VOL,3) AND
REF(C,1)>=REF(L,3) AND C>=REF(L,3) AND REF(C,2)>=REF(L,3),linethick0;
X+X1+X2+X3+X4+X5+X6+X7+X8+X9+X10+X11+X12,linethick0;{平量柱间隔个数}
IF(黄>0,VOL-10,0),linethick2,STICK,colorgreen;
IF(X==1 OR X1==2 OR X2==3 OR X3==4 OR X4==5 OR X5==6 OR X6==7 OR X7==8 OR X8==9 OR X9==10 OR X10==11 OR X11==12 OR X12==13,
VOL-50,0),STICK,linethick2,COLORMAGENTA;
突破黄金柱:REF(黄,1)>0 AND (倍量>0 OR 小倍量>0),linethick0;
不完善望,帮忙改下


王新银 发表于 2010-8-21 13:17

表情就是   :(      
   改一下就可以

8wangle 发表于 2016-3-18 11:39

8888888888888888888888

8wangle 发表于 2016-3-18 11:38

88888888888888888888

苦命矿工 发表于 2010-8-21 13:40

我还是努力地顶一下,规范地回帖吧~~~~~~
具体规则请参见《论坛会员守则》《净化论坛环境,打击恶意灌水、看帖不回、人身攻击......等等的丑恶低俗现象》。

爱丽舍 发表于 2010-8-21 13:41

8888888888888888888888888888888888888888888888888888888

王新银 发表于 2010-8-21 13:42

:D:lol!!!!!!!!!

王新银 发表于 2010-8-21 14:18

本帖最后由 王新银 于 2010-8-21 14:49 编辑

把黄金柱和K线结合一下
N1(1,100,3);
N2(1,100,6);
N3(1,100,12);
N4(1,100,24);

多空指数:(MA(CLOSE,N1)+MA(CLOSE,N2)+MA(CLOSE,N3)+MA(CLOSE,N4))/4;

X:=IF(VOL==REF(VOL,1) OR (VOL>REF(VOL,1) AND (VOL-REF(VOL,1))<=(VOL*0.05)) OR (VOL<REF(VOL,1) AND (REF(VOL,1)-VOL)<=(REF(VOL,1)*0.05)),1,0);

X1:=IF(X==0 AND VOL>REF(VOL,1) AND (VOL==REF(VOL,2) OR (VOL>REF(VOL,2) AND (VOL-REF(VOL,2))<=(VOL*0.05)) OR (VOL<REF(VOL,2) AND (REF(VOL,2)-VOL)<=(REF(VOL,2)*0.05))),2,0);

X2:=IF(X==0 AND X1==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND (VOL==REF(VOL,3) OR (VOL>REF(VOL,3) AND (VOL-REF(VOL,3))<=(VOL*0.05)) OR (VOL<REF(VOL,3) AND (REF(VOL,3)-VOL)<=(REF(VOL,3)*0.05))),3,0);

X3:=IF(X==0 AND X1==0 AND X2==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND (VOL==REF(VOL,4) OR (VOL>REF(VOL,4) AND (VOL-REF(VOL,4))<=(VOL*0.05)) OR
(VOL<REF(VOL,4) AND (REF(VOL,4)-VOL)<=(REF(VOL,4)*0.05))),4,0);

X4:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND
      (VOL==REF(VOL,5) OR (VOL>REF(VOL,5) AND (VOL-REF(VOL,5))<=(VOL*0.05)) OR (VOL<REF(VOL,5) AND (REF(VOL,5)-VOL)<=(REF(VOL,5)*0.05))),5,0);

X5:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND
      (VOL==REF(VOL,6) OR (VOL>REF(VOL,6) AND (VOL-REF(VOL,6))<=(VOL*0.05)) OR (VOL<REF(VOL,6) AND (REF(VOL,6)-VOL)<=(REF(VOL,6)*0.05))),6,0);

X6:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND
       VOL>REF(VOL,6) AND (VOL==REF(VOL,7) OR (VOL>REF(VOL,7) AND (VOL-REF(VOL,7))<=(VOL*0.05)) OR (VOL<REF(VOL,7) AND (REF(VOL,7)-VOL)<=(REF(VOL,7)*0.05))),7,0);

X7:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND X6==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND
       VOL>REF(VOL,6) AND VOL>REF(VOL,7) AND (VOL==REF(VOL,8) OR (VOL>REF(VOL,8) AND (VOL-REF(VOL,8))<=(VOL*0.05)) OR (VOL<REF(VOL,8) AND (REF(VOL,8)-VOL)<=(REF(VOL,8)*0.05))),8,0);

X8:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND X6==0 AND X7==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND
       VOL>REF(VOL,6) AND VOL>REF(VOL,7) AND VOL>REF(VOL,8) AND (VOL==REF(VOL,9) OR (VOL>REF(VOL,9) AND (VOL-REF(VOL,9))<=(VOL*0.05)) OR (VOL<REF(VOL,9) AND (REF(VOL,9)-VOL)<=(REF(VOL,9)*0.05))),9,0);

X9:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND X6==0 AND X7==0 AND X8==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND
       VOL>REF(VOL,6) AND VOL>REF(VOL,7) AND VOL>REF(VOL,8) AND VOL>REF(VOL,9) AND
      (VOL==REF(VOL,10) OR (VOL>REF(VOL,10) AND (VOL-REF(VOL,10))<=(VOL*0.05)) OR (VOL<REF(VOL,10) AND (REF(VOL,10)-VOL)<=(REF(VOL,10)*0.05))),10,0);

X10:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND X6==0 AND X7==0 AND X8==0 AND X9==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND
       VOL>REF(VOL,6) AND VOL>REF(VOL,7) AND VOL>REF(VOL,8) AND VOL>REF(VOL,9) AND VOL>REF(VOL,10) AND
      (VOL==REF(VOL,11) OR (VOL>REF(VOL,11) AND (VOL-REF(VOL,11))<=(VOL*0.05)) OR (VOL<REF(VOL,11) AND (REF(VOL,11)-VOL)<=(REF(VOL,11)*0.05))),11,0);

X11:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND X6==0 AND X7==0 AND X8==0 AND X9==0 AND X10==0 AND VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF   (VOL,5) AND VOL>REF(VOL,6) AND VOL>REF(VOL,7) AND VOL>REF(VOL,8) AND VOL>REF(VOL,9) AND VOL>REF(VOL,10) AND VOL>REF(VOL,11) AND
      (VOL==REF(VOL,12) OR (VOL>REF(VOL,12) AND (VOL-REF(VOL,12))<=(VOL*0.05)) OR (VOL<REF(VOL,12) AND (REF(VOL,12)-VOL)<=(REF(VOL,12)*0.05))),12,0);

X12:=IF(X==0 AND X1==0 AND X2==0 AND X3==0 AND X4==0 AND X5==0 AND X6==0 AND X7==0 AND X8==0 AND X9==0 AND X10==0 AND X11==0 AND
   VOL>REF(VOL,1) AND VOL>REF(VOL,2) AND VOL>REF(VOL,3) AND VOL>REF(VOL,4) AND VOL>REF(VOL,5) AND VOL>REF(VOL,6) AND VOL>REF(VOL,7) AND VOL>REF(VOL,8) AND VOL>REF(VOL,9) AND VOL>REF(VOL,10) AND
   VOL>REF(VOL,11) AND VOL>REF(VOL,12)AND
    (VOL==REF(VOL,13) OR (VOL>REF(VOL,13) AND (VOL-REF(VOL,13))<=(VOL*0.05)) OR (VOL<REF(VOL,13) AND (REF(VOL,13)-VOL)<=(REF(VOL,13)*0.05))),13,0);

黄:=((((REF(VOL,3)-REF(VOL,4))>=REF(VOL,4)) OR
(REF(VOL,3)-REF(VOL,4))>=(REF(VOL,3)*0.4))OR
(REF(VOL,4)<REF(VOL,3) AND REF(VOL,5)<REF(VOL,4) AND REF(VOL,6)<REF(VOL,5)) OR REF((X+X1+X2+X3+X4+X5+X6+X7+X8+X9+X10+X11+X12),3)>0)   
AND
((VOL<REF(VOL,1) AND REF(VOL,1)<REF(VOL,2) AND REF(VOL,2)<REF(VOL,3)) OR
(VOL<REF(VOL,3) AND REF(VOL,1)<REF(VOL,3) AND REF(VOL,2)<REF(VOL,3))) AND
REF(C,1)>=REF(L,3) AND C>=REF(L,3) AND REF(C,2)>=REF(L,3),linethick0;

KL:=IF(黄>0 and (VOL<REF(VOL,1) AND REF(VOL,1)<REF(VOL,2) AND REF(VOL,2)<REF(VOL,3)),1,0);
ss:=SUMBARS(黄>0 AND KL>0,1);
STICKLINE(ss,REF(C,ss-1)*1.002,REF(C,ss-1),5,0),COLORRED;
STICKLINE(ss,REF(L,ss-1)*1.002,REF(L,ss-1),5,0),COLORRED;
KS:=IF(黄>0 AND KL==0 AND (VOL<REF(VOL,3) AND REF(VOL,1)<REF(VOL,3) AND REF(VOL,2)<REF(VOL,3)),1,0);
FF:=SUMBARS(黄>0 AND KS>0,1);
STICKLINE(FF,REF(C,FF-1)*1.002,REF(C,FF-1),5,0),colorblue;
STICKLINE(FF,REF(L,FF-1)*1.002,REF(L,FF-1),5,0),colorblue;

吉子扬 发表于 2010-8-21 14:19

过过fffffffffffffffffffffffffffffffffffffffffffffff

王新银 发表于 2010-8-21 15:49

:)!!!!!!!!!!!!!!!!!!!!!!!

叶枫 发表于 2010-8-21 16:13

我还是努力地顶一下,规范地回帖吧~~~~~~

剑虹 发表于 2010-8-21 16:19

不会编公式,那里有教的,我去学学

王新银 发表于 2010-8-21 16:35

照着别人的公式,找自己软件的一些指标函数,慢慢修改别人的一些公式,和把别人公式的东西和自己的东西拼合在一起,慢慢的编写一些不需要高级算法的公式还是很容易的,逻辑思路要对,不要想一次就能成

文山攻徒 发表于 2010-8-21 17:28

我还是努力地顶一下,规范地回帖吧~~~~~~

乐在股中 发表于 2010-8-21 22:29

楼主辛苦了

股海明灯照前程 发表于 2010-8-21 22:45

等号太滥用了,这么多的双个等号?????

汉兵 发表于 2010-8-22 10:29

很好 高实在是高 坚决支持严重同意 认真学习深刻领会 楼主辛苦了
页: [1] 2
查看完整版本: 编写了基于倍量、梯量,平量的一个指标不完善大家看下