您现在的位置:好股网 >> 股票公式 >> 通达信公式 >> 一键转帖:筹码峰长源码 通达信 贴图

筹码峰长源码 通达信 贴图


指标功能:[B]国产软件[/B]
指标类型:简体中文
所需积分:0
推荐星级:
授权方式:共享版
公式大小:1.00 KB
更新时间:2018-07-23 09:21:00
公式简介:

网上类似的指标,大部分把筹码分布空间分成100或50等分,求最长峰,虽然精确一下,但计算太慢,等于没用
以下仅仅是把筹码分布空间分成10等分,求最长峰,计算快一些
喜欢就拿去!

{筹码峰长}
HL:=(COST(97)-COST(3))/10;
CM1:=WINNER(COST(3)+HL*1)-WINNER(COST(3)+HL*0);CM2:=WINNER(COST(3)+HL*2)-WINNER(COST(3)+HL*1);
CM3:=WINNER(COST(3)+HL*3)-WINNER(COST(3)+HL*2);CM4:=WINNER(COST(3)+HL*4)-WINNER(COST(3)+HL*3);
CM5:=WINNER(COST(3)+HL*5)-WINNER(COST(3)+HL*4);CM6:=WINNER(COST(3)+HL*6)-WINNER(COST(3)+HL*5);
CM7:=WINNER(COST(3)+HL*7)-WINNER(COST(3)+HL*6);CM8:=WINNER(COST(3)+HL*8)-WINNER(COST(3)+HL*7);
CM9:=WINNER(COST(3)+HL*9)-WINNER(COST(3)+HL*8);CM10:=WINNER(COST(3)+HL*10)-WINNER(COST(3)+HL*9);
MXCM:=MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(CM1,CM2),CM3),CM4),CM5),CM6),CM7),CM8),CM9),CM10);
峰价上:IF(CM10>=MXCM,COST(3)+HL*10,IF(CM9>=MXCM,COST(3)+HL*9,IF(CM8>=MXCM,COST(3)+HL*8,
IF(CM7>=MXCM,COST(3)+HL*7,IF(CM6>=MXCM,COST(3)+HL*6,IF(CM5>=MXCM,COST(3)+HL*5,
IF(CM4>=MXCM,COST(3)+HL*4,IF(CM3>=MXCM,COST(3)+HL*3,IF(CM2>=MXCM,COST(3)+HL*2,
IF(CM1>=MXCM,COST(3)+HL*1,0)))))))))),COLORWHITE;
峰价下:峰价上-HL,COLORWHITE;
峰价中:峰价上-HL*0.5,COLORMAGENTA;
峰量:MXCM*100,NODRAW;


 


筹码峰长源码 通达信 贴图

筹码峰长源码 通达信 贴图

指标源码:

{筹码峰长}
HL:=(COST(97)-COST(3))/10;
CM1:=WINNER(COST(3)+HL*1)-WINNER(COST(3)+HL*0);CM2:=WINNER(COST(3)+HL*2)-WINNER(COST(3)+HL*1);
CM3:=WINNER(COST(3)+HL*3)-WINNER(COST(3)+HL*2);CM4:=WINNER(COST(3)+HL*4)-WINNER(COST(3)+HL*3);
CM5:=WINNER(COST(3)+HL*5)-WINNER(COST(3)+HL*4);CM6:=WINNER(COST(3)+HL*6)-WINNER(COST(3)+HL*5);
CM7:=WINNER(COST(3)+HL*7)-WINNER(COST(3)+HL*6);CM8:=WINNER(COST(3)+HL*8)-WINNER(COST(3)+HL*7);
CM9:=WINNER(COST(3)+HL*9)-WINNER(COST(3)+HL*8);CM10:=WINNER(COST(3)+HL*10)-WINNER(COST(3)+HL*9);
MXCM:=MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(MAX(CM1,CM2),CM3),CM4),CM5),CM6),CM7),CM8),CM9),CM10);
峰价上:IF(CM10>=MXCM,COST(3)+HL*10,IF(CM9>=MXCM,COST(3)+HL*9,IF(CM8>=MXCM,COST(3)+HL*8,
IF(CM7>=MXCM,COST(3)+HL*7,IF(CM6>=MXCM,COST(3)+HL*6,IF(CM5>=MXCM,COST(3)+HL*5,
IF(CM4>=MXCM,COST(3)+HL*4,IF(CM3>=MXCM,COST(3)+HL*3,IF(CM2>=MXCM,COST(3)+HL*2,
IF(CM1>=MXCM,COST(3)+HL*1,0)))))))))),COLORWHITE;
峰价下:峰价上-HL,COLORWHITE;
峰价中:峰价上-HL*0.5,COLORMAGENTA;
峰量:MXCM*100,NODRAW;
位置:(峰价上-COST(3))/(COST(97)-COST(3)),NODRAW;
STICKLINE(位置>=0.7 AND 峰量<20,峰价下*1.001,峰价下,2,0),COLORRED;
STICKLINE(位置>=0.7 AND 峰量>=20,峰价上*1.001,峰价上,2,0),COLORGREEN;
STICKLINE(位置<=0.3 AND 峰量>=20,峰价下*1.001,峰价下,2,0),COLORRED;


[url=http://www.goodgupiao.com/gupiaogongshi/50945.html][B]筹码峰长源码 通达信 贴图[/B][/url]