飞狐MACD与KDJ综合指标公式,飞狐黄金主图指标公式
admin888
|飞狐MACD与KDJ综合指标公式,飞狐黄金主图指标公式
飞狐MACD与KDJ综合指标公式
difZ:=ema(C,12)-Ema(C,26);
DEAZ:=EMA(DIFZ,9);
macdZ:=8*(DIFZ-DEAZ);
RSV:=((CLOSE-LLV(LOW,21))/(HHV(HIGH,21)-LLV(LOW,21)))*247.2-123.6;
SQX:=(C-MA(CLOSE,13))*10;
DIF:=EMA(MA(SQX,7),1);
DEA:=EMA(DIF,7);
MacD:=(DIF-DEA)*2;
stICKLINE(MACD>0 AND MACD>REF(MACD,1),MACD,0,0.1,0),COLORRED;
STICKLINE(MACD<0 AND MACD>REF(MACD,1),MACD,0,0.1,0),COLORBROWN;
K:SMA(SMA( RSV,3,1),3,1),COLORWHITE;
D:MA(EMA(K,3),3),COLORYELLOW;
J:3*K-2*D,COLORMAGENTA;
A11:=BArslAST(REF(crOSS(DIF,DEA),1));
B1:=REF(C,A11+1)>C AND REF(DIF,A11+1)
A12:=BARSLAST(REF(CROSS("kdj.K","kdJ.D"),1));
B2:=REF(C,A12+1)>C AND REF("KDJ.K",A12+1)<"KDJ.K" AND CROSS("KDJ.K","KDJ.D");
A13:=BARSLAST(REF(CROSS("rsi.RSI1","RSI.RSI2"),1));
B3:=REF(C,A13+1)>C AND REF("RSI.RSI1",A13+1)<"RSI.RSI1"AND CROSS("RSI.RSI1","RSI.RSI2");
C1:=BARSLAST(REF(CROSS(DEA,DIF),1));
D1:=REF(C,C1+1)
C2:=BARSLAST(REF(CROSS("KDJ.D","KDJ.K"),1));
D2:=REF(C,C2+1)
C3:=BARSLAST(REF(CROSS("RSI.RSI2","RSI.RSI1"),1));
D3:=REF(C,C3+1)
MACD底背:IF(B1>0,50,0),LINETHICK2,COLORRED;
DRAWTEXT(B1>0,50,'M底背'),COLORRED;
KDJ底背:IF(B2>0,65,0),LINETHICK2,COLORFF00FF;
DRAWTEXT(B2>0,65,'K底背'),COLORFF00FF;
RSI底背:IF(B3>0,80,0),LINETHICK2,COLORYELLOW;
DRAWTEXT(B3>0,80,'R底背'),COLORYELLOW;
MACD顶背:IF(D1>0,-50,0),LINETHICK2,COLOR00FF00;
DRAWTEXT(D1>0,-50,'M顶背'),COLOR00FF00;
KDJ顶背:IF(D2>0,-65,0),LINETHICK2,COLORFFCC66;
DRAWTEXT(D2>0,-65,'K顶背'),COLORFFCC66;
RSI顶背:IF(D3>0,-80,0),LINETHICK2,COLORWHITE;
DRAWTEXT(D3>0,-80,'R顶背'),COLORWHITE;
DRAWICON((CROSS(K,D)
AND K<0 ),REF(K,1),11);
DRAWICON((CROSS(D,K) AND K>0
),D*1.05,12);
DRAWICON(J<(REF(J,1))AND K>(REF(K,1)) AND D>(REF(D,1)
AND J>0),REF(J,1),2);
REF(MACD,1)>REF(MACD,2) ANDMACD>0,MACD,2);
DRAWICON(MACD>REF(MACD,1) ANDREF(MACD,1)
多方趋势:((7)*(SMA(((CLOSE-LLV (LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(30),4,1))-(3)*(SMA(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(30),4,1),3,1))-SMA(SMA(SMA(((CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27)))*(30),4,1),3,1),2,1)),COLOR0000FF;
空方趋势:(EMA(MA(多方趋势,5),7)),COLORF0F000;
STICKLINE((多方趋势>78) AND (多方趋势>=空方趋势),78,多方趋势,5,1),COLOR00FF00;
STICKLINE((空方趋势<=多方趋势),空方趋势,多方趋势,3,0),COLOR0000FF;
STICKLINE((空方趋势>多方趋势),多方趋势,空方趋势,3,0),COLORF0F000;
STICKLINE((空方趋势<14) AND (空方趋势>多方趋势),多方趋势,20,3,0),COLOR00FFFF;
TJ:=FILTER((空方趋势<14) AND (空方趋势>多方趋势),6);
DRAWTEXT(TJ,40,'低吸'),COLORFFFFFF;
斋主:(空方趋势<12) AND (空方趋势<=多方趋势),COLOR00FFFF;
选金股:CROSS(多方趋势,空方趋势) AND (空方趋势<22);
{E:=CROSS(83,RSI);
STICKLINE( E,75,85,4,0),COLOR00FF00;
DRAWTEXT(E,72,'逃顶');}
LC:=REF(CLOSE,1);
RSI5:=((SMA(MAX((CLOSE - LC),0),5,1) / SMA(Abs((CLOSE - LC)),5,1)) * 100);
TR1:=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) / TR1);
mdi:=((DMM * 100) / TR1);
ADX:=MA(((ABS((MDI - PDI)) / (MDI + PDI)) * 100),5);
AV:=(RSI5 + ADX);
DXR:=(((ADX + REF(ADX,5)) / 2) + RSI5);
wr10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10)));
NEWvol:=(RSI5 - WR10);
最佳买入:=(AV + NEWVOL);
最佳买入选股:IF(CROSS(最佳买入,0),61,0),STICK,COLORRED,LINETHICK4;
DRAWTEXT(CROSS(最佳买入,0),62,'最佳买入'),COLOR00FFFF;
AA:=(MA(C,1)+MA(C,3)+MA(C,5)+MA(C,7)+MA(C,9))/5;
BB:=(MA(C,2)+MA(C,4)+MA(C,6)+MA(C,8)+MA(C,10))/5;
CC:=EMA(AA,2);
DD:=EMA(BB,5);
TJ0:=CROSS(CC,DD);
上:=EMA(C,3);
中:=EMA(C,5);
下:=EMA(中,5);
TJ1:=CROSS(上,中);
TJ2:=上>REF(上,1);
X1:=(C+L+H)/3;
BB5:=ATAN(EMA(X1,5)-REF(EMA(X1,5),1))*3.1416*10;
EMA3:=EMA(C,3);
TJ3:=BB5>1 AND EMA(X1,5)>REF(EMA(X1,3),1);
STICKLINE(TJ1 AND TJ2 AND TJ0 AND TJ3,0,20,4,0)COLOR009999;
STICKLINE(TJ1 AND TJ2 AND TJ0 AND TJ3,0,35,3,0)COLOR00BBBB;
STICKLINE(TJ1 AND TJ2 AND TJ0 AND TJ3,0,45,1.5,0)COLOR00DDDD;
STICKLINE(TJ1 AND TJ2 AND TJ0 AND TJ3,0,50,0.6,0)COLOR00FFFF;
DRAWTEXT(TJ1 AND TJ2 AND TJ0 AND TJ3,48,'斋主全仓'),COLORRED;
{斋主全仓:IF(CROSS('斋主全仓',0),0.9,0),STICK,COLORRED;}
DRAWTEXT(CROSS(多方趋势,空方趋势) AND (空方趋势<22),30,'金股'),COLOR00FFFF;
中间线:50,COLORFFFFFF,POINTDOT;
VAR11:=(CLOSE+HIGH+LOW)/3;
VAR2A1:=EMA(VAR11,10);
VAR3A:=REF(VAR2A1,1);
绿珠逃:IF(VAR2A1,0.1,0),COLORGREEN,LINETHICK9;
红珠买: IF(VAR2A1>VAR3A,0.1,0),COLORRED,LINETHICK9;
黄珠卖: IF(VAR2A1
飞狐黄金主图指标公式
input:N1(5,1,100),N2(13,1,100),N3(21,1,100),N4(30,1,100);
A00:=(DATE < 20341231);
A01:=DYNAINFO(7);
A02:=ma(((AMOUNT /vol) / 100),(VOL / CAPITAL));
A03:=BARSCOUNT(CLOSE);
A04:=(SMA((CLOSE / HHV(HIGH,120)),3,1) * 100);
A05:=IF((A03 > 20),A04,0);
A06:=IF(((LOW > A01) AND A00),0,IF(((HIGH < A01) AND A00),1,(((A01 - LOW) + 0.01) / ((HIGH - LOW) + 0.01))));
A07:=(dma(A06,(VOL / CAPITAL)) * 100);
A08:=IF((A02 > A01),(100 - A07),A07);
A09:=IF(((((A07 > 0) AND (A07 > REF(A07,1))) AND A00) AND (A05 <= 88)),A07,0);
FILLRGN((A09 > 0),LOW,(LOW * 1.1)),colorFF99FF;
黄金线选股:IF(((crOSS(A09,0.01) AND (OPEN <> LOW)) AND (CLOSE <> LOW)),888,0),LINETHICK0,colorFF00FF;
机构黄金线:LOW,LINETHICK2,colorFFFF;
A0D:DRAWTEXT(CROSS(A09,0.01),LOW,'-----注意'),colorFF00;
DRAWICON(CROSS(A09,0.01),LOW,1);
EXPLAINICON(CROSS(A09,0.01),4);
EXPLAIN(CROSS(A09,0.009),'请密切注意了!\n彩虹在眼前!!\n有机构在开始吸筹了!!\n如出现信号后首次带量上攻是最佳的买点!!'),colorFF;
EXPLAIN((CLOSE > 0),'用法说明如下'),colorFF00;
EXPLAIN((CLOSE > 0),'1:如出现股价在下跌!\n2:机构黄金线在不断上升!\n3:出现红色区域!\n4:说明有主流资金在打他的主意。\n5:有主流资低位不断买入!\n6:注意了!\n 等股价出现止跌信号,买入!\n7:(若本股基本面恶化或属老庄股出货.请放弃操作,第一!)'),colorFFFFFF;
M1:MA(CLOSE,N1);
M2:MA(CLOSE,N2);
M3:MA(CLOSE,N3);
M4:MA(CLOSE,N4);
MA1:=MA(CLOSE,3);
MA2:=MA(CLOSE,5);
MA3:=MA(CLOSE,10);
MS3:=REF(CLOSE,2);
MC3:=(CLOSE - REF(CLOSE,2));
JC3:=((MA(CLOSE,3) - REF(MA(CLOSE,3),1)) * 3);
YS3:=(CLOSE - ((MA(CLOSE,3) - REF(MA(CLOSE,3),1)) * 3));
MS1:=REF(CLOSE,9);
MC1:=(CLOSE - REF(CLOSE,9));
JC1:=((MA(CLOSE,10) - REF(MA(CLOSE,10),1)) * 10);
YS1:=(CLOSE - ((MA(CLOSE,10) - REF(MA(CLOSE,10),1)) * 10));
MS:REF(CLOSE,4),LINETHICK0,colorFF00;
MC:(CLOSE - REF(CLOSE,4)),LINETHICK0,colorFF00;
JC:((MA(CLOSE,5) - REF(MA(CLOSE,5),1)) * 5),LINETHICK0,colorFFFF00;
YS:(CLOSE - ((MA(CLOSE,5) - REF(MA(CLOSE,5),1)) * 5)),LINETHICK0,colorFFFFFF;
DRAWNUMBER((BARSCOUNT(CLOSE) = SYSPARAM(1)),CLOSE,REF(CLOSE,4),2),ALIGN4,colorFFFF;
DRAWNUMBER((BARSCOUNT(CLOSE) = SYSPARAM(1)),CLOSE,(CLOSE - REF(CLOSE,4)),2),ALIGN3,colorFFFF;
DRAWNUMBER((BARSCOUNT(CLOSE) = SYSPARAM(1)),CLOSE,(CLOSE - ((MA(CLOSE,5) - REF(MA(CLOSE,5),1)) * 5)),2),ALIGN5,colorFFFFFF;
DRAWTEXT((BARSCOUNT(CLOSE) = SYSPARAM(1)),CLOSE,' ←明收'),ALIGN4,colorFFFF;
DRAWTEXT((BARSCOUNT(CLOSE) = SYSPARAM(1)),CLOSE,' ←明差'),ALIGN3,colorFFFF;
DRAWTEXT((BARSCOUNT(CLOSE) = SYSPARAM(1)),CLOSE,' ←应收'),ALIGN5,colorFFFFFF;
ZD:=(CLOSE - REF(CLOSE,1));
ZF:=(((CLOSE / REF(CLOSE,1)) * 100) - 100);
EXPLAINEX(1,(('明日均线:(最新)' + NUMTOstR(CLOSE,2)) + ' 幅:'),ZF,2,0);
EXPLAINEX(1,(((('三:今 ' + NUMTOSTR(YS3,2)) + ' 明 ') + NUMTOSTR(MS3,2)) + ' 超 '),((MC3 / MS3) * 100),2,0),colorFFFFFF;
EXPLAINEX(1,(((('五:今 ' + NUMTOSTR(YS,2)) + ' 明 ') + NUMTOSTR(MS,2)) + ' 超 '),((MC / MS) * 100),2,0),colorFFFF;
EXPLAINEX(1,(((('十:今 ' + NUMTOSTR(YS1,2)) + ' 明 ') + NUMTOSTR(MS1,2)) + ' 超 '),((MC1 / MS1) * 100),2,1),colorFF00;
三日:=(MA1 - REF(MA1,1));
五日:=(MA2 - REF(MA2,1));
十日:=(MA1 - REF(MA3,1));
EXPLAINEX((三日 > 0),(((('三:前 ' + NUMTOSTR(REF(MA1,2),2)) + ' 昨 ') + NUMTOSTR(REF(MA1,1),2)) + ' 今 ↑'),MA1,2,0),colorFF;
EXPLAINEX((三日 < 0),(((('三:前 ' + NUMTOSTR(REF(MA1,2),2)) + ' 昨 ') + NUMTOSTR(REF(MA1,1),2)) + ' 今 ↓'),MA1,2,0),color3300CC;
EXPLAINEX((五日 > 0),(((('五:前 ' + NUMTOSTR(REF(MA2,2),2)) + ' 昨 ') + NUMTOSTR(REF(MA2,1),2)) + ' 今 ↑'),MA2,2,0),colorFFFFFF;
EXPLAINEX((五日 < 0),(((('五:前 ' + NUMTOSTR(REF(MA2,2),2)) + ' 昨 ') + NUMTOSTR(REF(MA2,1),2)) + ' 今 ↓'),MA2,2,0),colorAAAAAA;
EXPLAINEX((十日 > 0),(((('十:前 ' + NUMTOSTR(REF(MA3,2),2)) + ' 昨 ') + NUMTOSTR(REF(MA3,1),2)) + ' 今 ↑'),MA3,2,1),colorFF00;
EXPLAINEX((十日 < 0),(((('十:前 ' + NUMTOSTR(REF(MA3,2),2)) + ' 昨 ') + NUMTOSTR(REF(MA3,1),2)) + ' 今 ↓'),MA3,2,1),colorAA00;
PT:=(REF(HIGH,1) - REF(LOW,1));
DP:=(((REF(HIGH,1) + REF(LOW,1)) + (REF(CLOSE,1) * 2)) / 4);
AH:=(DP + PT);
NH:=((DP * 2) - REF(LOW,1));
cdp:=DP;
NL:=((DP * 2) - REF(HIGH,1));
AL:=(DP - PT);
EXPLAIN((1 = 1),'-------------------------'),colorFF;
EXPLAIN((1 = 1),'盘后预测实时参考'),colorFFFF;
EXPLAINEX((1 = 1),'最高: ',AH,2,0),colorFF;
EXPLAINEX((1 = 1),'近高: ',NH,2,0),colorFF33FF;
EXPLAINEX((1 = 1),'中间价: ',CDP,2,0);
EXPLAINEX((1 = 1),'近低: ',NL,2,0),colorFFFF00;
EXPLAINEX((1 = 1),'最低: ',AL,2,0),colorFF00;
EXPLAIN((1 = 1),'-------------------------'),colorFF;
AA:=(WINNER((CLOSE + ((CLOSE * 15) / 100))) * 100);
BB:=(WINNER((CLOSE + ((CLOSE * 0) / 100))) * 100);
CC:=(AA - BB);
DD:=((WINNER((CLOSE - ((CLOSE * 0.1) / 100))) - WINNER((CLOSE - ((CLOSE * 15) / 100)))) * 100);
EE:=(((CC < 3) AND (DD < 0.5)) AND (OPEN <> LOW));
A4:=DYNAINFO(6);
A5:=IF((LOW > A4),0,IF((HIGH < A4),1,(((A4 - LOW) + 0.01) / ((HIGH - LOW) + 0.01))));
A6:=(VOL / WINNER(LOW));
A7:=REF(HHV(CLOSE,120),1);
A8:=REF(LLV(CLOSE,120),1);
A9:=((100 * (CLOSE - A8)) / (A7 - A8));
A10:=((A5 > 0) OR (A5 = 1));
A11:=((A10 AND ((A6 / REF(A6,3)) >= 3)) AND (A9 < 80));
A12:=(((REF(A11,1) OR REF(A11,2)) OR REF(A11,3)) OR REF(A11,4));
VAR93:=(A11 AND A12);
VAR94:=IF(FILTER(A11,3),5,0);
VAR95:=IF((FILTER(VAR93,3) OR EE),10,0);
机构进场日:STICKLINE(VAR94,LOW,(LOW * 1.05),5,0),colorFF7700;
机构加仓日:STICKLINE(VAR95,LOW,(LOW * 1.1),5,0),colorFF00FF;
STICKLINE(VAR94,LOW,(LOW * 1.05),5,0),colorFF7700;
STICKLINE(VAR94,LOW,(LOW * 1.05),4.5,0),colorFF8800;
STICKLINE(VAR94,LOW,(LOW * 1.05),4,0),colorFF9900;
STICKLINE(VAR94,LOW,(LOW * 1.05),3.5,0),colorFFAA00;
STICKLINE(VAR94,LOW,(LOW * 1.05),3,0),colorFFBB00;
STICKLINE(VAR94,LOW,(LOW * 1.05),2.5,0),colorFFCC00;
STICKLINE(VAR94,LOW,(LOW * 1.05),2,0),colorFFDD00;
STICKLINE(VAR94,LOW,(LOW * 1.05),1,0),colorFFEE00;
STICKLINE(VAR95,LOW,(LOW * 1.1),4.5,0),color102099;
STICKLINE(VAR95,LOW,(LOW * 1.1),4,0),color1020AA;
STICKLINE(VAR95,LOW,(LOW * 1.1),3.5,0),color1020BB;
STICKLINE(VAR95,LOW,(LOW * 1.1),3,0),color1020CC;
STICKLINE(VAR95,LOW,(LOW * 1.1),2.5,0),color1020DD;
STICKLINE(VAR95,LOW,(LOW * 1.1),2,0),color1020EE;
STICKLINE(VAR95,LOW,(LOW * 1.1),1,0),color1020FF;
DRAWTEXT(VAR94,LOW,'进场'),colorFFFF;
DRAWTEXT(VAR95,(LOW * 1.1),'加仓'),colorFFFFFF;
牛市通网是一个牛股推荐网与低风险投资知识网,可以在线联系客服领取牛股。牛市通网从权威的投资专家、金融分析师等投资信息中挑选优质的文章进行发布。牛市通网主要为投资者提供股票知识、股票观点、股票分析和明智金融投资讨论等信息。