及时提示分时上涨和下跌指标 公式 源码[通达信公式]
指标公式源码及使用说明分析:
这段代码包含了多个指标的计算和绘图,以下是每个指标的简要说明:
1. STICKLINE:绘制柱状线
2. cxh1-cxh4:计算波和段,用于绘制底和顶的信号线
3. DRAWTEXT:绘制文本,用于标注底和顶的信号
4. DRAWICON:绘制图标,用于标注转向和买入信号
5. EMA:指数移动平均线
6. HHV/LLV:最高价和最低价的最高值和最低值
7. DRAWBAND:绘制带状区域,用于标注支撑和下跌区间
8. MA:简单移动平均线
9. COUNT:计数函数,用于统计连续满足条件的数量
10. CIRCLEDOT:圆点样式的绘图
11. IF/CROSS:条件判断函数,用于产生买入/卖出信号
12. SMA:累积移动平均线
对于使用者,可以根据自己的需求选择适合自己的指标,并结合实际情况进行分析和决策。建议在使用前先了解各个指标的具体含义和计算方法,以便更好地运用它们。
源码:
STICKLINE(C>0,0,100,15,0),COLOR7C221C;cxh1:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;cxh2:=SMA(cxh1,3,1);cxh3:=SMA(cxh2,3,1);cxh4:=SMA(cxh3,3,1);波:=cxh3;段:=cxh4;cxh5:=CROSS(cxh3,cxh4) AND cxh3<20;DRAWTEXT(FILTER(cxh5,10)=1,40,'底'),COLORRED;STICKLINE(FILTER(cxh5,10)=1,0,20,10,0),COLORRED;cxh9:=CROSS(cxh4,cxh3) AND cxh3>80;STICKLINE(FILTER(cxh9,5)=1,80,100,4,0),COLOR007700;STICKLINE(FILTER(cxh9,5)=1,80,100,3,0),COLOR009900;STICKLINE(FILTER(cxh9,5)=1,80,100,2,0),COLOR00BB00;STICKLINE(FILTER(cxh9,5)=1,80,100,1,0),COLOR00DD00;STICKLINE(FILTER(cxh9,5)=1,80,100,0.3,0),COLOR00FF00;DRAWTEXT(FILTER(cxh9,5)=1,70,'顶'),COLORGREEN;cxh8:=CROSS(cxh2,cxh3) AND cxh3>80 AND cxh3>cxh4;STICKLINE(cxh8,85,100,10,0),COLOR0099FF;100,COLORBBBBBB,LINETHICK3;0,LINETHICK3;AA:=LLV(LOW,36);BB:=HHV(HIGH,30);云:80,COLORWHITE;天:87.5,COLORBLUE,LINETHICK3;DD:=(EMA(((CLOSE-AA)/(BB-AA))*(4),4))*(25);飞:=DD,COLOR00FFFF,LINETHICK2;{IF(DD>REF(DD,1),DD,DRAWNULL),COLORRED,LINETHICK2;IF(DD<REF(DD,1) AND DD<87.5,DD,DRAWNULL),COLOR00FF00,LINETHICK2;}海:=(((DD-LLV(DD,21))/(HHV(DD,21)-LLV(DD,21)))*(4))*(25);买B:=IF(CROSS(海,90) AND (飞<40),30,0),COLORYELLOW,LINETHICK2;地:10,COLORGREEN,LINETHICK3;买A:IF((COUNT((飞>REF(飞,1)),1)=1) AND (REF(飞,1)<REF(REF(飞,1),1))AND (飞<地),40,0),COLORRED,LINETHICK2;cxh200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;cxh300:=SMA(SMA(cxh200,3,1),3,1)/28.57;cxh400:=EMA(cxh300,5);程序化久久公式网:=cxh300:=SMA(SMA(cxh200,3,1),3,1)/28.57;操盘:=3*cxh300-2*cxh400;A1:=CROSS(操盘,cxh300) AND cxh300<2.1 AND C>O;STICKLINE(A1,30,0,4,0),COLOR770077;STICKLINE(A1,30,0,3,0),COLOR990099;STICKLINE(A1,30,0,2,0),COLORBB00BB;STICKLINE(A1,30,0,1,0),COLORDD00DD;STICKLINE(A1,30,0,0.3,0),COLORFF00FF;DRAWTEXT(A1,36,'全仓'),COLORRED;持股:3*SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1)-2*SMA(SMA((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100,5,1),3,1),LINETHICK,COLORRED;支撑:LLV(持股,3),LINETHICK,COLOR00FFFF;下跌:MA(持股,12),COLOR6B8E23,LINETHICK2;转向:=CROSS(持股,下跌) AND 下跌<30;MA1:=MA(持股,5);cxh18:=CROSS(MA1,持股) AND MA1>80;{STICKLINE(支撑<下跌,支撑,下跌,2,0),COLOR6B8E23;}DRAWBAND(支撑,RGB(238,0,6),下跌,RGB(256,250,60));{STICKLINE(持股>0,支撑,持股,2,0),COLORRED;}DRAWBAND(持股,RGB(238,0,6),支撑,RGB(256,150,60));STICKLINE(支撑>下跌,下跌,支撑,2,0),COLOR38B0DE;DRAWICON(转向,支撑*0.98,23);DRAWICON(cxh18,持股*1.03,15);E:=CROSS(83,RSI);STICKLINE( E,E,55,1,0),COLOR00FFFF;DRAWTEXT(E,50,' 逃顶'),COLORFF9966;VA1:=HHV(HIGH,9)-LLV(LOW,9);VA2:=HHV(HIGH,9)-CLOSE;VA3:=CLOSE-LLV(LOW,9);VA4:=VA2/VA1*100-70;VA5:=(CLOSE-LLV(LOW,60))/(HHV(HIGH,60)-LLV(LOW,60))*100;VA6:=(CLOSE+HIGH+LOW)/3;VA7:=SMA(VA3/VA1*100,3,1);VA8:=LLV(LOW,34);VA9:=SMA(VA7,3,1)-SMA(VA4,9,1);cxhA:=IF(VA9>100,VA9-100,0);cxhB:=HHV(HIGH,34);cxhC:=EMA((VA6-VA8)/(cxhB-VA8)*100,13);cxhD:=EMA(0.667*REF(cxhC,1)+0.333*cxhC,2);cxhE:=SMA(MAX(CLOSE-REF(CLOSE,1),0)/CLOSE,8,1)/SMA(ABS(INDEXC-REF(INDEXC,1))/INDEXC,8,1)*100-25;cxhF:=MA(cxhE,3);cxh6:=((2)*(CLOSE)+HIGH+LOW)/(4);cxh7:=SMA(((cxh3)/(cxh1))*(100),3,1);cxh10:=IF((cxh9>100),cxh9-100,0);cxh11:=HHV(HIGH,34);B1:=EMA(((cxh6-cxh8)/(cxh11-cxh8))*(100),8);DRAWKLINE(EMA(B1,5),EMA(B1,5),B1+1,B1);领先:EMA(B1,5),COLORCYAN;生命线:EMA(cxhD,1),COLORYELLOW;V1:=MA(C,5)=HHV(MA(C,5),20);V2:=MA(C,5)>MA(C,10);V3:=MA(V,5)>MA(V,40)*1.01;V4:=COUNT(MA(C,1)>REF(C,1),2)=2;VV:=V1 AND V2 AND V3 AND V4;A2:=EMA(A1,20);A3:=CROSS(A1,A2);A4:=A1<EMA(CLOSE,120);STICKLINE((A3 AND A4)OR(V1 AND V2 AND V3 AND V4),B1*1.03,B1*1.120,1,0),COLORYELLOW;A5:=3*SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,21,1)-2*SMA(SMA((CLOSE-LLV(LOW,18))/(HHV(HIGH,18)-LLV(LOW,18))*100,20,1),8,1),CIRCLEDOT ,COLORFF9900 ;安全位:=20;低位转强:IF(CROSS(A5,安全位),50,0),STICK,COLORMAGENTA,LINETHICK2;开始拉升:IF(CROSS(cxhC,生命线) AND cxhC>cxhD AND cxhC<55 AND C>O,50,0),COLORLIRED,POINTDOT;A6:=LLV(C,500)=LLV(C,5) AND C/REF(C,1)>(1+9.8/100);极地上涨:IF(A6,领先,0),COLORGREEN,LINETHICK2;STICKLINE(开始拉升>0,15,开始拉升*1.01,1,0),COLORBLUE;STICKLINE((开始拉升>0 AND 开始拉升<400) OR (极地上涨>0 AND 极地上涨<400)OR (低位转强>0 AND 低位转强<400) OR (低位转强>0),30,开始拉升,1,0),COLORRED;STICKLINE(开始拉升>0,15,开始拉升*0.6,3,0),COLORBLUE;STICKLINE(开始拉升>0,15,开始拉升*0.4,3,0),COLOR00FF00;STICKLINE(开始拉升>0,15,开始拉升*0.2,3,0),COLOR0099CC;STICKLINE(低位转强>0,15,低位转强*1.01,1,0),COLORMAGENTA;STICKLINE((低位转强>0)OR(极地上涨>0),15,低位转强*0.4,3,0),COLORYELLOW;STICKLINE(低位转强>0,15,低位转强*0.2,3,0),COLORFFCC66;STICKLINE(极地上涨>0,15,极地上涨*1.01,1,0),COLORYELLOW;
公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程】
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信:cxhjy888 进行 有偿收费 编写!(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容