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

潮河边人博客

http://jsl641124.blog.163.com/

 
 
 

日志

 
 
关于我

出生于黄海之滨潮河岸边响水县。历任县支行记账员、主任、科长,市分行个金、会计、管理信息处长和省寿险公司经理、总经理、省分行《内部决策参考》特邀撰稿人等职。喜好文字数字,曾多次参与省分行重点课题研究,重大项目推广和重要会议文件起草工作,发表学术文章四十余篇,省级以上获奖课题及项目十余个。

【原创】股票公式1:主图-筹码转换-个股强弱-MACD-净买盘  

2011-04-01 16:37:10|  分类: 股权融资 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
 

【原创】股票公式1:主图-筹码转换-个股强弱-MACD-净买盘 - 潮河边人 - 潮河边人博客

 

【主图】参数为21.1.100.1

{黄金三角----------------------------------------------}

drawgbklast(c>0,strip(rgb(80,95,110),rgb(0,0,0),3));
MA60:MA(CLOSE,60),colorgreen{绿};
{黄金线------------------------------------------------}
JDirection:=C-REF(C,34);
JXX:=ABS(C-REF(C,1));
JVolatility:=SUM(JXX,34);
ER:=Sum(ABS(JDirection/JVolatility),1)/1;
FastC:=2/(3+1);
SlowC:=2/(8+1);
SSC:=ER*(FastC-SlowC)+SlowC;
Constant:=SSC*SSC;
YY:=REF(C,1)+Constant*(C-REF(C,1));
AA:=IF(SUM(1,0)=34+1,YY,YY);
BB:=BarsLast(AA);
DD:=REF(C,BB);
CC:=C;
DD:=Ref(DD,1)+Constant*(CC-Ref(DD,1));
金线:DD,PRECIS1,LINETHICK2,coloryellow{黄};
partline(金线,dd>ref(dd,1)),PRECIS1,LINETHICK2,colorred{红};

{------------------------------------------------}
A1:=REF(HIGH,3)=HHV(HIGH,2*3+1); B1:=FILTER(A1,3); C1:=BACKSET(B1,3+1); D1:=FILTER(C1,3);{高点}
A2:=REF(LOW,3)=LLV(LOW,2*3+1); B2:=FILTER(A2,3); C2:=BACKSET(B2,3+1); D2:=FILTER(C2,3);{低点}
E1:=(REF(LLV(LOW,2*34),1)+REF(HHV(HIGH,2*34),1))/2; E2:=(HIGH+LOW)/2;{高低点出现在同一K线上时可作取舍}
H1:=(D1 AND NOT(D2 AND E1>=E2)) OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
H2:=D1 AND NOT(D2 AND E1>=E2);
L1:=D2 AND NOT(D1 AND E1=E2);
X1:=REF(BARSLAST(H1),1)+1; F1:=BACKSET(H1 AND COUNT(L1,X1)>0,LLVBARS(IF(L1,LOW,10000),X1));
G1:=F1>REF(F1,1); I1:=BACKSET(G1,2); LD:=I1>REF(I1,1);{过滤后低点}
L2:=LD OR BARSTATUS=2 OR BARSCOUNT(CLOSE)=1;
X2:=REF(BARSLAST(L2),1)+1; F2:=BACKSET(L2 AND COUNT(H2,X2)>0,HHVBARS(IF(H2,HIGH,0),X2));
G2:=F2>REF(F2,1); I2:=BACKSET(G2,2); HD:=I2>REF(I2,1);{过滤后高点}
{前短期上涨连线}DRAWLINE(LD,L,HD,H,0),colorwhite{白},LINETHICK1,POINTDOT;
{前短期下跌连线}DRAWLINE(HD,H,LD,L,0),colorwhite{白},LINETHICK1,POINTDOT;
J1:=BACKSET(BARSTATUS=2,MIN(BARSLAST(HD),BARSLAST(LD))+1); J2:=J1>REF(J1,1);
{白趋势线,连在上涨最高价,下跌最低价上}DRAWLINE(J2,IF(HD,H,L),BARSTATUS=2,IF(BARSLAST(HD)>BARSLAST(LD),H,L),0),colorwhite{白},LINETHICK1,POINTDOT;
A3:=H; B3:=REF(H,REF(BARSLAST(HD),1)+1)>REF(H,REF(BARSLAST(HD),1)+2+REF(BARSLAST(HD),REF(BARSLAST(HD),1)+2));
D3:=A3 AND B3 AND HD; E3:=BACKSET(D3,REF(BARSLAST(HD),1)+2); HH:=E3>REF(E3,1);{找出全部长期高点}
A4:=L>REF(L,REF(BARSLAST(LD),1)+1);
B4:=REF(L,REF(BARSLAST(LD),1)+1); D4:=A4 AND B4 AND LD; E4:=BACKSET(D4,REF(BARSLAST(LD),1)+2); LL:=E4>REF(E4,1);{找出全部长期低点}
DRAWICON(HH,H,5{感叹}),ALIGN1;DRAWICON(LL,L,4{黄拐点}),ALIGN1;


