股资源-股票学习站-学炒股-股票课程-炒股教程-分析选股指标-入门基础知识

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[大智慧] 「指标」一个方便看盘的分时主图-(源码)


    [-----复制链接-----]

22万

主题

22万

帖子

14

精华

积分
11042
楼主
2024-3-22 20:13:25
【资料名称】:一个方便看盘的分时主图-(源码)介绍
【资料描述】:

一个方便看盘的分时主图-(源码)

可把以下代码加入到你任意的大智慧主图中即可

源码:

所属板块:=BKNAME;
每股市盈率:=DYNAINFO(39);
每股收益:=FINANCE2(3);
流通盘大小:=FINANCE2(37)/1000000*100;
同比增长:=FINANCE2(10);
DRAWTEXTREL(0,765,'同比增长:'+NUMTOSTRN(同比增长,2)+'%'),LINETHICK1,ColorAFFF00;
DRAWTEXTREL(0,695,'流 通 盘:'+NUMTOSTRN(流通盘大小,2)+'亿'),LINETHICK1,ColorAFFF00;
DRAWTEXTREL(180,695,'每股收益:'+NUMTOSTRN(每股收益,2)+'元'),ColorAFFF00;
DRAWTEXTREL(180,765,'每股市盈:'+NUMTOSTRN(每股市盈率,1)+'倍'),ColorAFFF00;
DRAWTEXTREL(0,625,'所属板块:'+所属板块),COLORCYAN;
DRAWTEXTREL(260,10,'上涨家数:'+NUMTOSTRN(DYNAINFO(69),0)+' 家'),COLOR0000FF;
DRAWTEXTREL(530,10,'下跌家数:'+NUMTOSTRN(DYNAINFO(70),0)+' 家'),COLOR00FF00;
DRAWTEXTREL(400,10,'平盘家数:'+NUMTOSTRN(DYNAINFO(71),0)+' 家'),COLORFFFFFF;
MA5:="MAB.MA5#day";
MA10:="MAB.MA10#day";
MA24:="MAB.MA24#day";
MA30:="MAB.MA30#day";
MA60:="MAB.MA60#day";
MA100:="MAB.MA100#day";
MA200:="MAB.MA200#day";
MA300:="MAB.MA300#day";
MA400:="MAB.MA400#day";
MA5P:=(MA5-DYNAINFO(3))/DYNAINFO(3)*100;
MA10P:=(MA10-DYNAINFO(3))/DYNAINFO(3)*100;
MA24P:=(MA24-DYNAINFO(3))/DYNAINFO(3)*100;
MA30P:=(MA30-DYNAINFO(3))/DYNAINFO(3)*100;
MA60P:=(MA60-DYNAINFO(3))/DYNAINFO(3)*100;
MA100P:=(MA100-DYNAINFO(3))/DYNAINFO(3)*100;
MA200P:=(MA200-DYNAINFO(3))/DYNAINFO(3)*100;
MA300P:=(MA300-DYNAINFO(3))/DYNAINFO(3)*100;
MA400P:=(MA400-DYNAINFO(3))/DYNAINFO(3)*100;
DRAWTEXTREL( 0,10,' 5日线: '+NUMTOSTRN(MA5,2)+'元 '+NUMTOSTRN(MA5P,1)+'%'),colorwhite;
DRAWTEXTREL( 0,60 ,'10日线: '+NUMTOSTRN(MA10,2)+'元 '+NUMTOSTRN(MA10P,1)+'%'),COLORCYAN;
DRAWTEXTREL( 0,110 ,'24日线: '+NUMTOSTRN(MA24,2)+'元 '+NUMTOSTRN(MA24P,1)+'%'),Color00FFFF;
DRAWTEXTREL( 690,10 ,'昨高点: '+NUMTOSTRN(MA30,2)+'元 '+NUMTOSTRN(MA30P,1)+'%'),COLORFF00FF;
DRAWTEXTREL( 690,60 ,'昨低点: '+NUMTOSTRN(MA60,2)+'元 '+NUMTOSTRN(MA60P,1)+'%'),ColorAFFF00;
DRAWTEXTREL( 400,695 ,'生 命 线: '+NUMTOSTRN(MA400,2)+'元 '+NUMTOSTRN(MA400P,1)+'%'),ColorAFFF00;
DRAWTEXTREL( 400,765 ,'控盘成本: '+NUMTOSTRN(MA100,2)+'元 '+NUMTOSTRN(MA100P,1)+'%'),ColorAFFF00;
DRAWTEXTREL( 660,695 ,'低吸伏击: '+NUMTOSTRN(MA200,2)+'元 '+NUMTOSTRN(MA200P,1)+'%'),ColorAFFF00;
DRAWTEXTREL( 660,765 ,'走势铁底: '+NUMTOSTRN(MA300,2)+'元 '+NUMTOSTRN(MA300P,1)+'%'),ColorAFFF00;
VAR0:=VOL/CLOSE/2;
VAR1:=SUM(IF(VAR0>100 AND CLOSE>REF(CLOSE,1),VAR0,0),0);
VAR2:=SUM(IF(VAR0>100 AND CLOSE<REF(CLOSE,1),VAR0,0),0);
VAR3:=SUM(IF(VAR0<100 AND CLOSE>REF(CLOSE,1),VAR0,0),0);
VAR4:=SUM(IF(VAR0<100 AND CLOSE<REF(CLOSE,1),VAR0,0),0);
VAR5:=VAR1+VAR2+VAR3+VAR4;
VAR6:=IF(BARSTATUS=2,100*VAR1/VAR5,0);
VAR7:=IF(BARSTATUS=2,100*VAR2/VAR5,0);
VAR8:=IF(BARSTATUS=2,100*VAR3/VAR5,0);
VAR9:=IF(BARSTATUS=2,100*VAR4/VAR5,0);
DRAWTEXTREL(908,20,'大单买盘'),LINETHICK2,COLORFF55FF;
DRAWTEXTREL(908,188,'大单卖盘'),LINETHICK2,COLORFFFF55;
DRAWTEXTREL(908,356,'中小买盘'),LINETHICK2,COLOR5555FF;
DRAWTEXTREL(908,524,'中小卖盘'),LINETHICK2,COLOR55FF55;
IF BARSTATUS=2 THEN BEGIN
DRAWTEXTREL(930,100,''+FLOOR(VAR6)+'%'),LINETHICK2,COLORFF55FF;
END
IF BARSTATUS=2 THEN BEGIN
LOOP0:=FLOOR(VAR7);
VAR10:=''+LOOP0;
VAR11:=VAR10 + '%';
DRAWTEXTREL(930,268,VAR11),LINETHICK2,COLORFFFF55;
END
IF BARSTATUS=2 THEN BEGIN
LOOP1:=FLOOR(VAR8);
VAR12:=''+LOOP1;
VAR13:=VAR12+'%';
DRAWTEXTREL(930,436,VAR13),LINETHICK2,COLOR5555FF;
END
IF BARSTATUS=2 THEN BEGIN
LOOP2:=FLOOR(VAR9);
VAR14:=''+LOOP2;
VAR15:=VAR14+'%';
DRAWTEXTREL(930,604,VAR15),LINETHICK2,COLOR55FF55;
END;

