您现在的位置:程序化交易>> 股票公式>> 同花顺>> 同花顺公式>>正文内容

鲁南用生命线攻击线主图指标公式[同花顺公式]

相关标签:

 

同花顺鲁南用主图指标源码

 

 

原理解析:


 

 

源码:

 

ED1:=(-2*REF(C,2)+REF(C,1)+2*C);
ED2:=(-0.4*REF(C,4)-0.4*REF(C,3)-1.1*REF(C,2)+0.9*REF(C,1)+2*C);
ED3:=(-0.8*REF(C,4)-0.8*REF(C,3)-0.2*REF(C,2)+0.8*REF(C,1)+2*C);
CC:=(-2*REF(C,3)+3*REF(C,2)+6*REF(C,1)+7*C)/14;
JF1:=SMA(SMA(ED1,3,1),3,1);
JF2:=SMA(SMA(ED2,4,1),3,1);
JF3:=SMA(SMA(ED3,4,1),4,1);
工作线:=EMA(JF1,14,2),ColorD96C00;
生命线:EMA(JF2,25,2),ColorFFFFFF;
牛熊线:EMA(JF3,88,2),ColorDB00DB;
PARTLINE(工作线,工作线>REF(工作线,1),RGB(250,30,30),工作线<=REF(工作线,1),RGB(50,50,250)),LINETHICK2;
二炮:=(-0.4*REF(C,4)-0.4*REF(C,3)-1.1*REF(C,2)+0.9*REF(C,1)+2*C);
攻击线:=SMA(二炮,4,2),colorred,LINETHICK2;
GJZX:=(H+L+2*C)/4;
blx1:=FORCAST(GJZX,18)-FORCAST(GJZX,4);
blx2:=FORCAST(GJZX,4)-blx1*2;