{短期支撑压力线---------------------------------------------------}
UU:=BACKSET(BARSTATUS=2,BARSLAST(LD)+1);
VV:=UU>REF(UU,1);
WW:=BACKSET(VV,REF(BARSLAST(LD),1)+2);
XX:=WW>REF(WW,1);
{粉红低点连线}DRAWLINE(XX,L,VV,L,1),colorf00ff0{粉红},LINETHICK1;
UU2:=BACKSET(BARSTATUS=2,BARSLAST(HD)+1);
VV2:=UU2>REF(UU2,1);
WW2:=BACKSET(VV2,REF(BARSLAST(HD),1)+2);
XX2:=WW2>REF(WW2,1);
{粉红高点连线}DRAWLINE(XX2,H,VV2,H,1),colorf00ff0{粉红},LINETHICK1;

{三角形语句-------------------------------------------------}
底:REF(L,BARSLAST(VV)),PRECIS2,LINETHICK1,colorred{红};
顶:REF(H,BARSLAST(VV2)),PRECIS2,LINETHICK1,coloryellow{黄};
{下迭三角形:蓝色三角形画完介入}
{沟}StickLine(VV,顶,底,0,0),colorff9933{淡蓝},linethick2;{竖}
{弦}DRAWLINE(VV2,H,VV,L,0),colorff9933{淡蓝},linethick2;{斜}
{股}DRAWLINE(VV2,H,VV,顶,0),colorff9933{淡蓝},linethick2;{横}
{上涨三角形:红色三角形画完出局};
{沟}StickLine(VV2 ,顶,底,0,0),colorred{红},linethick2;{竖红柱};
{弦}DRAWLINE(VV,L,VV2,H,0),colorred{红},linethick2;{斜}
{股}DRAWLINE(VV,L,VV2,底,0),colorred{红},linethick2;{横}

{-------------------------------------------------    };
最低价:L,PRECIS2,LINETHICK1,colorred{红};
最高价:H,PRECIS2,LINETHICK1,colorred{红};
抄底值:(最低价-底)/底*10,PRECIS1,LINETHICK0,colorred{红};
突破顶:(最高价-顶)/顶*10,PRECIS1,LINETHICK0,colorgreen{绿};
分水岭:MA(L,0),PRECIS2,COLORA9A9A9{亮银灰};
大盘:=EMA(INDEXL,500)/EMA(L,500); 
盘低:INDEXL/大盘,PRECIS1,LINETHICK1,COLOR808860{灰绿};

{强弱------------------------------------------------}
强弱值:最低价-盘低,PRECIS1,LINETHICK0,COLORFFEEBB{银白};{个股强度>=0}
趋势值:金线-大盘,PRECIS1,LINETHICK0,COLORFFEEBB{银白};{趋势值>=0,特别应注意0附近的反转}
偏离度:(最低价-金线)/金线*100,PRECIS0,LINETHICK0,COLORFFEEBB{银白};{过高或过低则反转}
分水差:(最低价-分水岭),LINETHICK0;

