今开:=OPEN,COLOR00FFFF,linethick0;//今开:=DYNAINFO(4);
今高:=HIGH,COLOR00FF00,linethick0;//最高:=DYNAINFO(5);
今低:=LOW,COLORFF00FF,linethick0;//最低:=DYNAINFO(6);
今收:=CLOSE,COLOR0000FF,linethick0;//最新:=DYNAINFO(7);
前开:=REF(今开,1),COLOR0099FF,linethick0;
{分析家公式网 http://www.fxjgsw.com 整理}
前收:REF(今收,1),COLOR0066FF,linethick0;//前收:=DYNAINFO(3);
均价:=(AMOUNT/VOL*VOLUNIT)/10000,COLORAA00FF,linethick0;//均价:=DYNAINFO(11);{成本价}
今量:=VOL,COLOR0000FF,linethick0;{手}//总手:=DYNAINFO(8);{手}
今额:=AMOUNT/10000,COLOR00FFFF,linethick0;{万元}//总额(持仓):=DYNAINFO(11);{万元}
今率:=VOL/CAPITAL*100,COLOR00AAFF,linethick0;//换手率:=DYNAINFO(37);
今涨停:=IF(STKINBLOCK(STKLABEL,'ST板块') OR STKINBLOCK(STKLABEL,'*ST板块'),(1.05*前收),(1.1*前收));{如果为ST涨停为5%,否则为10%}
今跌停:=IF(STKINBLOCK(STKLABEL,'ST板块') OR STKINBLOCK(STKLABEL,'*ST板块'),(0.95*前收),(0.9*前收));{如果为ST跌停为5%,否则为10%}
明涨停:=IF(STKINBLOCK(STKLABEL,'ST板块') OR STKINBLOCK(STKLABEL,'*ST板块'),(1.05*今收),(1.1*今收));
明跌停:=IF(STKINBLOCK(STKLABEL,'ST板块') OR STKINBLOCK(STKLABEL,'*ST板块'),(0.95*今收),(0.9*今收));
//市场行情
收阳:
IF(今收>今开,今高,0),COLOR0000FF,linethick0;{上影线}
IF(今收>今开,今收,0),COLORFF00FF,linethick0;
IF(今收>今开,今开,0),COLOR9999FF,linethick0;
IF(今收>今开,今低,0),COLORFF99FF,linethick0;{下影线}
收阴:
IF(今收<=今开,今高,0),COLOR00FFFF,linethick0;
IF(今收<=今开,今开,0),COLOR99FFFF,linethick0;
IF(今收<今开,今收,0),COLOR99FF99,linethick0;
IF(今收<=今开,今低,0),COLOR00FF00,linethick0;
Var1:=(1*今开+3*今高+3*今低+1*今收)/8;
Var2:=IF(DATE>=900101,1,0);
var3:=(1*今收+1*今开)/2;
var4:=IF(今收>今开,(1*今开+3*今低)/4,(1*今收+3*今低)/4);
var5:=IF(今收>今开,(1*今收+3*今高)/4,(1*今开+3*今高)/4);
涨跌值:(今收-前收),COLOR00ACFF,linethick0;
上涨值:=IF(今收>前收,(今收-前收),0),COLOR00ACFF,linethick0;
下跌值:=IF(今收<=前收,(前收-今收),0),COLOR00FFAC,linethick0;
涨跌幅:=(今收-前收)/前收*100,COLOR00DEFF,linethick0;
振幅值:(今高-今低),COLORAC00FF,linethick0;
振幅:=(今高-今低)/今开*100,COLORDE00FF,linethick0;
今行情:=DYNAINFO(4)=今开 AND DYNAINFO(5)=今高 AND DYNAINFO(6)=今低 AND DYNAINFO(7)=今收;
//主要操盘指标-MA/EMA/SMA/WMA均线指标
MA5:=MA(今收,5),colorred,linethick1;{五日均线}
MA8:=MA(今收,8),COLOR6666FF,linethick2;{八日均线}
MA13:=MA(今收,13),COLOR9999FF,linethick1;{十三日均线}
MA21:=MA(今收,21),colormagenta,linethick1;{一个月均线}
MA43:=MA(今收,43),COLORFF66FF,linethick1;{二个月均线}
MA65:=MA(今收,65),coloryellow,linethick1;{三个月均线}
MA108:=MA(今收,108),COLOR66FFFF,linethick1;{五个月均线}
MA165:=MA(今收,165),colorgreen,linethick2;{八个月均线}
MA248:=MA(今收,248),COLOR66FF66,linethick1;{一年均线}
EMA5:=EMA(今收,5);EMA8:=EMA(今收,8);EMA13:=EMA(今收,13);EMA21:=EMA(今收,21);EMA43:=EMA(今收,43);EMA65:=EMA(今收,65);EMA105:=EMA(今收,108);EMA165:=EMA(今收,165);EMA248:=EMA(今收,248);
多头线:=MA5,COLOR0000FF,linethick0;
多空博弈线:=MA8,COLOR0099FF,linethick0;//(3*EMA5+1*EMA13)/4;
空头线:=MA13,COLOR00FFFF,linethick0;
多空生命线:=MA21,COLORFF0099,linethick0;
之字趋势线:=ZIG(MA5,10),COLOR3939FF,linethick0;
回归趋势线:=FORCAST(FORCAST(REF(var1,1),5),3),COLOR3A3AFF,linethick0;
加权趋势线:=WMA(WMA(REF(Var1,1),5),3),COLOR3C3CFF,linethick0;
个股强弱线:=DMA(均价,SUM(VOL,5)/5/CAPITAL),COLOR3D3DFF,linethick0;
长线压力位:=HHV(MA(REF(今高,1),3),65)*1.0382;
中线压力位:=HHV(MA(REF(今高,1),3),21)*1.0382;
短线压力位:=HHV(MA(REF(今高,1),3),21)*1.025;
短线支撑位:=LLV(MA(REF(今低,1),3),21)*0.975;
中线支撑位:=LLV(MA(REF(今低,1),3),21)*0.9618;
长线支撑位:=LLV(MA(REF(今低,1),3),65)*0.9618;
箱顶:=长线压力位,COLOR00AF00,linethick0;
箱底:=长线支撑位,COLORAF00AA,linethick0;
上轨:=IF(今高>=短线压力位,中线压力位,短线压力位),COLORACFFCD,linethick0;
中轨:=(短线压力位+短线支撑位)/2,COLOR00AACC,linethick0;
下轨:=IF(今低<=短线支撑位,中线支撑位,短线支撑位),COLORCDACFF,linethick0;
//主要操盘指标-MACD趋势指标
VarA0:=(EMA5-EMA13)*100*Var2/Var2;
VarB0:=(EMA8-EMA21)*100*Var2/Var2;
DIFF:=EMA((3*VarA0+1*VarB0)/4,3);
DEA:=EMA(DIFF,5);
MACD:=(DIFF-DEA)*2;
变盘点:
IF(COUNT(CROSS(DIFF,REF(DIFF,1)) OR CROSS(DEA,REF(DEA,1)) OR CROSS(MACD,REF(MACD,1)),3) AND 今收>今开,1,0),COLORFF00FF,linethick0;
IF(COUNT(CROSS(REF(DIFF,1),DIFF) OR CROSS(REF(DEA,1),DEA) OR CROSS(REF(MACD,1),MACD),3) AND 今收<=今开,1,0),COLOR00FFFF,linethick0;
交叉点:
IF(COUNT(CROSS(DIFF,DEA),3) AND 今收>今开,1,0),COLOR0000FF,linethick0;
IF(COUNT(CROSS(DEA,DIFF),3) AND 今收<=今开,1,0),COLOR00FF00,linethick0;
//其它辅助指标--ROC变动速率指标
VarA1:=(今收-REF(今收,5))/REF(今收,5)*100*Var2/Var2;
VarB1:=(今收-REF(今收,13))/REF(今收,13)*100*Var2/Var2;
ROC1:=MA((3*VarA1+1*VarB1)/4,3);
ROC2:=MA(ROC1,5);
//其它辅助指标--BIAS乖离率指标
VarA2:=(今收-MA5)/MA5*100*Var2/Var2;
VarB2:=(今收-MA13)/MA13*100*Var2/Var2;
BIAS1:=MA((3*VarA2+1*VarB2)/4,3);
BIAS2:=MA(BIAS1,5);
//其它辅助指标-KD/KDJ随机指标
VarA3:=(今收-LLV(今低,5))/(HHV(今高,5)-LLV(今低,5))*100*Var2/Var2;//(var3-LLV(var4,5))/(HHV(var5,5)-LLV(var4,5))*100*Var2/Var2;
VarB3:=(今收-LLV(今低,13))/(HHV(今高,13)-LLV(今低,13))*100*Var2/Var2;//(var3-LLV(var4,13))/(HHV(var5,13)-LLV(var4,13))*100*Var2/Var2;
RSV:=(3*VarA3+1*VarB3)/4;
K:=SMA(RSV,5,1);
D:=SMA(K,3,1);
KDJ:=(3*K-2*D);
多空对比:=(K-D);//多空力度对比
空翻多:=IF(多空对比<=0 AND 多空对比>REF(多空对比,1),1,0);
多头市场:=IF(多空对比>0 AND 多空对比>REF(多空对比,1),1,0);
多翻空:=IF(多空对比>0 AND 多空对比<=REF(多空对比,1),1,0);
空头市场:=IF(多空对比<=0 AND 多空对比<=REF(多空对比,1),1,0);
炒底:=IF(COUNT(CROSS(KDJ,REF(KDJ,1)) AND KDJ<=25,3) AND 今收>今开,1,0),COLORFF00FF,linethick0;
逃顶:=IF(COUNT(CROSS(REF(KDJ,1),KDJ) AND KDJ>=75,3) AND 今收<=今开,1,0),COLOR00FF00,linethick0;
//其它辅助指标-RSI相对强弱指标
VarA4:=SMA(MAX(今收-前收,0),5,1)/SMA(ABS(今收-前收),5,1)*100*Var2/Var2;
VarB4:=SMA(MAX(今收-前收,0),13,1)/SMA(ABS(今收-前收),13,1)*100*Var2/Var2;
RSI1:=MA((3*VarA4+1*VarB4)/4,3);
RSI2:=MA(RSI1,5);
最大强值:=MA(MA(MAX(VarA4-VarB4,0),5),3);
最小弱值:=MA(MA(MIN(VarA4-VarB4,0),5),3);
试买:=IF(最大强值=REF(最大强值,1) AND REF(最大强值,1)=0,1,0);//补仓区
追买:=IF(最大强值>REF(最大强值,1) AND REF(最大强值,1)=0,1,0);//满仓点
止盈:=IF(最小弱值=REF(最小弱值,1) AND REF(最小弱值,1)=0,1,0);//减仓区
止损:=IF(最小弱值<REF(最小弱值,1) AND REF(最小弱值,1)=0,1,0);//空仓点
买入:=IF(试买 OR 追买,1,0),COLOR0000FF,linethick0;
卖出:=IF(止盈 OR 止损,1,0),COLOR00FFFF,linethick0;
共底:=IF(KDJ<=20 AND MACD<=-5 AND RSI1<=25 AND DIFF<=-7.5 AND ROC1<=-2.5 AND BIAS1<=-2.5,1,0);
共顶:=IF(KDJ>=80 AND MACD>=5 AND RSI1>=75 AND DIFF>=7.5 AND ROC1>=2.5 AND BIAS1>=2.5,1,0);
//背景色
DRAWGBK(今收>今开,COLORRGB(105,35,95),COLORRGB(225,155,205),1);//当日上涨:ISUP;
DRAWGBK(今收=今开,COLORRGB(35,55,95),COLORRGB(55,105,155),1);//当日平盘:ISEQUAL;
DRAWGBK(今收<今开,COLORRGB(15,35,55),COLORRGB(35,55,105),1);//当日下跌:ISDOWN;
FILLRGN(今收>0,多头线,HHV(今高,0)),COLORFFCDCD;
FILLRGN(今收>0,多头线,0),COLOR391133;
FILLRGN(多头线<=个股强弱线 AND DYNAINFO(7)>DYNAINFO(4),个股强弱线,多头线),COLORDFCDEF;
FILLRGN(多头线<=个股强 |