波浪线:=MA(SLOPE(blx2,3)*0.5+blx2,3);
BDGD:=CROSS(0.8,H=HHV(H,6));
GDSJ:=BARSLAST(BDGD)+1;
波峰:=REF(H,GDSJ),Color1EFF1E;
BDDD:=CROSS(0.8,L=LLV(L,6));
DDSJ:=BARSLAST(BDDD)+1;
波谷:=REF(L,DDSJ),Color7400E8;
STICKLINE(GDSJ<=8,波峰,波峰,8,0),ColorFFFF28,LINETHICK02;
STICKLINE(DDSJ<=8,波谷,波谷,8,0),ColorFF2FFF,LINETHICK02;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,10,0),ColorA8A800;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,8,0),ColorC6C600;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,6,0),ColorE3E300;
STICKLINE((OPEN >= CLOSE),CLOSE,OPEN,4,0),ColorFFFF17;//兰跌STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,10,0),color070084;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,8,0),color0000A3;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,6,0),color0000B7;
STICKLINE((CLOSE >= OPEN),CLOSE,OPEN,4,0),color0000CD;//红持
阻挡:=(SMA(HIGH,21,2) * 1.05);
STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < 阻挡)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,OPEN,10,0),Color5100A2;
STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < 阻挡)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,OPEN,8,0),Color6300C6;
STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < 阻挡)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,OPEN,6,0),Color7600EC;
STICKLINE(((((CLOSE / OPEN) > 1.04) AND (CLOSE < 阻挡)) AND ((CLOSE - REF(CLOSE,1)) > 0)),CLOSE,OPEN,4,0),Color870FFF;//紫跟
STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > 阻挡)) AND (CLOSE < 阻挡)),CLOSE,OPEN,10,0),ColorA8A800;
STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > 阻挡)) AND (CLOSE < 阻挡)),CLOSE,OPEN,8,0),ColorC6C600;
STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > 阻挡)) AND (CLOSE < 阻挡)),CLOSE,OPEN,6,0),ColorE3E300;
STICKLINE(((((CLOSE < REF(CLOSE,1)) AND (CLOSE < REF(CLOSE,1))) AND (HIGH > 阻挡)) AND (CLOSE < 阻挡)),CLOSE,OPEN,4,0),ColorFFFF17;//兰变
F:=100*(C-REF(C,1))/REF(C,1);
p1:=IF(C<REF(O,1) AND f<0,1,0);
p2:=IF(C<REF(O,2) AND f<0,1,0);
STICKLINE(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,OPEN,CLOSE,10,0),Color820082;
STICKLINE(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,OPEN,CLOSE,8,0),Color9F009F;
STICKLINE(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,OPEN,CLOSE,6,0),ColorBD00BD;
STICKLINE(P1=0 AND REF(P1,1)=1 AND P2=0 AND REF(P2,1)=1,OPEN,CLOSE,4,0),ColorDB00DB;//粉进
STICKLINE(P1=1 AND REF(P1,1)=0 AND P2=1 AND REF(P2,1)=0,OPEN,CLOSE,10,0),Color00A800;
STICKLINE(P1=1 AND REF(P1,1)=0 AND P2=1 AND REF(P2,1)=0,OPEN,CLOSE,8,0),Color00C400;
STICKLINE(P1=1 AND REF(P1,1)=0 AND P2=1 AND REF(P2,1)=0,OPEN,CLOSE,6,0),Color00E300;
STICKLINE(P1=1 AND REF(P1,1)=0 AND P2=1 AND REF(P2,1)=0,OPEN,CLOSE,4,0),Color0FFF0F;//绿顶
C3:=REF(C,1);
涨停:IF((C-C3)*100/C3>=(10-0.01*100/C3),1,0),Color1188FF;
STICKLINE(涨停,OPEN,CLOSE,10,0),Color0054A8;
STICKLINE(涨停,OPEN,CLOSE,8,0),Color0063C6;
STICKLINE(涨停,OPEN,CLOSE,6,0),Color0072E3;
STICKLINE(涨停,OPEN,CLOSE,4,0),Color1188FF;//暗黄
跌停:IF((C3-C)*100/C3>=(10-0.01*100/C3),1,0),ColorF9A800;
STICKLINE(跌停,OPEN,CLOSE,10,0),Color996700;
STICKLINE(跌停,OPEN,CLOSE,8,0),ColorB57A00;
STICKLINE(跌停,OPEN,CLOSE,6,0),ColorCC8A00;
STICKLINE(跌停,OPEN,CLOSE,4,0),ColorF9A800;//蓝
VAR1:=4*SMA((CLOSE-LLV(LOW,4))/(HHV(HIGH,4)-LLV(LOW,4))*100,4,1)-
3*SMA(SMA((CLOSE-LLV(LOW,4))/(HHV(HIGH,4)-LLV(LOW,4))*100,4,1),3.2,1);
VAR2:=7;
CC:=CROSS(VAR1,VAR2);
DRAWTEXT(CC,L*0.98,''),Color20FFFF;
卖出:=CROSS(72,SMA(MAX(CLOSE-REF(CLOSE,1),0),6,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),6,1)*100);
DRAWTEXT(卖出,H*1.05,'◆'),Color0FFF0F;
最新收益:MGSYX(33),Color6700CE;
指数:INDEXC,NODRAW,Color1A1AFF ;
AAA:=(3*C+H+L+O)/6;
VARa:=(8*AAA+7*REF(AAA,1)+6*REF(AAA,2)+5*REF(AAA,3)+4*REF(AAA,4)+3*REF(AAA,5)+2*REF(AAA,6)+REF(AAA,8))/36;
TJ1:=VOL=HHV(VOL,10) AND VOL>2*REF(VOL,1) AND CLOSE>VARa;
立桩量:=FILTER(TJ1,5);
TJ2:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(HIGH,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(HIGH,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(HIGH,3),1,0)));
突破:=TJ2=1;
LB:='————';
DRAWTEXT(立桩量,REF(HIGH,BARSLAST(立桩量)),LB),Color20FFFF,LINETHICK02;
DRAWTEXT(立桩量,REF(LOW,BARSLAST(立桩量)),LB),Color20FFFF,LINETHICK02;
TJ3:=IF(BARSLAST(立桩量)=1 AND CLOSE>REF(LOW,1),1,IF(BARSLAST(立桩量)=2 AND CLOSE>REF(LOW,2),1,IF(BARSLAST(立桩量)=3 AND CLOSE>REF(LOW,3),1,0)));

