大家一起研究 分时善守 分时主图 通达信指标 源码 贴图

2018-07-10 13:49:00来源:本站整理浏览:444

大家一起研究 分时善守 分时主图 通达信指标 源码 贴图

分时善守 分时主图 通达信指标 源码 贴图

点击下载分时善守 分时主图 通达信指标 源码 贴图


{分时主图}
VAR1:=1;
A1:=(EMA(C,5)+EMA(C,15))/2;
B1:=(EMA(C,30)+EMA(C,60))/2;
C1:=SUM(C*V,(BARSSINCE(V>0)+1))/SUM(V,(BARSSINCE(V>0)+1))+((BARSSINCE(V>0)+1)*0);
D1:=(C1+DYNAINFO(5))/2;
E1:=(C1+DYNAINFO(6))/2;
振幅:=DYNAINFO(13)*100;
线幅1:=ABS((D1-B1)/B1)*100;
上涨幅:=ABS((D1-REF(D1,1))/REF(D1,1))*100;
线幅2:=ABS((C1-B1)/B1)*100;
均涨幅:=ABS((C1-REF(C1,1))/REF(C1,1))*100;
线幅3:=ABS((E1-B1)/B1)*100;
下涨幅:=ABS((E1-REF(E1,1))/REF(E1,1))*100;
慢线幅:=ABS((B1-REF(B1,1))/REF(B1,1))*100;
上差:=ABS(C1-D1);
下差:=ABS(C1-E1);
偏下:=COUNT(下差*3<上差,15)=15;
偏上:=COUNT(上差*3<下差,15)=15;
下横:=(COUNT(线幅2<0.15,10)=10 AND COUNT(均涨幅<0.01,10)=10 AND COUNT(慢线幅<0.01,5)=5) OR (COUNT(线幅3<0.15,10)=10 AND COUNT(下涨幅<0.01,10)=10 AND COUNT(慢线幅<0.01,5)=5);{公式在线提供:WWW.GSZX.COM.CN}
上横:=(COUNT(线幅1<0.15,10)=10 AND COUNT(上涨幅<0.01,10)=10 AND COUNT(慢线幅<0.01,5)=5) OR (COUNT(线幅2<0.15,10)=10 AND COUNT(均涨幅<0.01,10)=10 AND COUNT(慢线幅<0.01,5)=5);
上突:=偏下 AND 下横;
下破:=偏上 AND 上横;
标准1:=COUNT(B1<E1,15)=15 AND COUNT(B1<REF(B1,1),15)=15;
标准2:=COUNT(B1<E1,20)=20 AND COUNT(B1<REF(B1,1),15)=20;
标准3:=COUNT(B1<E1,25)=25 AND COUNT(B1<REF(B1,1),20)=25;
低位:=IF(振幅>=5,标准3,IF(振幅<5 AND 振幅>=3,标准2,标准1));
均价:C1,COLORYELLOW,LINETHICK2;
上轨:=D1,COLORRED,POINTDOT;
下轨:=E1,COLORGREEN,POINTDOT;
回调认同:=EMA(EXPMA(C,20),13),COLOR004B00;
AAA:=MAX(DYNAINFO(3),DYNAINFO(5));
BBB:=MIN(DYNAINFO(3),DYNAINFO(6));
CCC:=AAA-BBB;
中轨:=(AAA+BBB)/2,COLOR999900;
阻力:BBB+CCC*7/8*VAR1,COLORBLUE,LINETHICK3;
支撑:BBB+CCC*1/8*VAR1,COLORBLUE,LINETHICK3;
中位:(阻力+支撑)/2*VAR1,COLORCYAN,LINETHICK3;
上顶:=BBB+CCC*2/3,COLOR999900;
下底:=BBB+CCC/3,COLOR999900;
价:C*VAR1,LINETHICK3,COLORFFFFFF;
STICKLINE(价>阻力,价,阻力,3,0),COLORYELLOW,LINETHICK2;
STICKLINE(价<支撑,价,支撑,3,0),COLORYELLOW,LINETHICK2;
DRAWNUMBER(CURRBARSCOUNT=1,阻力,阻力),COLORWHITE;
DRAWNUMBER(CURRBARSCOUNT=1,支撑,支撑),COLORWHITE;
DRAWNUMBER(CURRBARSCOUNT=1,中位,中位),COLORYELLOW;
H1:=MAX(DYNAINFO(3),DYNAINFO(5));
L1:=MIN(DYNAINFO(3),DYNAINFO(6));
P1:=H1-L1;
支撑1:=L1+P1*0.5/8;
现价1:=CLOSE;
抄:CROSS(支撑1,现价1)NODRAW;
STICKLINE(抄=1,现价1,中位,4,0)COLORWHITE;
STICKLINE(TIME=103000,阻力,支撑,4,0),COLORBROWN;
STICKLINE(TIME=140000,阻力,支撑,4,0),COLORBROWN;
STICKLINE(TIME=130000,阻力,支撑,4,0),COLORBROWN;
{分时善守}
VAR1A1:=1;
现价:=C*VAR1A1,NODRAW;
AAA:=MAX(DYNAINFO(3),DYNAINFO(5))*VAR1A1;
BBB:=MIN(DYNAINFO(3),DYNAINFO(6))*VAR1A1;
CCC:=AAA-BBB;
中轨:=(AAA+BBB)/2,COLOR999900;
高:BBB+CCC*7/8*VAR1A1,NODRAW;
低:BBB+CCC*1/8*VAR1A1,NODRAW;
NOTEXTDIF:(EMA(CLOSE,33)-EMA(CLOSE,93))*VAR1A1,COLORWHITE,LINETHICK3;
NOTEXTDEA:EMA(NOTEXTDIF,14)*VAR1A1,COLORWHITE,LINETHICK3;
DRAWBAND(NOTEXTDIF,RGB(250,0,0),NOTEXTDEA,RGB(21,138,255));
MACD:=(NOTEXTDIF-NOTEXTDEA)*2*VAR1A1,COLORSTICK;
STICKLINE((MACD>=0),0,MACD,3,1),COLOR0000FF;
STICKLINE(((MACD>=0) AND (MACD < REF(MACD,1))),0,MACD,3,0),COLORCYAN;
STICKLINE((MACD<0),0,MACD,3,0),COLORFFFF00;
STICKLINE(((MACD<0) AND (MACD > REF(MACD,1))),0,MACD,3,1),COLORRED;
振幅:100*(DYNAINFO(5)-DYNAINFO(6))/DYNAINFO(6)*VAR1A1,NODRAW;
涨速:=C/REF(C,4)*100-100,NODRAW;
换手:=VOL/CAPITAL*100,NODRAW;
NOTEXTAH:HHV(NOTEXTDIF,55/2)COLORGREEN,LINETHICK2;
NOTEXTAL:LLV(NOTEXTDIF,55/2)COLORRED,LINETHICK2;
VAR0:=(MA(((100 * (CLOSE - LLV(CLOSE,34))) / (HHV(HIGH,34) - LLV(LOW,34))),5) - 20);
VAR1:=(2 * ABS(VAR0));
VAR2:=(100 - ((100 - (3 * SMA((((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100),20,1))) + (2 * SMA(SMA((((CLOSE - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100),20,1),15,1))));
VAR3:=(100 - ((100 - (3 * SMA((((OPEN - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100),20,1))) + (2 * SMA(SMA((((OPEN - LLV(LOW,55)) / (HHV(HIGH,55) - LLV(LOW,55))) * 100),20,1),15,1))));
VAR4:=(((HIGH + LOW) + CLOSE) / 3);
VAR5:=((VAR4 - MA(VAR4,10)) / (0.015 * AVEDEV(VAR4,10)));
VAR6:=((VAR4 - MA(VAR4,30)) / (0.015 * AVEDEV(VAR4,30)));
VAR7:=IF(((((VAR5 >= 150) AND (VAR5 < 200)) AND (VAR6 >= 150)) AND (VAR6 < 200)),10,0);
VAR8:=IF(((((VAR5 <= (0 - 150)) AND (VAR5 > (0 - 200))) AND (VAR6 <= (0 - 150))) AND (VAR6 > (0 - 200))),(0 - 10),VAR7);
VAR9:=(((CLOSE - MA(CLOSE,13)) / MA(CLOSE,13)) * 100);
VARA:=(100 - ABS(VAR9));
VARB:=((3 * SMA((((INDEXC - LLV(INDEXL,55)) / (HHV(INDEXH,55) - LLV(INDEXL,55))) * 100),20,1)) - (2 * SMA(SMA((((INDEXC - LLV(INDEXL,55)) / (HHV(INDEXH,55) - LLV(INDEXL,55))) * 100),20,1),15,1)));
VARC:=((3 * SMA((((INDEXO - LLV(INDEXL,55)) / (HHV(INDEXH,55) - LLV(INDEXL,55))) * 100),20,1)) - (2 * SMA(SMA((((INDEXO - LLV(INDEXL,55)) / (HHV(INDEXH,55) - LLV(INDEXL,55))) * 100),20,1),15,1)));
VARD:=(REF(LOW,1) * 0.9);
VARE:=(LOW * 0.9);
VARF:=(((VARE * VOL) + (VARD * (CAPITAL - VOL))) / CAPITAL);
VAR10:=EMA(VARF,30);
VAR11:=(VAR10 - CLOSE);
VAR12:=REF(CLOSE,1);
VAR13:=((SMA(MAX((CLOSE - VAR12),0),7,1) / SMA(ABS((CLOSE - VAR12)),7,1)) * 100);
VAR14:=((SMA(MAX((CLOSE - VAR12),0),13,1) / SMA(ABS((CLOSE - VAR12)),13,1)) * 100);
VAR15:=BARSCOUNT(CLOSE);
VAR16:=((SMA(MAX((CLOSE - REF(CLOSE,1)),0),6,1) / SMA(ABS((CLOSE - REF(CLOSE,1))),6,1)) * 100);
VAR17:=(((((0 - 100) * (HHV(HIGH,60) - CLOSE)) / (HHV(HIGH,60) - LLV(LOW,60))) + 50) * 2);
VAR18:=(((CLOSE - LLV(LOW,15)) / (HHV(HIGH,15) - LLV(LOW,15))) * 100);
VAR19:=((SMA(VAR18,4,1) - 50) * 2);
VAR1A:=SMA(VAR19,3,1);
VAR1B:=(((INDEXC - LLV(INDEXL,14)) / (HHV(INDEXH,14) - LLV(INDEXL,14))) * 100);
VAR1C:=SMA(VAR1B,4,1);
VAR1D:=SMA(VAR1C,3,1);
VAR1E:=(((HHV(HIGH,30) - CLOSE) / CLOSE) * 100);
VAR1F:=IF((((((((((VAR16 <= 25) AND (VAR17 < (0 - 95))) AND (VAR1E > 20)) AND (VAR1A < (0 - 30))) AND (VAR1D < 30)) AND (VAR11 >= (0 - 0.25))) AND (VAR13 < 22)) AND (VAR14 < 28)) AND (VAR15 > 50)),80,0);
VAR20:=IF((VARA < 90),VARA,100);
顶线:=IF((VAR0> 0),VAR0,0);
多方:=(0 - IF((VAR0 < 0),VAR1,0));
反弹:=VAR1F;
空方:=(IF((((VAR6 >= 200) AND (VAR5 >= 150)) OR CROSS(65,顶线)),15,IF(((VAR6 <= (0 - 200)) AND (VAR5 <= (0 - 150))),(0 - 15),VAR8)) + 65);
压力线:=((CLOSE > MA(CLOSE,20)) AND (MA(CLOSE,20) >= REF(MA(CLOSE,20),1)));
T1:=((CLOSE < MA(CLOSE,20)) AND (MA(CLOSE,20) < REF(MA(CLOSE,20),1)));
T2:=(((顶线 > 60) AND (空方 > 65)) AND (VAR20 = 100));
T3:=(((顶线 > 48) AND (空方 > 65)) AND (VAR20 < 100));
T4:=((多方 < (0 - 38)) AND (空方 < 65));
T5:=((反弹 > 50) AND (VAR20 < 90));
T6:=(((VAR2 > REF(VAR3,1)) AND (VOL > REF(VOL,1))) AND (CLOSE > REF(CLOSE,1)));
T7:=((((((VAR2 <= REF(VAR3,1)) AND (CLOSE < REF(CLOSE,1))) AND (空方 = 65)) AND (反弹 = 0)) AND (多方 >= REF(多方,1))) AND (VARB < REF(VARC,1)));
T8:=(AMOUNT / (100 * VOL));
VARAAA:=MA(T8,13);
CYC13:=MA(T8,34);
CYC34:=DMA(CLOSE,(VOL / CAPITAL));
CYCMAX:=(((CLOSE - VARAAA) / VARAAA) * 100);
CYS13:=(((CLOSE - CYC13) / CYC13) * 100);
CYS34:=(((CLOSE - CYC34) / CYC34) * 100);
超跌:=IF((CYCMAX <= (0 - 20)),42,0);
CYSMAX:=REF(CLOSE,1);
VA1:=((SMA(MAX((CLOSE - CYSMAX),0),7,1) / SMA(ABS((CLOSE - CYSMAX)),7,1)) * 100)*VAR1A1;
VA2:=((SMA(MAX((CLOSE - CYSMAX),0),13,1) / SMA(ABS((CLOSE - CYSMAX)),13,1)) * 100)*VAR1A1;
VA3:=BARSCOUNT(CLOSE)*VAR1A1;
VA4:=(((VA1 < 20) AND (VA2 < 25)) AND (VA3 > 50)) AND NOTEXTDEA<0;
买进:(VA4 *NOTEXTAH),NODRAW,LINETHICK4,COLOR10FFFF;
{DRAWICON(买进>0 OR 买进<0,0,9);}
涨幅%:=DYNAINFO(14)*100,NODRAW;
SHOU:=IF(DATE<=1150520,1,0);
SHI:=BETWEEN((DCLOSE*SHOU)/(SUM(AMOUNT,BARSCOUNT((DCLOSE*SHOU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*SHOU)))),1.05,0.95);
TOU:=IF(SHI=0,MA((DCLOSE*SHOU),BARSCOUNT((DCLOSE*SHOU))),(SUM(AMOUNT,BARSCOUNT((DCLOSE*SHOU)))/SUM(VOL*100,BARSCOUNT((DCLOSE*SHOU)))));
动力线:=EXPMA((DCLOSE/TOU),13),COLORFFFF00,LINETHICK1;
趋势线:=EXPMA((DCLOSE/TOU),88),COLOR0080FF,LINETHICK2;
NOTEXT1:=1.003,COLORLIGREEN,LINETHICK2;
NOTEXT2:=1.03,COLORLIRED,LINETHICK2;
DRAWTEXT(CROSS(EXPMA((DCLOSE/TOU),20),1.04),0.01,'●涨停'),COLORYELLOW;
NOTEXT3:IF(动力线>1.003,动力线,DRAWNULL),COLORMAGENTA,NODRAW;
NOTEXT4:IF(动力线>1.03,动力线,DRAWNULL),COLORRED,NODRAW;
注意涨停:CROSS(动力线,1.03),NODRAW;
DRAWICON(CROSS(动力线,1.03),0,13);
【买点】:(高+低)/2,NODRAW;

 

股票公式栏目导航

本类热门

相关公式