STICKLINE(最低价=底 ,底,底*0.9,2,0),COLORFFEEBB{银白};
DRAWTEXT((最低价=底) AND (强弱值<0) ,底*0.9,'弱底'),coloryellow{黄};
STICKLINE((最低价=底) AND (强弱值>=0)AND 趋势值>=0,底,底*0.9,2,0),coloryellow{黄};
DRAWTEXT((最低价=底) AND (强弱值>=0) ,底*0.9,'强底'),coloryellow{黄};

强势底:=(最低价=底) AND (强弱值>=0)AND 趋势值>=0;{大跌时+偏离度负值大的,涨时选择0}
弱势底:=(最低价=底) AND (强弱值<0)AND 趋势值<0;{大盘涨时可选择0,但趋势值要负值大的}
强势底: (强势底)*1,PRECIS1,LINETHICK0,coloryellow{选股用};
弱势底: (弱势底)*1,PRECIS1,LINETHICK0,coloryellow{选股用};

STICKLINE(最高价=顶 ,顶,顶*1.05,2,0),COLORFFEEBB{银白};
DRAWTEXT((最高价=顶) AND (强弱值<0) ,顶*1.05,'弱顶'),coloryellow{黄};
STICKLINE((最高价=顶) AND (强弱值>=0)AND 趋势值>=0,顶,顶*1.05,2,0),coloryellow{黄};
DRAWTEXT((最高价=顶) AND (强弱值>=0) ,顶*1.05,'强顶'),coloryellow{黄};

DRAWTEXTABS(5,5,'板块:'+BKNAME),COLORFFEEBB{银白};


{附图一:筹码转换}
DRAWTEXTREL(0,100,'选股:主力持仓>50和散筹'),COLORYELLOW;
drawgbklast(c>0,strip(rgb(0,0,0),rgb(0,0,0),3));
主力持仓:=EMA(100*(CLOSE-LLV(LOW,34))/(HHV(HIGH,34)-LLV(LOW,34)),3);
主力持仓:主力持仓,PRECIS1,LINETHICK1,coloryellow{黄};
主筹获利盘:=EMA(WINNER(C)*70,5);
主筹获利盘:主筹获利盘,PRECIS1,LINETHICK1,colorred;
主筹获利盘,colorred{红},PRECIS0,LINETHICK1;

散筹{浮筹比}:EMA((WINNER(C*1.1)-WINNER(C*0.9))*80,5),PRECIS0,LINETHICK2,COLORFFEEBB{银白};
套牢盘:100-主筹获利盘,PRECIS1,colorgreen{绿};
stickline(主筹获利盘>散筹,50,0,0.1,0),colorf66FF0{粉红};
stickline(主筹获利盘<散筹,50,0,0.1,0),colorff9933{淡蓝};
stickline(主筹获利盘>散筹 AND 主筹获利盘>50,主筹获利盘,50,4,0),colorred{红};
主散差:主筹获利盘-散筹,colorred{红},PRECIS0,LINETHICK0;
均价:AMOUNT/VOL/100,PRECIS2,COLORCYAN{水晶};
50,PRECIS0;
100,PRECIS0,colorff9933{淡蓝};


{附图二:所属指数}
INPUT:N(5,1,999);
drawgbklast(c>0,strip(rgb(0,0,0),rgb(0,0,0),3));

