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

 找回密码
 注册昵称

QQ登录

只需一步,快速开始

搜索
上一主题 下一主题

[大智慧] 趋势王主图、源码、贴图


    [-----复制链接-----]
楼主
 通达信源码安装路径:1,工具栏点击公式选项。2,弹出公式窗口点击新建。3,把源码复制到指标编辑器保存。4,回到K线图界面安装建立好的公式 || 2024-3-21 17:10:01
趋势王主图、源码、贴图介绍

趋势王主图、源码、贴图

看同学们发图发的都非常好,咱也借花献图分享一个主图,感觉还可以吧,希望对和我一样的新人有帮助.
原码如下:
(另外,希望老师们能帮忙做一个短线选股公式,在出现提示调整结束之后的一段时间里(7-14天)依然下跌了10%-15%的股票)

{支撑与阻力线}
VarA1:=LLV(LOW,19);
VarB1:=HHV(HIGH,19);
支:VarA1,COLORred;
阻:VarB1,COLORgreen;
{趋势王}
IF(FINANCE2(37)/10000>=100) THEN BEGIN
DRAWTEXTREL(0,950,'【超大盘0.7%】 流通A股'+FINANCE2(37)/10000+'亿股'),LINETHICK2,ColorFF00FF; end;
IF(FINANCE2(37)/10000<100 and FINANCE2(37)/10000>=10) THEN BEGIN
DRAWTEXTREL(0,950,'【大盘股9.0%】 流通A股'+FINANCE2(37)/10000+'亿股'),LINETHICK2,ColorFF00FF; end;
IF(FINANCE2(37)/10000<10 and FINANCE2(37)/10000>=5) THEN BEGIN
DRAWTEXTREL(0,950,'【中盘股12.7%】 流通A股'+FINANCE2(37)/10000+'亿股'),LINETHICK2,ColorFF00FF; end;
IF(FINANCE2(37)/10000<5 and FINANCE2(37)/10000>=1) THEN BEGIN
DRAWTEXTREL(0,950,'【小盘股55.3%】 流通A股'+FINANCE2(37)/10000+'亿股'),LINETHICK2,ColorFF00FF; end;
IF(FINANCE2(37)/10000<1) THEN BEGIN
DRAWTEXTREL(0,950,'【超小盘22.3%】 流通A股'+FINANCE2(37)/10000+'亿股'),LINETHICK2,ColorFF00FF; end;

A1:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,3)+EMA((OPEN+HIGH+LOW+CLOSE)/4,6)+EMA((OPEN+HIGH+LOW+CLOSE)/4,9))/3;
A2:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,5)+EMA((OPEN+HIGH+LOW+CLOSE)/4,10)+EMA((OPEN+HIGH+LOW+CLOSE)/4,20))/3;
A3:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,7)+EMA((OPEN+HIGH+LOW+CLOSE)/4,14)+EMA((OPEN+HIGH+LOW+CLOSE)/4,28))/3;
A4:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,9)+EMA((OPEN+HIGH+LOW+CLOSE)/4,18)+EMA((OPEN+HIGH+LOW+CLOSE)/4,36))/3;
A5:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,11)+EMA((OPEN+HIGH+LOW+CLOSE)/4,22)+EMA((OPEN+HIGH+LOW+CLOSE)/4,44))/3;
A6:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,13)+EMA((OPEN+HIGH+LOW+CLOSE)/4,26)+EMA((OPEN+HIGH+LOW+CLOSE)/4,52))/3;
A7:=(EMA((OPEN+HIGH+LOW+CLOSE)/4,21)+EMA((OPEN+HIGH+LOW+CLOSE)/4,34)+EMA((OPEN+HIGH+LOW+CLOSE)/4,68))/3;
ma1:=FORCAST(A1,6);
ma2:=FORCAST(A2,6);
ma3:=FORCAST(A3,6);
ma4:=FORCAST(A4,6);
ma5:=FORCAST(A5,6);
ma6:=FORCAST(A6,6);
ma7:FORCAST(A7,6),colorf00ff0,linethick2;
partline(ma7,ma7<ref(ma7,1)),colorgreen,linethick2;
partline(ma2,ma2<ref(ma2,1),rgb(0,255,0),ma2>ref(ma2,1),rgb(255,0,255)),dotline;
partline(ma3,ma3<ref(ma3,1),rgb(0,255,0),ma3>ref(ma3,1),rgb(255,0,255)),dotline;
partline(ma4,ma4<ref(ma4,1),rgb(0,255,0),ma4>ref(ma4,1),rgb(255,0,255)),dotline;
partline(ma5,ma5<ref(ma5,1),rgb(0,255,0),ma5>ref(ma5,1),rgb(255,0,255)),dotline;
partline(ma6,ma6<ref(ma6,1),rgb(0,255,0),ma6>ref(ma6,1),rgb(255,0,255)),dotline;
partline(ma1,ma1<ref(ma1,1),rgb(0,255,0),ma1>ref(ma1,1),rgb(255,0,255)),dotline;
TOWERC:=FORCAST(EMA((3*CLOSE+2*OPEN+HIGH+LOW)/7,3),6);
DIRECTIONMAX:=MAX(REF(TOWERC,1),REF(TOWERC,1));
DIRECTIONMIN:=MIN(REF(TOWERC,1),REF(TOWERC,1));
STICKLINE(TOWERC>=REF(TOWERC,1),TOWERC,DIRECTIONMAX,8,0),color0000FF;
STICKLINE(TOWERC<REF(TOWERC,1),TOWERC,DIRECTIONMIN,8,0),color00FF00;

