短线布局优化升级通达信公式 副图 源码附图
LC:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE - LC),0),5,1) / SMA(ABS((CLOSE - LC)),5,1)) * 100);
TTR:=SUM(MAX(MAX((HIGH - LOW),ABS((HIGH - REF(CLOSE,1)))),ABS((LOW - REF(CLOSE,1)))),10);
HD:=(HIGH - REF(HIGH,1));
LD:=(REF(LOW,1) - LOW);
DMP:=SUM(IF(((HD > 0) AND (HD > LD)),HD,0),10);
DMM:=SUM(IF(((LD > 0) AND (LD > HD)),LD,0),10);
PDI:=((DMP * 100) / TTR);
MDI:=((DMM * 100) / TTR);
ADX:=MA(((ABS((MDI - PDI)) / (MDI + PDI)) * 100),5);
AV:=(RSI5 + ADX);
DXR:=(((ADX + REF(ADX,5)) / 2) + RSI5);
{0,COLORFF00FF;}
WR10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10)));
NEWVOL:=(RSI5 - WR10);
底:=(AV + NEWVOL),VOLSTICK;
底5:=MA(底,5),COLORGRAY;
趋势线:=LLV(底,1),COLORFFFFFF;
STICKLINE((趋势线 >230 ),250,趋势线,0.8,1),LINETHICK6,COLORGREEN;
AA:=REF(CLOSE,1);
BBB:=SMA(MAX(CLOSE-AA,0),21,1)/SMA(ABS(CLOSE-AA),21,1)*1000;
HHH:=BBB-LLV(BBB,27);
CCC:=LLV(BBB,27)-BBB;
SS:=(MA(CCC,2)*3+CCC*13)/16;
G3:MA(HHH,3),COLORYELLOW;
G6:=MA(HHH,6),COLORMAGENTA;
G8:=MA(HHH,8),LINETHICK1,COLORGREEN;{原值 5}
QQ:=(MA(HHH,5)*3+HHH*13)/16,COLORYELLOW,LINETHICK1,DOTLINE;{原值 2}
MM:=MA(CCC,5);
WW:=IF(QQ<G8 ,SS,MM);
EE:=IF(SS<MM ,G8,QQ);
实量:=V,COLORYELLOW,NODRAW;
成交量额:=(AMOUNT+V)/2,VOLSTICK;
量:=V/REF(V,1)>1.8;
净VAR1:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
买盘:=IF(CLOSE>OPEN,净VAR1*(HIGH-LOW),IF(CLOSE<OPEN,净VAR1*((HIGH-OPEN)+(CLOSE-LOW)),VOL/2)),COLORRED,NODRAW;
卖盘:=-IF(CLOSE>OPEN,0-净VAR1*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0-净VAR1*(HIGH-LOW),0-VOL/2)),COLORGREEN,NODRAW;
净买:=(买盘-卖盘),VOLSTICK;
{股票指标网 }
VAR2:=(HIGH-LOW);
VAR3:=ABS((OPEN-CLOSE));
VAR4:=(HIGH-IF((CLOSE>OPEN),CLOSE,OPEN));
VAR5:=(IF((CLOSE>OPEN),OPEN,CLOSE)-LOW);
VAR6:=((VAR3/VAR2)*VOL);
VAR7:=((VAR4/VAR2)*VOL);
VAR8:=((VAR5/VAR2)*VOL);
VAR9:=IF(((VOL/CAPITAL) >0.001),1,EXP(ABS(LOG(((VOL/CAPITAL)*100)))));
VARA:=(((CLOSE-MA(CLOSE,5))/MA(CLOSE,5))*100);
进QQ:=VAR6>=VAR7 AND VAR6>= VAR8 AND CLOSE<OPEN;
进MMM:=CLOSE<EMA(CLOSE,5) AND 进QQ;
进JJJ:=CLOSE>=EMA(CLOSE,5) AND 进QQ;
进JJ:=VAR6>=VAR7 AND VAR6>=VAR8 AND CLOSE>OPEN;
进XX:=VAR8>VAR6 AND VAR8>VAR7;
进MM:=VAR7>VAR6 AND VAR7>VAR8;
量AA:=VOL/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
买量:=IF(CLOSE>OPEN,量AA*(HIGH-LOW),IF(CLOSE<OPEN,量AA*((HIGH-OPEN)+ (CLOSE-LOW)),VOL/2));
卖量:=IF(CLOSE>OPEN,0-量AA*((HIGH-CLOSE)+(OPEN-LOW)),IF(CLOSE<OPEN,0- 量AA*(HIGH-LOW),0-VOL/2));
进出量:买量+卖量,NODRAW;
净量:进出量+卖量,NODRAW;
昨日净量:=REF(净量,1);
净量比:进出量/净量,COLORMAGENTA,NODRAW;
额:=AMOUNT/100000000,VOLSTICK,COLORFF00FF;
额VAR1:=AMOUNT/((HIGH-LOW)*2-ABS(CLOSE-OPEN));
流入亿:=IF(CLOSE>OPEN,额VAR1*(HIGH-LOW),IF(CLOSE<OPEN,额VAR1*((HIGH-OPEN)+(CLOSE-LOW)),AMOUNT/2))/100000000,COLORRED,NODRAW;
流出亿:=IF(CLOSE>OPEN,0-额VAR1*((HIGH-CLOSE)+(OPEN- LOW)),IF(CLOSE<OPEN,0-额VAR1*(HIGH-LOW),0-AMOUNT/2))/100000000,COLORMAGENTA,NODRAW;
差亿:=流入亿+流出亿,COLORFFFF00,NODRAW;
净:=EMA(EMA(差亿,2),2),COLOR00FFFF,NODRAW;
WWWFXJGSWCOM:=EMA(净,2);
净1:=EMA(净,2);
流:=EMA(净1,7);
净流:3*EMA(净1+流,2),COLORRED,NODRAW;
五日量额比:成交量额/REF(MA(成交量额,5),1),COLORMAGENTA,NODRAW;
跌停:=C<=DTPRICE(REF(CLOSE,1),0.097);
STICKLINE((底>=0) AND 净买>=0,0,底,0.6,0),LINETHICK2,COLORYELLOW;
STICKLINE(进出量<0 AND 净买<0,0,底,3.2,0),COLOR006600;
STICKLINE(进出量<0 AND 净买<0,0,底,2.6,0),COLOR008800;
STICKLINE(进出量<0 AND 净买<0,0,底,1.9,0),COLOR00AA00;
STICKLINE(进出量<0 AND 净买<0,0,底,1.1,0),COLOR00CC00;
STICKLINE(进出量<0 AND 净买<0,0,底,0.3,0),COLOR00FF00;
STICKLINE(进MMM OR 跌停,0,底,0.0,0),COLORGREEN;
STICKLINE(进MMM OR 跌停,0,底,3.1,0),COLORFF0000;
STICKLINE(进MMM OR 跌停,0,底,1.9,0),COLORFF0000;
STICKLINE(进MMM OR 跌停,0,底,0.1,0),COLORFFFF00;
STICKLINE(净买>=0 AND 进JJ>=1 AND 底<0,0,底,2.3,0 ),COLOR880088;
STICKLINE(净买>=0 AND 进JJ>=1 AND 底<0,0,底,1.6,0 ),COLORAA00AA;
STICKLINE(净买>=0 AND 进JJ>=1 AND 底<0,0,底,0.8,0 ),COLORCC00CC;
STICKLINE(净买>=0 AND 进JJ>=1 AND 底<0,0,底,0.1,0 ),COLOREE00EE;
STICKLINE(净买>=0 AND 底>=0 AND 底>=REF(底,1),0,底,3.2,0),COLOR0000BB;
STICKLINE(净买>=0 AND 底>=0 AND 底>=REF(底,1),0,底,1.3,0),COLOR2233DD;
STICKLINE(净买>=0 AND 底>=0 AND 底>=REF(底,1),0,底,0.3,0),COLOR6677FF;
STICKLINE(净买>=0 AND 底>=0 AND 底>=REF(底,1) AND 净流>=REF(净流,1),0,底,0.1,0),COLORYELLOW;
STICKLINE((G6>G8 OR (G8<50 AND G3>G6 AND G6>REF(G6,1))) AND 净买>=0 AND G3>REF(G3,1) AND 底5>REF(底5,1) AND 量,0,底,2.3,0),COLORMAGENTA;
AMV1:G3,COLORRED,LINETHICK2;
AMV2:SMA(G3,2,1),COLORYELLOW,LINETHICK2;
AMV3:SMA(AMV2,2,1),COLORGREEN,LINETHICK2;
未来函数检测结果如下:
该公式包含未来函数:CAPITAL
解密、编写股票、期货策略请联系QQ或微信同号:88652583
相关股票指标公式
原理解析:
LC赋值:1日前的收盘价
RSI5赋值:((SMA(MAX((收盘价 - LC),0),5,1) / SMA((收盘价 - LC的绝对值),5,1)) * 100)
TTR赋值:SUM(MAX(MAX((最高价 - 最低价),(最高价 - 1日前的收盘价的绝对值)),ABS((最低价 - 1日前的收盘价))),10)
HD赋值:(最高价 - 1日前的最高价)
LD赋值:(1日前的最低价 - 最低价)
DMP赋值:SUM(IF(((HD > 0) AND (HD > LD)),HD,0),10)
DMM赋值:SUM(IF(((LD > 0) AND (LD > HD)),LD,0),10)
PDI赋值:((DMP * 100) / TTR)
MDI赋值:((DMM * 100) / TTR)
ADX赋值:MA((((MDI - PDI的绝对值) / (MDI + PDI)) * 100),5)
AV赋值:(RSI5 + ADX)
DXR赋值:(((ADX + 5日前的ADX) / 2) + RSI5)
{0,COLORFF00FF
}
WR10赋值:((100 * (10日内最高价最高值 - 收盘价)) / (10日内最高价最高值 - 10日内最低价最低值))
NEWVOL赋值:(RSI5 - WR10)
底赋值:(AV + NEWVOL),成交量STICK
底5:=底的5日简单移动平均,COLORGRAY
趋势线赋值:1日内底最低值,COLORFFFFFF
STICKLINE((趋势线 >230 ),250,趋势线,0.8,1),LINETHICK6,COLORGREEN
AA赋值:1日前的收盘价
BBB赋值:SMA(收盘价-AA和0较大值,21,1)/SMA(收盘价-AA的绝对值,21,1)*1000
HHH赋值:BBB-27日内BBB最低值
CCC赋值:27日内BBB最低值-BBB
SS赋值:(CCC的2日简单移动平均*3+CCC*13)/16
输出G3:HHH的3日简单移动平均,画黄色
G6赋值:HHH的6日简单移动平均,画洋红色
G8赋值:HHH的8日简单移动平均,LINETHICK1,COLORGREEN
{原值 5}
QQ赋值:(HHH的5日简单移动平均*3+HHH*13)/16,画黄色,LINETHICK1,DOTLINE
{原值 2}
MM赋值:CCC的5日简单移动平均
如果QQ如果SS
实量赋值:V,画黄色,NODRAW
成交量额赋值:(成交额+V)/2,成交量STICK
量赋值:V/1日前的V>1.8
净VAR1赋值:成交量/((最高价-最低价)*2-收盘价-开盘价的绝对值)
买盘赋值:IF(收盘价>开盘价,净VAR1*(最高价-最低价),IF(收盘价<开盘价,净VAR1*((最高价-开盘价)+(收盘价-最低价)),成交量/2)),画红色,NODRAW
卖盘赋值:-IF(收盘价>开盘价,0-净VAR1*((最高价-收盘价)+(开盘价-最低价)),IF(收盘价<开盘价,0-净VAR1*(最高价-最低价),0-成交量/2)),COLORGREEN,NODRAW
净买赋值:(买盘-卖盘),成交量STICK
{股票指标网 }
VAR2赋值:(最高价-最低价)
VAR3赋值:(开盘价-收盘价的绝对值)
VAR4赋值:(最高价-IF((收盘价>开盘价),收盘价,开盘价))
VAR5赋值:(IF((收盘价>开盘价),开盘价,收盘价)-最低价)
VAR6赋值:((VAR3/VAR2)*成交量)
VAR7赋值:((VAR4/VAR2)*成交量)
VAR8赋值:((VAR5/VAR2)*成交量)
VAR9赋值:IF(((成交量/当前流通股本) >0.001),1,EXP(LOG(((成交量/当前流通股本的绝对值*100)))))
VARA赋值:(((收盘价-收盘价的5日简单移动平均)/收盘价的5日简单移动平均)*100)
进QQ赋值:VAR6>=VAR7 AND VAR6>= VAR8 AND 收盘价<开盘价
进MMM赋值:收盘价<收盘价的5日指数移动平均 AND 进QQ
进JJJ赋值:收盘价>=收盘价的5日指数移动平均 AND 进QQ
进JJ赋值:VAR6>=VAR7 AND VAR6>=VAR8 AND 收盘价>开盘价
进XX赋值:VAR8>VAR6 AND VAR8>VAR7
进MM赋值:VAR7>VAR6 AND VAR7>VAR8
量AA赋值:成交量/((最高价-最低价)*2-收盘价-开盘价的绝对值)
买量赋值:IF(收盘价>开盘价,量AA*(最高价-最低价),IF(收盘价<开盘价,量AA*((最高价-开盘价)+ (收盘价-最低价)),成交量/2))
卖量赋值:IF(收盘价>开盘价,0-量AA*((最高价-收盘价)+(开盘价-最低价)),IF(收盘价<开盘价,0- 量AA*(最高价-最低价),0-成交量/2))
进出输出量:买量+卖量,NODRAW
净输出量:进出量+卖量,NODRAW
昨日净量赋值:1日前的净量
净量比:进出量/净量,画洋红色,NODRAW
额赋值:成交额/100000000,成交量STICK,COLORFF00FF
额VAR1:=成交额/((最高价-最低价)*2-收盘价-开盘价的绝对值)
流入亿赋值:IF(收盘价>开盘价,额VAR1*(最高价-最低价),IF(收盘价<开盘价,额VAR1*((最高价-开盘价)+(收盘价-最低价)),成交额/2))/100000000,画红色,NODRAW
流出亿赋值:IF(收盘价>开盘价,0-额VAR1*((最高价-收盘价)+(开盘价- 最低价)),IF(收盘价<开盘价,0-额VAR1*(最高价-最低价),0-成交额/2))/100000000,画洋红色,NODRAW
差亿赋值:流入亿+流出亿,COLORFFFF00,NODRAW
净赋值:差亿的2日指数移动平均,2),COLOR00FFFF,NODRAW
WWWFXJGSWCOM:=净的2日指数移动平均
净1:=净的2日指数移动平均
流赋值:净1的7日指数移动平均
净输出流:3*净1+流的2日指数移动平均,画红色,NODRAW
五日量额比:成交量额/REF(成交量额的5日简单移动平均,1),画洋红色,NODRAW
跌停赋值:C<=DTPRICE(1日前的收盘价,0.097)
STICKLINE((底>=0) AND 净买>=0,0,底,0.6,0), 线宽为2,画黄色
当满足条件进出量<0 AND 净买<0时,在0和底之间画柱状线
当满足条件进出量<0 AND 净买<0时,在0和底之间画柱状线
当满足条件进出量<0 AND 净买<0时,在0和底之间画柱状线
当满足条件进出量<0 AND 净买<0时,在0和底之间画柱状线
当满足条件进出量<0 AND 净买<0时,在0和底之间画柱状线
当满足条件进MMM OR 跌停时,在0和底之间画柱状线
当满足条件进MMM OR 跌停时,在0和底之间画柱状线
当满足条件进MMM OR 跌停时,在0和底之间画柱状线
当满足条件进MMM OR 跌停时,在0和底之间画柱状线
当满足条件净买>=0 AND 进JJ>=1 AND 底<0时,在0和底之间画柱状线
当满足条件净买>=0 AND 进JJ>=1 AND 底<0时,在0和底之间画柱状线
当满足条件净买>=0 AND 进JJ>=1 AND 底<0时,在0和底之间画柱状线
当满足条件净买>=0 AND 进JJ>=1 AND 底<0时,在0和底之间画柱状线
STICKLINE(净买>=0 AND 底>=0 AND 底>=1日前的底,0,底,3.2,0),COLOR0000BB
STICKLINE(净买>=0 AND 底>=0 AND 底>=1日前的底,0,底,1.3,0),COLOR2233DD
STICKLINE(净买>=0 AND 底>=0 AND 底>=1日前的底,0,底,0.3,0),COLOR6677FF
STICKLINE(净买>=0 AND 底>=0 AND 底>=1日前的底 AND 净流>=1日前的净流,0,底,0.1,0),画黄色
STICKLINE((G6>G8 OR (G8<50 AND G3>G6 AND G6>1日前的G6)) AND 净买>=0 AND G3>1日前的G3 AND 底5>1日前的底5 AND 量,0,底,2.3,0),画洋红色
输出AMV1:G3,画红色, 线宽为2
G3的2日[1日权重]移动平均
AMV2的2日[1日权重]移动平均