指数:=IF(INBLOCK('工程建筑'),"991002$CLOSE",
IF(INBLOCK('电力'),"991003$CLOSE",
IF(INBLOCK('计算机'),"991004$CLOSE",
IF(INBLOCK('电子信息'),"991006$CLOSE",
IF(INBLOCK('房地产'),"991007$CLOSE",
IF(INBLOCK('纺织服装'),"991008$CLOSE",
IF(INBLOCK('钢铁'),"991009$CLOSE",
IF(INBLOCK('供水供气'),"991010$CLOSE",
IF(INBLOCK('化工化纤'),"991011$CLOSE",
IF(INBLOCK('电器'),"991014$CLOSE",
IF(INBLOCK('交通设施'),"991016$CLOSE",
IF(INBLOCK('银行类'),"991017$CLOSE",
IF(INBLOCK('旅游酒店'),"991018$CLOSE",
IF(INBLOCK('煤炭石油'),"991019$CLOSE",
IF(INBLOCK('酿酒食品'),"991020$CLOSE",
IF(INBLOCK('农林牧渔'),"991021$CLOSE",
IF(INBLOCK('商业连锁'),"991023$CLOSE",
IF(INBLOCK('建材'),"991024$CLOSE",
IF(INBLOCK('其他行业'),"991025$CLOSE",
IF(INBLOCK('汽车类'),"991026$CLOSE",
IF(INBLOCK('机械'),"991027$CLOSE",
IF(INBLOCK('医药'),"991028$CLOSE",
IF(INBLOCK('外贸'),"991031$CLOSE",
IF(INBLOCK('教育传媒'),"991032$CLOSE",
IF(INBLOCK('仪电仪表'),"991033$CLOSE",
IF(INBLOCK('有色金属'),"991034$CLOSE",
IF(INBLOCK('造纸印刷'),"991035$CLOSE",
IF(INBLOCK('券商'),"991036$CLOSE",
IF(INBLOCK('电力设备'),"991037$CLOSE",
IF(INBLOCK('通信'),"991135$CLOSE",
IF(INBLOCK('运输物流'),"991136$CLOSE",
IF(INBLOCK('保险'),"991255$CLOSE",0)
)))))))))))))))))))))))))))))));
个股涨:(C-REF(C,N))/REF(C,N)*100,PRECIS2,LINETHICK0,coloryellow{黄};
大盘涨:(INDEXC-REF(INDEXC,N))/REF(INDEXC,N)*100,PRECIS2,LINETHICK0,colorf0f000{淡蓝};
比大盘:个股涨-大盘涨,PRECIS2,LINETHICK0,colorf0f000{淡蓝};
指数涨:(指数-REF(指数,N))/REF(指数,N)*100,PRECIS2,LINETHICK0,COLOR7DA8FF{淡咖啡};
比指数:个股涨-指数涨,PRECIS2,LINETHICK0,coloryellow{黄};
QD:比大盘,COLOR3d;
T:=min(count(QD,0),60);
T1:ema(QD,T)*T,LINETHICK1,PRECIS1,coloryellow{黄};
T3:ema(T1,3),PRECIS1,LINETHICK1,colorf00ff0{粉红};
T5:ema(T1,5),PRECIS1,LINETHICK1,colorgreen{绿};
T20:ema(T1,20),PRECIS1,LINETHICK1,COLORFFEEBB{银白};
T60:eMA(T1,60),PRECIS1,LINETHICK1,COLOR808860{灰绿};
partline(T60,T60>ref(T60,1)),PRECIS1,LINETHICK1,color0093f5;

板块:=IFS(INBLOCK('工程建筑'),'工程建筑',
IFS(INBLOCK('电力'),'电力',
IFS(INBLOCK('计算机'),'计算机',
IFS(INBLOCK('电子信息'),'电子信息',
IFS(INBLOCK('房地产'),'房地产',
IFS(INBLOCK('纺织服装'),'纺织服装',
IFS(INBLOCK('钢铁'),'钢铁',
IFS(INBLOCK('供水供气'),'供水供气',
IFS(INBLOCK('化工化纤'),'化工化纤',
IFS(INBLOCK('电器'),'电器',
IFS(INBLOCK('交通设施'),'交通设施',
IFS(INBLOCK('银行类'),'银行类',
IFS(INBLOCK('旅游酒店'),'旅游酒店',
IFS(INBLOCK('煤炭石油'),'煤炭石油',
IFS(INBLOCK('酿酒食品'),'酿酒食品',
IFS(INBLOCK('农林牧渔'),'农林牧渔',
IFS(INBLOCK('商业连锁'),'商业连锁',
IFS(INBLOCK('建材'),'建材',
IFS(INBLOCK('其他行业'),'其他行业',
IFS(INBLOCK('汽车类'),'汽车类',
IFS(INBLOCK('机械'),'机械',
IFS(INBLOCK('医药'),'医药',
IFS(INBLOCK('外贸'),'外贸',
IFS(INBLOCK('教育传媒'),'教育传媒',
IFS(INBLOCK('仪电仪表'),'仪电仪表',
IFS(INBLOCK('有色金属'),'有色金属',
IFS(INBLOCK('造纸印刷'),'造纸印刷',
IFS(INBLOCK('券商'),'券商',
IFS(INBLOCK('电力设备'),'电力设备',
IFS(INBLOCK('通信'),'通信',
IFS(INBLOCK('运输物流'),'运输物流',
IFS(INBLOCK('保险'),'保险','')
)))))))))))))))))))))))))))))));
DRAWTEXTABS(1,0,'所属: '+板块+'指数:'+ NUMTOSTRN(指数,0)),COLORYELLOW;
DRAWTEXTABS(1,15,'比大盘:'+ NUMTOSTRN(比大盘,2)),colorf0f000{淡蓝};
DRAWTEXTABS(80,15,'比指数:'+ NUMTOSTRN(比指数,2)),COLOR7DA8FF{淡咖啡};