DD:=FINANCE2(35);
SS:=FINANCE2(37);
GG:=FINANCE2(3);
TH:=DYNAINFO(39);
DRAWTEXTREL(0,70,'总股本:'+NUMTOSTRn(DD,0)+'万股' +' 流通A股:'+NUMTOSTRn(SS,0)+'万股'+' 市盈率:'+NUMTOSTRn(TH,2)+' 倍'+' 每股收益:'+NUMTOSTRn(GG,3)+' 元'),ColorFFFF00;
gj:=if(c=INDEXC,(INDEXC+INDEXh+INDEXl+INDEXO)/4,AMOUNT/(v+0.01)/100);
明日阻力:=l+(gj-l)+(c-l);
明日支撑:=l+(c-gj);
今日阻力:=REF(明日阻力 , 1);
今日支撑:=REF(明日支撑 , 1);
STICKLINE(DISPSTATUS=2 and c>=今日阻力,今日阻力,今日阻力,20,0),Color0000FF;
STICKLINE(DISPSTATUS=2 and c<今日阻力,今日阻力,今日阻力,20,0),Color00FF00;
STICKLINE(DISPSTATUS=2 and c>=今日支撑,今日支撑,今日支撑,20,0),ColorFF00FF;
STICKLINE(DISPSTATUS=2 and c<今日支撑,今日支撑,今日支撑,20,0),ColorFF9900;
DRAWTEXTREL(750,890,'今日支撑:'+NUMTOSTRN(今日支撑 ,2 )),Colorred;
DRAWTEXTREL(750,950,'今日阻力:'+NUMTOSTRN(今日阻力 ,2 )),ColorGREEN;
DRAWTEXTREL(0,20,'所属板块:'+BKNAME),ColorRED;
DRAWTEXTREL(0,120,'每股收益:'+NUMTOSTRN(FINANCE2(3),3)+'元'+' 市盈率:'+NUMTOSTRN(DYNAINFO(39),2)+'元'+' 市净率:'+NUMTOSTRN((CLOSE / FINANCE2(4)),2)+'元'+' 净资产:'+NUMTOSTRN(FINANCE2(4),2)+'元'),Color00C0FF;
DRAWTEXTREL(0,270,'历史最高价:'+HHV(HIGH,0)),Colorred;
DRAWTEXTREL(160,270,'历史最低价:'+LLV(LOW,0)),ColorAFFF00;

销售毛利率:=FINANCE2(12);
主营收入同比:=FINANCE2(11);
净利润同比增长:=FINANCE2(10);
DRAWTEXTREL(0,170,'销售毛利率:'+NUMTOSTRN(销售毛利率,2)+'%'),LINETHICK1,COLORff00ff;
DRAWTEXTREL(180,170,'主营收入同比增长:'+NUMTOSTRN(主营收入同比,2)+'%'),LINETHICK1,ColorYELLOW;
DRAWTEXTREL(0,220,'净利润同比增长:'+NUMTOSTRN(净利润同比增长,2)+'%'),LINETHICK1,COLOR00FF00;

{量柱}

TJ:=VOL>=REF(V,1)*1.91 AND C>REF(C,1)*1.01;
 


 




 



gd16882

回复

举报

QQ|

GMT+8, 2024-11-17 19:37

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