三天法则:=TJ3=1;
成立:=三天法则 AND 突破;
条件成立:=FILTER(成立,3);
DRAWTEXT(条件成立,L*0.93,'立桩显'),Color20FFFF;
立桩显:=IF(AMOUNT=1,VOL*240/FROMOPEN/REF(VOL,1)-1,VOL/REF(VOL,1)-1);
STICKLINE(立桩显>=1,O,C,10,0),Color00A8A8;
STICKLINE(立桩显>=1,O,C,8,0),Color00C6C6;
STICKLINE(立桩显>=1,O,C,6,0),Color00E3E3;
STICKLINE(立桩显>=1,O,C,4,0),Color09FFFF;//黄
T12:=立桩显>=1;
A1:=MIN(O,C);
B1:=ABS(O-C);
LC:=REF(CLOSE,1);
RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);
FF:=EMA(CLOSE,3);
MA15:=EMA(CLOSE,21);
紫底背:88,ColorFF1E8E;
STICKLINE(CROSS(FF,MA15),A1,A1+B1/2,10,0),ColorB5005A;
STICKLINE(CROSS(FF,MA15),A1,A1+B1/2,8,0),ColorDB006D;
STICKLINE(CROSS(FF,MA15),A1,A1+B1/2,4,0),ColorF9007C;
STICKLINE(CROSS(FF,MA15),A1,A1+B1/2,2,0),ColorFF1E8E;//紫底背
白顶背:88,RSI,ColorFFFFFF;
STICKLINE(CROSS(88,RSI),A1+B1,A1+B1/2,10,0),ColorA5A5A5;
STICKLINE(CROSS(88,RSI),A1+B1,A1+B1/2,8,0),ColorD2D2D2;
STICKLINE(CROSS(88,RSI),A1+B1,A1+B1/2,4,0),ColorF0F0F0;
STICKLINE(CROSS(88,RSI),A1+B1,A1+B1/2,2,0),ColorFFFFFF;//白顶背
MA13:=MA(CLOSE,13);
X1:=(C+L+H)/3;
BB13:=ATAN(EMA(X1,13)-REF(EMA(X1,13),1))*3.1416*10;
EMA8:=EMA(C,8);
A1:=MIN(O,C);
B1:=ABS(O-C);
T1:=FILTER(BB13>1 AND EMA(X1,13)>REF(EMA(X1,8),1),10);
STICKLINE(T1 AND T12,A1+B1/3,A1+B1*2/3,10,0),Color970097;
STICKLINE(T1 AND T12,A1+B1/3,A1+B1*2/3,8,0),ColorB500B5;
STICKLINE(T1 AND T12,A1+B1/3,A1+B1*2/3,4,0),ColorD200D2;
STICKLINE(T1 AND T12,A1+B1/3,A1+B1*2/3,2,0),ColorF000F0;//粉红45度升TIPTEXT(ISNULL(REFX(&CLOSE,1)),0,' WWW.CXH99.COM '),colorred;
TIPTEXT(ISNULL(REF(CLOSE,1)),0,'同花顺程序化交易');


 

公式导入教程: 【通达信公式源码导入方法教程】 【同花顺公式源码导入方法教程】 【大智慧新一代公式源码导入方法教程

 

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 1145508240  点击这里给我发消息进行 有偿 编写!不贵!点击查看价格!

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容