{附图三:MACD}

drawgbklast(c>0,strip(rgb(0,0,0),rgb(0,0,0),3));
{长短趋势------------------------------------------------------------------------}
短趋势:EMA(CLOSE,12)-EMA(CLOSE,26),colorgreen{绿};
PARTLINE(短趋势,短趋势>REF(短趋势,1)),colorred{红},LINETHICK1;
PARTLINE(短趋势,短趋势<=REF(短趋势,1)),colorgreen{绿},LINETHICK1;

STICKLINE(短趋势>0 AND 短趋势>=REF(短趋势,1),0,短趋势,2,1),colorred{红};
STICKLINE(短趋势>0 AND 短趋势<REF(短趋势,1),0,短趋势,2,1),coloryellow{黄} ;
STICKLINE(短趋势<0 AND 短趋势>=REF(短趋势,1),0,短趋势,2,1),COLORFFC8FF{粉};
STICKLINE(短趋势<0 AND 短趋势<REF(短趋势,1),0,短趋势,2,1),colorff9933{淡蓝} ;


中趋势:EMA(短趋势,9),colorgreen{绿};

长趋势:EMA(短趋势,55), colorred{红},LINETHICK2;

 


{提示------------------------------------------------------------------------}

VAR3:=(短趋势-长趋势);
长短差:VAR3>=REF(VAR3,1)AND VAR3>0,coloryellow,LINETHICK0;


{附图四:净买盘}

换手:=100*vol/capital;
VAR1:=换手/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
买盘:=IF(CLOSE>OPEN,VAR1*(HIGH-LOW),IF(CLOSE<OPEN,VAR1*((HIGH-OPEN)+(CLOSE-LOW)),换手/2));
卖盘:=-IF(CLOSE>OPEN,0-VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-VAR1*(HIGH-LOW),0-换手/2));
净买盘:买盘-卖盘,PRECIS2,LINETHICK0;
累计:SUM(净买盘,0),PRECIS0,LINETHICK0,colorff937f{天蓝色};


成交金额:=AMOUNT/10000;{即买入资金+卖出资金}
买入资金:=成交金额*买盘/换手;{即成交金额*买量/成交量}
卖出资金:=成交金额*卖盘/换手;{即成交金额*卖量/成交量}
净买额:买入资金-卖出资金,PRECIS0,LINETHICK0;

QD:净买盘,COLOR3d;
T:=min(count(QD,0),60);
T1:ema(QD,T)*T,LINETHICK1,PRECIS1,coloryellow{黄};
T3:ema(T1,3),PRECIS1,LINETHICK1,colorf00ff0;
T5:ema(T1,5),PRECIS1,LINETHICK1,colorgreen;
T20:ema(T1,20),PRECIS1,LINETHICK1,colore66878{紫罗蓝};
T60:eMA(T1,60),PRECIS1,LINETHICK1,COLOR808860;
partline(T60,T60>ref(T60,1)),PRECIS1,LINETHICK1,color0093f5;

DRAWTEXTABS(2,2,'净买盘:'+ NUMTOSTRN(净买盘,2)),coloryellow{黄},LINETHICK3;
DRAWTEXTABS(140,2,'净买额(万元):'+ NUMTOSTRN(净买额,0)),coloryellow{黄},LINETHICK3;


返回首页

  评论这张
 
阅读(926)| 评论(0)

历史上的今天

评论

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

页脚

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