公式名称: MAB (不能改为其他名,用来引用日线数据,保存即可)

MA5:MA(CLOSE,5),PRECIS2;
MA10:MA(CLOSE,10),PRECIS2;
MA24:MA(CLOSE,24),PRECIS2;
MA30:ref(h,1),PRECIS2;
MA60:ref(l,1),PRECIS2;
VAR0A:=EMA(EMA(EMA(CLOSE,2),2),2);
TLAMSENR:=MAX(MAX((HIGH-LOW),ABS((REF(CLOSE,1)-HIGH))),ABS((REF(CLOSE,1)-LOW)));
ATR:=MA(TLAMSENR,13);
VAR1A:=(REF(CLOSE,1)-REF(ATR,1));
MA400:(HHV(VAR1A,12)),PRECIS2;
VAR1:=EMA(AMOUNT/VOL/100,3);
MA100:EMA(VAR1,88),PRECIS2;
MA200:EMA(VAR1,88)*0.85,PRECIS2;
MA300:MA200*0.87,PRECIS2;





gd8553


【下载地址隐藏】:                    点:回复可见地址
游客,如果您要查看本帖隐藏内容请回复






上一篇:「指标」大智慧TS加BS指标(主图源码)
下一篇:「指标」趋势王 (弘历软件的主打指标)
回复

举报

QQ|

GMT+8, 2024-11-24 14:09

快速回复 返回顶部 返回列表