文华财经指标源码
文华财经期货软件指标公式源码至尊波段王指标公式源码
/*JJ:=(CLOSE+HIGH+LOW)/3;A:=EMA(JJ,10);B:=REF(A,1);STICKLINE(A>B,A,B,5,0),COLORYELLOW;STICKLINE(A<B,A,B,5,0),COLORBLUE;M1:=EMA(CLOSE,3);M2:=EMA(CLOSE,8);M3:=EMA(M2,13);M4:=EMA(M2,55);VAR1:=EMA(M3,55);M5:=EMA(M4,81), COLORRED,LINETHICK2;VAR2:=(REF(HIGH,1)+REF(LOW,1))/2;VAR3:=MA(CLOSE,21)+2*STD(CLOSE,21);VAR4:=REF(CLOSE,1);VAR5:=SMA(MAX(CLOSE-VAR4,0),7,1)/SMA(ABS(CLOSE-VAR4),7,1)*100;VAR6:=CROSS(79,VAR5);VAR7:=FILTER(VAR6,4);A7:=(2*C+H+L)/4;VAR10:=LLV(LOW,34);VAR11:=HHV(HIGH,34);SK:=EMA((A7-VAR1)/(VAR2-VAR1)*100,7);SD:=EMA(0.667*REF(SK,1)+0.333*SK,5);DRAWTEXT(IF(COUNT(CLOSE<REF(CLOSE,1),8)/8>6/10 AND VOL>=1.5*MA(VOL,5) ANDCOUNT(SK>=SD,3) AND REF(LOW,1)=LLV(LOW,120),1,0),LOW,'买进') ,COLORRED; DRAWTEXT(IF(COUNT(CLOSE<REF(CLOSE,1),13)/13>6/10 ANDCOUNT(SK>SD,6) AND REF(LOW,5)=LLV(LOW,120) AND REF(CLOSE>=OPEN,4) ANDREF(CLOSE>OPEN,3) AND REF(CLOSE>OPEN,2) AND REF(OPEN>CLOSE,1) AND OPEN>REF(CLOSE,1),1,0),LOW,'买进'), COLORRED;D:=MA(CLOSE,80)-MA(CLOSE,10)/3;DRAWTEXT(IF(CLOSE<D AND VOL/240>MA(VOL,5)/240 ANDCLOSE>REF(CLOSE,1)*1.08AND CLOSE<MA(CLOSE,13)*1.3,1,0),LOW,'抄底'),COLORRED;工作线:EMA(CLOSE,18),COLORGREEN,LINETHICK1;B1:=MA(C,1);B2:=SMA(SMA(SMA(B1,2,1),2,1),2,1),COLORCYAN;买入:MA(B2,2),COLORRED;倍量柱:=V/REF(V,1)>1.89;{主图叠加划线}高抛低吸:=STICKLINE((((((HIGH-IF((CLOSE>OPEN),CLOSE,OPEN))/(HIGH-LOW))*VOL)>((ABS ((OPEN-CLOSE))/(HIGH-LOW))*VOL)) AND((((HIGH-IF((CLOSE>OPEN),CLOSE,OPEN))/(HIGH-LOW))*VOL)>(((IF((CLOSE>OPEN),O PEN,CLOSE)-LOW)/(HIGH-LOW))*VOL))),0,(((HIGH-IF((CLOSE>OPEN),CLOSE,OPEN))/( HIGH-LOW))*VOL),2,0);量能平台:STICKLINE(倍量柱 AND FILTER(倍量柱,24) ANDC>O,C,C,400,0),COLORMAGENTA;STICKLINE(倍量柱 AND FILTER(倍量柱,24) AND C>O,C,O,2,0),COLORYELLOW;AA:=MA(C,49);BB:=EMA(C,49);黄金线:(AA+BB)/2,LINETHICK2,COLORYELLOW;N8:=STRCAT(CON2STR(YEAR,0),' 年 ');Y8:=STRCAT(CON2STR(MONTH,0),' 月 ');R8:=STRCAT(CON2STR(DAY,0),' 日 ');SJ8:=STRCAT(STRCAT(N8,Y8), R8);DRAWTEXT_FIX(C>0,0.88,2,0,SJ8),COLOR00FFFF;DRAWTEXT_FIX(ISLASTBAR,0.81,2,2,CODE),COLORMAGENTA;DRAWTEXT_FIX(ISLASTBAR,0.86,2,2,STKNAME),COLORMAGENTA;STICKLINE(C>1.099*REF(C,1),O+(C-O)/2,C,1,0),COLOR00DDFF;STICKLINE(C<0.901*REF(C,1),C,C+(O-C)/2,1,0),COLOR00DDFF;涨停:=IF(REF(C,1)*1.095-C<0.01 ,1,0);DRAWTEXT(涨停,L-0.1,'涨停'),COLORMAGENTA;{高点 1 9999 50低点 1 9999 30 }GD:=CONST(FINDHIGH(H,0,高点*10,1));DD:=CONST(FINDLOW(L,0,低点*10,1));GT:=CONST(BARSLAST(GD=H))+1;DT:=CONST(BARSLAST(DD=L))+1;SH:=CONST(IF(GT=1,H,REF(H,GT-1)));SL:=CONST(IF(DT=1,L,REF(L,DT-1)));CC:=IF(DT>GT,DT,GT);CD:=INTPART(CC-(DT+GT)/2);CG:=IF(高点>CD,CD/2,高点);下跌周期:BARSLAST(GD=H),COLORWHITE,NODRAW;下跌幅:IF(CURRBARSCOUNT<=GT,C/SH*100-100,DRAWNULL),NODRAW,COLORGREEN; 下跌均价:IF(CURRBARSCOUNT<=GT,SUM(AMOUNT,GT)/SUM(V,GT)/100,DRAWNULL),NODRA W,COLORLIGRAY;跌换手%:IF(CURRBARSCOUNT<=GT,SUM(HSL.HSL,GT),DRAWNULL),COLORCYAN,NODRAW; 上涨周期:IF(CURRBARSCOUNT<=DT,BARSLAST(DD=L),DRAWNULL),COLORWHITE,NODRAW; 上涨幅:IF(CURRBARSCOUNT<=DT,C/SL*100-100,DRAWNULL),NODRAW,COLORRED;上涨均价:IF(CURRBARSCOUNT<=DT,SUM(AMOUNT,DT)/SUM(V,DT)/100,DRAWNULL),NODRA W,COLORLIGRAY;涨换手%:IF(CURRBARSCOUNT<=DT,SUM(HSL.HSL,DT),DRAWNULL),COLORLIMAGENTA,NO DRAW;星期:=VARCAT(VARCAT('(',IF(WEEKDAY=1,'一',IF(WEEKDAY=2,'二',IF(WEEKDAY=3,'三',IF(WEEKDAY=4,'四',IF(WEEKDAY=5,'五','')))))),')');日期:=VARCAT('-',VARCAT(VARCAT(VARCAT(VARCAT(VARCAT(VARCAT(VAR2STR(YEAR,0), '年'),VAR2STR(MONTH,0)),'月'),VAR2STR(DAY,0)),'日'),星期));{自动黄金分割普通等系坐标}DRAWRECTREL(990,1,382,1,RGB(250,250,0));DRAWTEXT_FIX(C>0,0.382,0.00,0,'100%'),COLOR00CCCC;DRAWRECTREL(990,188,382,188,RGB(200,200,0));DRAWTEXT_FIX(C>0,0.382,0.189,0,'19.1%'),COLOR00CCCC;DRAWRECTREL(990,375,382,375,RGB(200,200,0));DRAWTEXT_FIX(C>0,0.382,0.376,0,'38.2%'),COLOR00CCCC;DRAWRECTREL(990,491,382,491,RGB(200,200,0));DRAWTEXT_FIX(C>0,0.382,0.492,0,'50.0%'),COLOR00CCCC;DRAWRECTREL(990,607,382,607,RGB(200,200,0));DRAWTEXT_FIX(C>0,0.382,0.608,0,'61.8%'),COLOR00CCCC;DRAWRECTREL(990,794,382,794,RGB(200,200,0));DRAWTEXT_FIX(C>0,0.382,0.795,0,'80.9%'),COLOR00CCCC;DRAWRECTREL(990,982,382,982,RGB(250,250,0));DRAWTEXT_FIX(C>0,0.382,0.936,0,'BASE'),COLOR00CCCC;DRAWRECTREL(990,232,382,232,RGB(100,100,0));DRAWRECTREL(990,144.6,382,144.6,RGB(100,100,0));DRAWRECTREL(990,750,382,750,RGB(100,100,0));DRAWTEXT_FIX(C>0,0.75,0.0,0,'【铭轩881】【趋势为王】'),COLORFF9300; DRAWTEXT_FIX(C>0,0.75,0.08,0,'【交易法则:均线多头排列买入】'),COLORRED;今涨停价:REF(C,1)+REF(C,1)*0.1,COLORRED,NODRAW;明涨停价:C+C*0.1,COLORRED,NODRAW;*/赢:=MA(C,1);在:=SMA(SMA(SMA(赢,2,1),2,1),2,1);龙:=MA(在,3);FILLRGN(龙>在,龙,在,COLORBLUE);FILLRGN(龙<在,龙,在,RGB(231,231,231));DRAWTEXT(CROSS(龙>在,0.5),龙,'空'),COLORYELLOW,FONTSIZE30;DRAWTEXT(CROSS(龙<在,0.5),龙,'多'),COLORRED,FONTSIZE30,VALIGN0;赢在龙头:=(L+H+C*4)/6;工作:=EMA(赢在龙头,12),COLOR00FF00;度假:=EMA(赢在龙头,19);赢在:=(工作-REF(工作,1))/REF(工作,1)*100;龙头:=(度假-REF(度假,1))/REF(度假,1)*100;G:=BARSLAST(CROSS(赢在,0));赢在龙:=REF(赢在龙头,G),COLORWHITE,LINETHICK4;A2:=3*EMA((C-LLV(L,30))/(HHV(H,30)-LLV(L,30))*100,5)-2*EMA((C-LLV(L,30))/(HHV(H,30)-LLV(L,3 0))*100,5);A4:=(HHV(H,34)-C)/(HHV(H,34)-LLV(L,34))*100;A5:=EMA(CLOSE,12)-EMA(CLOSE,26);A6:=EMA(A5,9);A7:=(A5-A6);//IF(赢在>=0,赢在龙,NULL),LINETHICK4,COLORRED;。
文华财经指标公式源码顶底卖出买入趋势线公式源码
XQ:=进出线<REF(进出线,1);
SQS:=BACKSET(BARSLAST(NOT(SQ))>=5,BARSLAST(NOT(SQ))),LINETHICK;
XQS:=BACKSET(BARSLAST(NOT(XQ))>=5,BARSLAST(NOT(XQ))),LINETHICK;
DRAWTEXT(ISLASTBAR,顶,'*'),COLORGREEN;
DRAWTEXT(ISLASTBAR,底,'*'),COLORRED;
DRAWTEXT(ISLASTBAR,中,'中'),COLORWHITE;
多空线:=(MA1+ma2+maF)/3;
MA3c:=(EMA(c,(3*8))+EMA(c,26)+EMA(c,(4*7)))/3;
MA3h:=(EMA(h,(3*8))+EMA(h,26)+EMA(h,(4*7)))/3;
MA3l:=(EMA(l,(3*8))+EMA(l,26)+EMA(l,(4*7)))/3;
趋势线:EMA(V11,3),LINETHICK1,COLORGRAY;
V12:=(趋势线-REF(趋势线,1))/REF(趋势线,1)*100;
//STICKLINE1(趋势线<11,趋势线,11,5,0),COLORYELLOW;
AA:=(趋势线<11) AND FILTER((趋势线<=11),15) AND C<中线;
/*bc:=((H*0.5+L*0.5)*0.382+(O*0.382+C*0.618)*0.618);
文华财经期货软件指标公式源码赢顺云指标趋势多空买卖点指标
文华财经期货软件指标公式源码赢顺云指标趋势多空买卖点指标>注意:以下公式源码仅供参考,未经确认请勿引用。
引言本文介绍了文华财经期货软件的指标公式源码,其中包括赢顺云指标、趋势指标以及多空买卖点指标。
这些指标可以帮助财经期货软件用户更好地分析市场走势和进行交易决策。
赢顺云指标赢顺云指标是一种技术分析指标,用于判断股票、期货等市场的买卖信号。
以下是该指标的公式源码:// 赢顺云指标公式源码def win_cloud(close, high, low):boll = sma(close, 20)upper_band = boll + stddev(close, 20)lower_band = boll - stddev(close, 20)condition1 = high > upper_band or low < lower_bandcondition2 = close > high[1] and close > low[1]win_cloud_result = condition1 and condition2return win_cloud_result趋势指标趋势指标是一种用于分析市场趋势的技术指标。
以下是文华财经期货软件中的趋势指标公式源码示例:// 趋势指标公式源码def trend_indicator(close, ma):trend_result = close > mareturn trend_result多空买卖点指标多空买卖点指标是一种判断多空力量对比的指标,用于预测市场的买卖信号。
以下是文华财经期货软件中的多空买卖点指标公式源码示例:// 多空买卖点指标公式源码def long_short_signal(close, ma_fast, ma_slow):condition1 = close > ma_fast and close > ma_slowcondition2 = close > close[1]long_short_result = condition1 and condition2return long_short_result结论本文介绍了文华财经期货软件中的指标公式源码,包括赢顺云指标、趋势指标以及多空买卖点指标。
文华财经指标文华财经期货软件指标多空线指标公式源码
/*DIFF1:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA1:=EMA(DIFF1,9);DRAWBAND(DEA1,DRAWNULL,DIFF1,RGB(250,0,0));DIFF:EMA(CLOSE,12)-EMA(CLOSE,26),COLORYELLOW;DEA:EMA(DIFF,9),COLORCYAN;MACD:2*(DIFF-DEA),COLORSTICK;TR1:=SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))), 14);HD:=HIGH-REF(HIGH,1);LD:=REF(LOW,1)-LOW;PDM:=SUM(IF(HD>0 AND HD>LD,HD,0),14);MDM:=SUM(IF(LD>0 AND LD>HD,LD,0),14);PDI:=PDM*100/TR;MDI:=MDM*100/TR;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));B1:=REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);A2:=BARSLAST(REF(CROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3)),1));B2:=REF(C,A2+1)>C AND REF("KDJ.K"(9,3,3),A2+1)<"KDJ.K"(9,3,3) ANDCROSS("KDJ.K"(9,3,3),"KDJ.D"(9,3,3));A3:=BARSLAST(REF(CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24)),1));B3:=REF(C,A3+1)>C AND REF("RSI.RSI1"(6,12,24),A3+1)<"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI1"(6,12,24),"RSI.RSI2"(6,12,24));C1:=BARSLAST(REF(CROSS(DEA,DIFF),1));D1:=REF(C,C1+1)<C AND REF(DIFF,C1+1)>DIFF AND CROSS(DEA,DIFF);C2:=BARSLAST(REF(CROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3)),1));D2:=REF(C,C2+1)<C AND REF("KDJ.K"(9,3,3),C2+1)>"KDJ.K"(9,3,3) ANDCROSS("KDJ.D"(9,3,3),"KDJ.K"(9,3,3));C3:=BARSLAST(REF(CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24)),1));D3:=REF(C,C3+1)<C AND REF("RSI.RSI1"(6,12,24),C3+1)>"RSI.RSI1"(6,12,24) AND CROSS("RSI.RSI2"(6,12,24),"RSI.RSI1"(6,12,24));C4:=BARSLAST(REF(CROSS(MDI,PDI),1));D4:=REF(C,C+1)<C AND REF(MDI,C4+1)>MDI AND CROSS(MDI,PDI);A4:=BARSLAST(REF(CROSS(PDI,MDI),1));B4:=REF(C,A4+1)>C AND REF(PDI,A4+1)<PDI AND CROSS(PDI,MDI);MACD底背:IF(B1>0,1,0),COLORRED,NODRAW;KDJ底背:IF(B2>0,1,0),COLORFF00FF,NODRAW;RSI底背:IF(B3>0,1,0),COLORYELLOW,NODRAW;DMI底背:IF(B4>0,1,0),COLORBROWN,NODRAW;MACD顶背:IF(D1>0,1,0),COLOR00FF00,NODRAW;KDJ顶背:IF(D2>0,1,0),COLORFFCC66,NODRAW;RSI顶背:IF(D3>0,1,0),COLORWHITE,NODRAW;DMI顶背:IF(D4>0,1,0),COLORLIRED,NODRAW;{DRAWLINE(A1=0,DEA,MACD底背,DEA,0),COLORRED,LINETHICK2;DRAWLINE(A2=0,DEA,MACD顶背,DEA,0),COLOR00FF00,LINETHICK2;}STICKLINE(B1>0,-0.1,0,2,0),COLORRED;STICKLINE(B2>0,-0.1,-0.2,2,0),COLORFF00FF;STICKLINE(B3>0,-0.1,0,2,0),COLORYELLOW;STICKLINE(B4>0,-0.1,-0.2,2,0),COLORBROWN;STICKLINE(D1>0,0.1,0,2,0),COLOR00FF00;STICKLINE(D2>0,0.1,0.2,2,0),COLORFFCC66;STICKLINE(D3>0,0.1,0,2,0),COLORWHITE;STICKLINE(D4>0,0.1,0.2,2,0),COLORLIRED;SQX:=(C-MA(CLOSE,13))*100;DIF:EMA(MA(SQX,7),1),LINETHICK1;DEA:EMA(DIF,7),LINETHICK1;MACD: (DIF-DEA)*2,COLORSTICK;红柱持股:IF(MACD>REF(MACD,1),MACD,DRAWNULL),STICK,COLORRED,LINETHICK3;绿柱持币:IF(MACD<REF(MACD,1),MACD,DRAWNULL),STICK,COLORGREEN,LINETHICK3; 低位金叉:IF(CROSS(DIF,DEA) AND DIF<-0.1,0.3,0),COLORYELLOW,POINTDOT; STICKLINE(低位金叉,0,10,8,1),COLORYELLOW;DRAWICON(低位金叉,0.3,1);JCCOUNT:=COUNT(CROSS(DIF,DEA),BARSLAST(DEA>=0));二次金叉:IF(CROSS(DIF,DEA) AND DEA<0 ANDCOUNT(JCCOUNT=2,21)=1,0.2,0),COLORFF00FF,POINTDOT;STICKLINE(二次金叉,25,15,8,1),COLORFF00FF;A1:=BARSLAST(REF(CROSS(DIF,DEA),1));底背离:IF(REF(CLOSE,A1+1)>CLOSE AND DIF>REF(DIF,A1+1) ANDCROSS(DIF,DEA),0.1,0),COLORRED,POINTDOT;STICKLINE(底背离,40,30,8,1),COLORMAGENTA;DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORMAGENTA,LINETHICK3;A2:=BARSLAST(REF(CROSS(DEA,DIF),1));顶背离:REF(CLOSE,A2+1)<CLOSE AND REF(DIF,A2+1)>DIF ANDCROSS(DEA,DIF),COLORGREEN;DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORBLUE,LINETHICK3;A3:=CROSS(DIF,DEA) AND DEA<0;零下二次金叉:IF(FILTER(COUNT(A3,21)=2,10),0.05,0),COLORWHITE,POINTDOT; STICKLINE(零下二次金叉,45,55,8,1),COLORWHITE;金叉:DRAWICON(CROSS(DIF,DEA),DIF,1);死叉:DRAWICON(CROSS(DEA,DIF),DIF,2);{MACD底背离选股公式}DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9),;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));XG:REF(C,A1+1)>C AND REF(DIFF,A1+1)<DIFF AND CROSS(DIFF,DEA);*/N:=120;CURRBARSCOUNT:=DATACOUNT-BARPOS+1;K:=BARSLAST(CURRBARSCOUNT=N);GD:=REFX1(IF(ISLASTBAR=1,HHV(H,K),0),10000),NODRAW;{高点}DD:=REFX1(IF(ISLASTBAR=1,LLV(L,K),0),10000),NODRAW;{低点}KJ:=GD-DD;//{高低点差值=分区高度}GD4:=IF(CURRBARSCOUNT<=N/2,GD,NULL);高区:IF(CURRBARSCOUNT<=N,GD,NULL),COLORRED,LINETHICK2,NODRAW;低区:IF(CURRBARSCOUNT<=N,DD,NULL),COLOR00FF00,LINETHICK2,NODRAW;平衡:=IF(CURRBARSCOUNT<=N,DD+KJ/2,NULL),COLOR00FFFF,NODRAW;低:IF(CURRBARSCOUNT<=N/2,DD,NULL),COLORFFFF00;高:IF(CURRBARSCOUNT<=N/2,GD,NULL),COLOR00FFFF;支撑:IF(CURRBARSCOUNT<=N/2,DD+KJ*0.191,NULL),COLOR00FFFF;第一防线:REFX1(低,10000),DOT,COLORYELLOW,NODRAW;第二防线:REFX1(支撑,10000),DOT,COLORWHITE,NODRAW;今日保护价:(REF(C,2)+REF(C,1)+O)/3 ,COLORCC3299;CC:IF(CURRBARSCOUNT<18,REFX1(REF(C,1),10000),NULL),COLOR000000,NODRAW;止赢:1.05*CC,COLORMAGENTA,LINETHICK2;DRAWTEXT(ISLASTBAR,止赢,'止赢'),LINETHICK2;止损:0.97*CC,COLORYELLOW,LINETHICK2;DRAWTEXT(ISLASTBAR,止损,'止损'),LINETHICK2;DRAWNUMBER1(ISLASTBAR ,C,C,2),COLORWHITE;MAA10:=MA(C,10);MAA30:MA(C,30),COLORRED;KS:IF(MAA10>MAA30,MAA10,MAA30),COLORBLUE;A3:=(C-LLV(L,9))/(HHV(H,9)-LLV(L,9))*100;A4:=SMA(A3,3,1);A5:=SMA(A4,3,1);A6:=3*A4-2*A5;A7:=C-REF(C,1);A8:=100*EMA(EMA(A7,6),6)/EMA(EMA(ABS(A7),6),6);买:=LLV(A8,2)=LLV(A8,7) AND COUNT(A8<0,2) AND CROSS(A8,MA(A8,2)); DRAWTEXT(FILTER(买=1,5),LOW-0.05,'跟庄买进'),COLORYELLOW; STICKLINE1(买,OPEN,CLOSE,2,0),COLORYELLOW;。
文华财经指标公式源码最神奇的主图买卖指标公式源码
/* AMV0:=VOL*(O+C)/2;CG:MA(C,3),COLORFFCC66,LINETHICK2;FL:=HHV(CG,2);黄金线:HHV(CG,2),COLOR00FF00;FS:CG-(FL-CG),COLORRED,LINETHICK2;十:MA(C,13),COLOR00FFFF,LINETHICK2;涨:IF(MA(CLOSE,13)>REF(MA(CLOSE,13),1),MA(CLOSE,13),DRAWN ULL),COLORRED,LINETHICK2;平:IF(MA(CLOSE,13)=REF(MA(CLOSE,13),1),MA(CLOSE,13),DRAWN ULL),COLOR00FFFF,LINETHICK3;跌:IF(MA(CLOSE,13)<REF(MA(CLOSE,13),1),MA(CLOSE,13),DRAWN ULL),COLORGREEN,LINETHICK2;DRAWTEXT(平=十,十*0.998-0.01,'关注'),COLORCYAN;TY:=C;A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10);C1:=BACKSET(B1,10+1); HD:=FILTER(C1,10);A2:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A2,10);C2:=BACKSET(B2,10+1); LD:=FILTER(C2,10);A:=REF(C,BARSLAST(HD)); B:=REF(C,BARSLAST(LD));T1:=BARSLAST(HD)<BARSLAST(LD) AND NOT(HD) ;T2:=BARSLAST(HD)>BARSLAST(LD) AND NOT(LD);波峰:IF(T1,A,A),COLORFF00FF,POINTDOT;STICKLINE(T1,A,A,9,0),COLORFF00FF;波谷:IF(T2,B,B),COLOR80FF00,POINTDOT;STICKLINE(T2,B,B,9,0),COLOR80FF00;VAR3:=LLV(HIGH,240); VAR4:=100*(CLOSE-VAR3)/VAR3;VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*10 0;VAR6:=(CLOSE-LLV(CLOSE,530))/(HHV(CLOSE,530)-LLV(CLOSE,530) )*100;VAR7:=0;VAR8:=SMA(MAX(CLOSE-REF(CLOSE,1),0),34,1)/SMA(ABS(CLOSE-R EF(CLOSE,1)),7,1)*100;VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-R EF(CLOSE,1)),13,1)*100;VAR10:=IF(TROUGHBARS(3,16,1)=0 AND HIGH>LOW+0.04,4,0); VAR11:=ZIG(3,6)>REF(ZIG(3,6),1) ANDREF(ZIG(3,6),1)<=REF(ZIG(3,6),2) ANDREF(ZIG(3,6),2)<=REF(ZIG(3,6),3);VAR12:=ZIG(3,6)<REF(ZIG(3,6),1) AND REF(ZIG(3,6),1)>=REF(ZIG(3,6),2) AND REF(ZIG(3,6),2)>=REF(ZIG(3,6),3);VAR13:=ZIG(3,22)>REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)<=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)<=REF(ZIG(3,22),3); VAR14:=ZIG(3,22)<REF(ZIG(3,22),1) AND REF(ZIG(3,22),1)>=REF(ZIG(3,22),2) AND REF(ZIG(3,22),2)>=REF(ZIG(3,22),3); VAR15:=ZIG(3,51)>REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)<=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)<=REF(ZIG(3,51),3); VAR16:=ZIG(3,51)<REF(ZIG(3,51),1) AND REF(ZIG(3,51),1)>=REF(ZIG(3,51),2) AND REF(ZIG(3,51),2)>=REF(ZIG(3,51),3); VAR17:=ZIG(3,72)>REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)<=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)<=REF(ZIG(3,72),3); VAR18:=ZIG(3,72)<REF(ZIG(3,72),1) AND REF(ZIG(3,72),1)>=REF(ZIG(3,72),2) AND REF(ZIG(3,72),2)>=REF(ZIG(3,72),3); VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);买1:=VAR10;买2:=(VAR11+VAR13+VAR15+VAR17);卖1:=(VAR12+VAR14+VAR16+VAR18);DRAWTEXT(买1>0 OR 买2>0,LOW*0.99,'买'),COLORRED;S:IF(卖1>0,HIGH*1.01,DRAWNULL),CROSSDOT,LINETHICK3,COLORGREE N;DRAWTEXT(卖1>0,HIGH*1.02,'卖'),COLORGREEN;{股灵吧决策}VAR100:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));VAR200:=(100 - ((90 * (HHV(HIGH,20) - CLOSE)) / (HHV(HIGH,20) - LLV(LOW,20))));VAR300:=(100 - MA(((100 * (HHV(HIGH,5) - CLOSE)) / (HHV(HIGH,5) - LLV(LOW,5))),34));X1:=(C+L+H)/3;X2:=EMA(X1,6);X3:=EMA(X2,5);GR1:=BARSLAST(BETWEEN("BIAS.BIAS2"(6,13,24),0,5));GR3:=COUNT("BIAS.BIAS2"(6,13,24)>10 AND H=HHV(H,GR1),GR1); GR4:=H=HHV(H,GR1);GR5:="MACD.MACD"(9,17,8)<REF("MACD.MACD"(9,17,8),1);STICKLINE(CLOSE> REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORRED; STICKLINE(CLOSE> REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR000055; STICKLINE(CLOSE>REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR000077;STICKLINE(CLOSE>REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR000099;STICKLINE(CLOSE>REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLOR0000BB;STICKLINE(CLOSE>REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLOR0000DD;STICKLINE(CLOSE>REF(CLOSE,1) ,OPEN,CLOSE,0.3,0 ),COLOR0000FF;STICKLINE(CLOSE= REF(CLOSE,1) ,HIGH,LOW,0,1 ),COLORWHITE; STICKLINE(CLOSE= REF(CLOSE,1) ,OPEN,CLOSE,3,0 ),COLOR555555; STICKLINE(CLOSE=REF(CLOSE,1) ,OPEN,CLOSE,2.7,0 ),COLOR777777;STICKLINE(CLOSE=REF(CLOSE,1) ,OPEN,CLOSE,2.1,0 ),COLOR999999;STICKLINE(CLOSE=REF(CLOSE,1) ,OPEN,CLOSE,1.5,0 ),COLORBBBBBB;STICKLINE(CLOSE=REF(CLOSE,1) ,OPEN,CLOSE,0.9,0 ),COLORDDDDDD;*/趋势5:MA(CLOSE,5);CURRBARSCOUNT:=DATACOUNT - BARPOS;拐头卖10:MA(CLOSE,10);方向15:MA(CLOSE,15);中心线:(MA(C,30)+MA(C,72))/2,COLORGRAY,DOT;脱离价格1:中心线*1.2,COLORGRAY,DOT;脱离价格2:中心线*0.8,COLORGRAY,DOT;地心引力线:(MA(C,30)+MA(C,72))/2,COLORGRAY,DOT;地心引力区1:地心引力线*1.1,COLORGRAY,DOT;地心引力区2:地心引力线*0.9,COLORGRAY,DOT;DIFF:=EMA(CLOSE,12)-EMA(CLOSE,26);DEA:=EMA(DIFF,9);MACD:=2*(DIFF-DEA);平空开多:=CROSS(MACD,0);平多开空:=CROSS(0,MACD);//BUYSHORT_BUY(平空开多,LOW);//SELL_SELLSHORT(平多开空,HIGH);//AUTOFILTER;N:=10;T1:=REFX1(HHVBARS(V,N),10000);T0:IF(CURRBARSCOUNT<=N+3,REFX1(IF(T1=0,C,REF(C,T1)),10000),NULL),COLORYELLOW,DOT; IF(CURRBARSCOUNT=T1+1,T0,NULL),CIRCLEDOT,COLORFF00FF;涨跌:=REF(C,1);涨停:=IF((C-涨跌)*100/涨跌>=(10-0.01*100/涨跌),1,0);STICKLINE1(涨停,OPEN,CLOSE,2,0),COLORMAGENTA;STICKLINE1(涨停,H,L,0,0),COLORMAGENTA;ZT:=C/REF(C,1)>1.0945 AND C=H;AA:=BACKSET(ZT AND CURRBARSCOUNT<60,0);AC:=REF(C,BARSLAST(AA));STICKLINE1(C,AC,AC,5,0),COLORMAGENTA;VAR4:=PEAKBARS(C,15,1,1)<10;VAR5:=IF(VAR4=1,2,0);顶:= IF(VAR5=2,2,0);中线卖出:=IF(顶>REF(顶,1),1,0);止损价:IF(中线卖出=1, C*0.9,0), POINTDOT,COLOR00FF00,LINETHICK5;STICKLINE1(止损价,C*0.9,C*0.9,200,1),COLORRED,COLORGREEN;MA5:=MA(C,5);角度: ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416,NODRAW;。
文华财经指标公式源码 文华obv指标
CAPITAL:=GETPRICE1('流通股本');N:=BARSLAST(DATE<>REF(DATE,1))+1;CURRBARSCOUNT:=REFX1(BARPOS,10000)-BARPOS+1;HH:=REFX1(MA(H,125),125/2);LL:=REFX1(MA(L,125),125/2);金牛:=(REFX1(MA(HH,125),125/2)-REFX1(MA(LL,125),125/2))*1+REFX1(MA(HH,125),125/2),DOT,LINE THICK5,COLORYELLOW;金牛金牛:=(REFX1(MA(LL,125),125/2)-REFX1(MA(HH,125),125/2))*1+REFX1(MA(LL,125),125/2),DOT,LINET HICK5,COLORRED;(金牛+金牛金牛)/2,DOT;金钻趋势:REFX1(MA(LL,125),125/2)-(REFX1(MA(HH,125),125/2)-REFX1(MA(LL,125),125/2))*1,LINETHICK1 ,COLORRED,NODRAW;金牛2:EMA(金钻趋势,125),COLORCYAN,LINETHICK1,NODRAW;金牛21:=EMA(金牛,125),COLORCYAN,LINETHICK1,NODRAW;//FILLRGN(金钻趋势>金牛2,金钻趋势,金牛2,RGB(55,0,0));//FILLRGN(金钻趋势<金牛2,金钻趋势,金牛2,RGB(0,91,0));DRAWKLINE1(H,O,L,C);/*STICKLINE1(金钻趋势>LOW AND 金钻趋势<HIGH,金钻趋势,MIN(MIN(OPEN,CLOSE),金钻趋势),2,0),COLORYELLOW;STICKLINE1(金钻趋势>MIN(C,O) AND 金钻趋势<MAX(C,O),金钻趋势,MIN(OPEN,CLOSE),2,0),COLORYELLOW;STICKLINE1(金钻趋势>HIGH,OPEN,CLOSE,2,0),COLORYELLOW;STICKLINE1(金钻趋势>HIGH,HIGH,LOW,0,0),COLORYELLOW;STICKLINE1(金牛<H AND 金牛>L,金牛,MAX(MAX(OPEN,CLOSE),金牛),2,0),COLORBLUE; STICKLINE1(金牛<MAX(C,O) AND 金牛>MIN(C,O),金牛,MAX(OPEN,CLOSE),2,0),COLORBLUE; STICKLINE1(金牛<L,OPEN,CLOSE,2,0),COLORBLUE;STICKLINE1(金牛<L,HIGH,LOW,0,0),COLORBLUE;*/CC1:=REFX1(MA(C-REF(C,1),6),6/2);CC2:=REFX1(MA(ABS(C-REF(C,1)),6),6/2);VAR23:=100*REFX1(MA(CC1,6),6/2)/REFX1(MA(CC2,6),6/2);回调买:=LLV(VAR23,2)=LLV(VAR23,7) AND COUNT(VAR23<0,2) AND CROSS(VAR23,MA(VAR23,2)); XG:=金钻趋势>HIGH AND 回调买AND L<=金钻趋势;//DRAWTEXT(XG,L,'▲买入'),COLORRED;JJ:=(HIGH+LOW+CLOSE)/3;QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);QJ1:=IF(CAPITAL=0,QJ0*(JJ-MIN(CLOSE,OPEN)),QJ0*IF(HIGH=LOW,1,(MIN(OPEN,CLOSE)-LOW))); QJ2:=IF(CAPITAL=0,QJ0*(MIN(OPEN,CLOSE)-LOW),QJ0*IF(HIGH=LOW,1,(JJ-MIN(CLOSE,OPEN)))); QJ3:=IF(CAPITAL=0,QJ0*(HIGH-MAX(OPEN,CLOSE)),QJ0*IF(HIGH=LOW,1,(HIGH-MAX(OPEN,CLOSE ))));QJ4:=IF(CAPITAL=0,QJ0*(MAX(CLOSE,OPEN)-JJ),QJ0*IF(HIGH=LOW,1,(MAX(CLOSE,OPEN)-JJ))); FROMOPEN:=IF(HOUR<12,60*(HOUR-9)-30+MINUTE,120+60*(HOUR-13)+MINUTE);DDX:=((QJ1+QJ2)-(QJ3+QJ4))/IF(CAPITAL=0,10000,10000),COLOR00AAAA,LINETHICK1;V2:=SMA(IF(C>=REF(C,1),DDX,-DDX/100),2,1);V5:=SMA(V2*120/FROMOPEN*5,2,1);V10:=SMA(V5,5,1);V20:=SMA(V10,5,1);DY:=CURRBARSCOUNT=1 AND C<REF(C,1);DY2:=REF(V2,1)-DY;XG2:=C>O AND DY2<0.02 AND MA(C,5)>MA(C,60) AND C/REF(C,1)>=1.02 AND H<金牛;//DRAWTEXT(XG2,L,'▲抓牛'),COLORYELLOW;//DRAWTEXT(XG2 AND L<金钻趋势,L,'↖金钻起涨'),COLORMAGENTA;昨前:=5;高1:=REF(HHV(H,DAYBARPOS),DAYBARPOS);低1:=REF(LLV(L,DAYBARPOS),DAYBARPOS);H11:=高1-(高1-低1)*0.191;H21:=高1-(高1-低1)*0.382;H31:=高1-(高1-低1)*0.5;H41:=高1-(高1-低1)*0.618;H51:=高1-(高1-低1)*0.809;顶:=REFX1(高1,10000),LINETHICK3,COLORRED;低:=REFX1(低1,10000), LINETHICK3,COLORRED;HH1:=IFELSE(H<REF(H,1)&&REF(H,1)<REF(H,2),REF(H,2),0);LL1:=IFELSE(L>REF(L,1)&&REF(L,1)>REF(L,2),REF(L,2),0);HH2:=VALUEWHEN(HH1>0,HH1);LL2:=VALUEWHEN(LL1>0,LL1);K1:=IFELSE(CLOSE>HH2,-3,IFELSE(CLOSE<LL2,1,0));K2:=VALUEWHEN(K1<>0,K1);G:=IFELSE(K2=1,HH2,LL2);G1:=VALUEWHEN(ISLASTBAR,G);DRAWNUMBER(L>0,G1,G1,0,COLORCYAN);W1:=K2;W2:=OPEN-CLOSE;HT:=IFELSE(OPEN>CLOSE,OPEN,CLOSE);LT:=IFELSE(OPEN<CLOSE,OPEN,CLOSE);//DRAWLINE(W1=1,HIGH,W1=1,HT,COLORCYAN);//DRAWLINE(W1=1,LOW,W1=1,LT,COLORCYAN);//DRAWLINE(W1=-3,HIGH,W1=-3,HT,COLORRED);//DRAWLINE(W1=-3,LOW,W1=-3,LT,COLORRED);//STICKLINE(W1>0,OPEN,CLOSE,COLORCYAN,1);//STICKLINE(W1<=0,OPEN,CLOSE,COLORRED,1);//STICKLINE(W2>0&&W1<=0,OPEN,CLOSE,COLORRED,0);//STICKLINE(W2>0&&W1>0,OPEN,CLOSE,COLORCYAN,0);//DRAWLINE(W1=1&&REF(W1,1)=1,G,W1=1&&REF(W1,1)=1,REF(G,1),COLORGREEN),LINETHICK4 ;//DRAWLINE(W1=-3&&REF(W1,1)=-3,G,W1=-3&&REF(W1,1)=-3,REF(G,1),COLORYELLOW),LINETH ICK4;//DRAWSL(K2=1,G,0,1,0,COLORGREEN),LINETHICK4;//DRAWSL(K2=-3,G,0,1,0,COLORYELLOW),LINETHICK4;VERTLINE( K2=-3&&REF(K2=1,1)&&C<(金牛+金牛金牛)/2,COLORRED),LINETHICK2; VERTLINE( K2=1&&REF(K2=-3,1)&&C>(金牛+金牛金牛)/2,COLORGREEN),LINETHICK2;。
文华财经指标文华财经期货软件指标压力支撑指标公式源码
/*MA5:MA(C,5)LINETHICK3,COLOR00CCFF;MA10:=MA(C,10);MA20:=MA(C,20);MA30:=MA(C,30);五日乖离率:=(C-MA5)/MA5*100;BB5:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;速度5:=SMA(EMA((MA5-REF(MA5,1))/REF(MA5,1),3)*100,3,1);加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;IF(BB5>30 AND MA5>REF(MA5,1), MA5,DRAWNULL),LINETHICK3,COLORRED;BB10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;IF(BB5<0 AND MA5<REF(MA5,1), MA5,DRAWNULL),LINETHICK3,COLORGREEN;三拾日乖离率:=(C-MA30)/MA30*100,NODRAW;VAR1:=(MA20-MA30)>REF((MA20-MA30),1) AND MA20>REF(MA20,1) ANDMA30>REF(MA30,1);VAR2:=(MA30-MA20)<REF((MA30-MA20),1) AND MA20<REF(MA20,1) ANDMA30<REF(MA30,1);BB30:=ATAN((MA30/REF(MA30,1)-1)*100)*180/3.1416;强势狙击:=FILTER(BB30>30 AND BB10>45 AND CROSS(BB5,60),10);加仓:=FILTER(COUNT(CROSS(BB5,30),5)>=1 AND MA5>REF(MA5,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND MA10>REF(MA10,1)AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1),10);清仓:=FILTER(COUNT(CROSS(30,BB5),5)>=1 AND (C>MA30 OR O>MA30) ANDMA5<REF(MA5,1) AND 三拾日乖离率<REF(三拾日乖离率,1) ANDMA10<REF(MA10,1),10);DRAWTEXT(加仓 ,LOW*0.98,'←加仓'),COLORYELLOW;JC:=CROSS(0,五日乖离率) AND 三拾日乖离率<REF(三拾日乖离率,1) ANDMA10>REF(MA10,1) ;减仓:=FILTER(JC,10);MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1)AND MA5>REF(MA5,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<MA30;买入:=FILTER(MR,10);MA5:MA(C,5)LINETHICK3,COLOR00CCFF;MA10:=MA(C,10);MA20:=MA(C,20);MA30:=MA(C,30);五日乖离率:=(C-MA5)/MA5*100;BB5:=ATAN((MA5/REF(MA5,1)-1)*100)*180/3.1416;速度5:=SMA(EMA((MA5-REF(MA5,1))/REF(MA5,1),3)*100,3,1);加速度5:=EMA((速度5-REF(速度5,1)),3),NODRAW;IF(BB5>30 AND MA5>REF(MA5,1), MA5,DRAWNULL),LINETHICK3,COLORRED;BB10:=ATAN((MA10/REF(MA10,1)-1)*100)*180/3.1416;IF(BB5<0 AND MA5<REF(MA5,1), MA5,DRAWNULL),LINETHICK3,COLORGREEN;三拾日乖离率:=(C-MA30)/MA30*100,NODRAW;VAR1:=(MA20-MA30)>REF((MA20-MA30),1) AND MA20>REF(MA20,1) ANDMA30>REF(MA30,1);VAR2:=(MA30-MA20)<REF((MA30-MA20),1) AND MA20<REF(MA20,1) ANDMA30<REF(MA30,1);BB30:=ATAN((MA30/REF(MA30,1)-1)*100)*180/3.1416;强势狙击:=FILTER(BB30>30 AND BB10>45 AND CROSS(BB5,60),10);加仓:=FILTER(COUNT(CROSS(BB5,30),5)>=1 AND MA5>REF(MA5,1) AND 三拾日乖离率>REF(三拾日乖离率,1) AND MA10>REF(MA10,1)AND 加速度5>REF(加速度5,1) AND 速度5>REF(速度5,1),10);清仓:=FILTER(COUNT(CROSS(30,BB5),5)>=1 AND (C>MA30 OR O>MA30) ANDMA5<REF(MA5,1) AND 三拾日乖离率<REF(三拾日乖离率,1) ANDMA10<REF(MA10,1),10);DRAWTEXT(加仓 ,LOW*0.98,'←加仓'),COLORYELLOW;JC:=CROSS(0,五日乖离率) AND 三拾日乖离率<REF(三拾日乖离率,1) ANDMA10>REF(MA10,1) ;减仓:=FILTER(JC,10);MR:=COUNT(CROSS(五日乖离率,0),3)>=1 AND 三拾日乖离率>REF(三拾日乖离率,1) AND MA5>REF(MA5,1) AND (C/REF(C,1)-1)*100>5 AND REF(C,1)<MA30;买入:=FILTER(MR,10);DRAWTEXT(减仓,HIGH*1.02,'←风险'),COLORCYAN;DRAWTEXT(买入,LOW*0.98,'←买入'),COLORYELLOW;DRAWTEXT(清仓 ,HIGH*1.02,'←清仓'),COLORGREEN;DRAWTEXT(强势狙击,LOW*0.95,'←狙击'),COLORYELLOW;VAR21:=MAX(ABS(HIGH-AMOUNT/VOL/100),ABS(AMOUNT/VOL/100-LOW));VAR3:=ABS((OPEN+CLOSE)/2-AMOUNT/VOL/100);MV:=(VAR21+VAR3)/AMOUNT*VOL*100*50;压力:MA(REF(HHV(C,30),1),2),COLOR9DFFFF;支撑:MA(REF(LLV(C,30),1),2),COLORABFF46;DRAWTEXT(减仓,HIGH*1.02,'←风险'),COLORCYAN;DRAWTEXT(买入,LOW*0.98,'←买入'),COLORYELLOW;DRAWTEXT(清仓 ,HIGH*1.02,'←清仓'),COLORGREEN;DRAWTEXT(强势狙击,LOW*0.95,'←狙击'),COLORYELLOW;VAR21:=MAX(ABS(HIGH-AMOUNT/VOL/100),ABS(AMOUNT/VOL/100-LOW));VAR3:=ABS((OPEN+CLOSE)/2-AMOUNT/VOL/100);MV:=(VAR21+VAR3)/AMOUNT*VOL*100*50;压力:MA(REF(HHV(C,30),1),2),COLOR9DFFFF;支撑:MA(REF(LLV(C,30),1),2),COLORABFF46;*/VAR1:=(LOW+HIGH+CLOSE+O)/4;操作:MA(VAR1,5),COLOR00FFFF,LINETHICK2;拉升:HHV(操作,13),COLORFF00FF;买卖:LLV(操作,13),COLOR00FFFF;压力:HHV(操作,60),COLORFF6600;支撑:LLV(LOW,60)*1.02,COLOR00FF00,LINETHICK2;顶部:HHV(HIGH,60)*0.98,COLORFFFF00,LINETHICK2;涨:IF(MA(VAR1,5)>REF(MA(VAR1,5),1),MA(VAR1,5),NULL),COLORRED,LINETHICK2;平:IF(MA(VAR1,5)=REF(MA(VAR1,5),1),MA(VAR1,5),NULL),COLOR00FFFF,LINETHICK3;跌:IF(MA(VAR1,5)<REF(MA(VAR1,5),1),MA(VAR1,5),NULL),COLORGREEN,LINETHICK2; DRAWTEXT(C-O>=0 AND O/L>1.05 AND L<=LLV(L,30),L,'★<--极品绝底'), LINETHICK1;DIFF := EMA(CLOSE,12) - EMA(CLOSE,26);DEA := EMA(DIFF,9);MACD:=2*(DIFF-DEA),COLORSTICK;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;LC := REF(CLOSE,1);RSI1:=SMA(MAX(CLOSE-LC,0),7,1)/SMA(ABS(CLOSE-LC),7,1)*100;RSI2:=SMA(MAX(CLOSE-LC,0),14,1)/SMA(ABS(CLOSE-LC),14,1)*100;DRAWTEXT(REF(C,BARSLAST(REF(CROSS(DIFF,DEA),1))+1)>C AND REF(DIFF,BARSLAST(REF(CROSS(DIFF,DEA),1))+1)<DIFF AND CROSS(DIFF,DEA)>0,L-0.02,'★M'),COLOR00FFFF;DRAWTEXT(REF(C,BARSLAST(REF(CROSS(K,D),1))+1)>C AND REF(K,BARSLAST(REF(CROSS(K,D),1))+1)<K AND CROSS(K,D),L-0.10,'◎K'),COLORFF00FF; DRAWTEXT(REF(C,BARSLAST(REF(CROSS(RSI1,RSI2),1))+1)>C AND REF(RSI1,BARSLAST(REF(CROSS(RSI1,RSI2),1))+1)<RSI1 AND CROSS(RSI1,RSI2)>0,L-0.18,'◆R'),COLOR0000FF;DRAWTEXT(REF(C,BARSLAST(REF(CROSS(DEA,DIFF),1))+1)<C AND REF(DIFF,BARSLAST(REF(CROSS(DEA,DIFF),1))+1)>DIFF AND CROSS(DEA,DIFF)>0,H+0.16,'★M'),COLOR00FF00;DRAWTEXT(REF(C,BARSLAST(REF(CROSS(D,K),1))+1)<C ANDREF(K,BARSLAST(REF(CROSS(D,K),1))+1)>K AND CROSS(D,K)>0,H+0.08,'◎K'),COLORFFFFCC; DRAWTEXT(REF(C,BARSLAST(REF(CROSS(RSI2,RSI1),1))+1)<C AND REF(RSI1,BARSLAST(REF(CROSS(RSI2,RSI1),1))+1)>RSI1 AND CROSS(RSI2,RSI1)>0,H+0.04,'◆R'),COLORFF9900;。
文华财经指标公式源码期货波段王指标
JJ:=(CLOSE+HIGH+LOW)/3;A:=EMA(JJ,5);B:=REF(A,1);//持股:STICKLINE1(A>B,A,B,4,0),COLOR00FFFF;//弃股:STICKLINE1(A<=B,A,B,4,0),COLORA00000;走势线:ZIGZAG(C,3,1);G:=MA(走势线,2);DRAWTEXT(CROSS(走势线,G),L,'买'),COLORRED;DRAWTEXT(CROSS(G,走势线),H,'卖' ),COLORGREEN;支撑位:IF((走势线-REF(走势线,1))/REF(走势线,1)*100>=0,REF(走势线,BARSLAST(CROSS((走势线-REF(走势线,1))/REF(走势线,1)*100,0))+1),NULL),COLORRED,LINETHICK2;阻力位:IF((走势线-REF(走势线,1))/REF(走势线,1)*100<0,REF(走势线,BARSLAST(CROSS(0,(走势线-REF(走势线,1))/REF(走势线,1)*100))+1),NULL),COLORBLUE,LINETHICK2;买卖价格位:MA(C,3);头部:=PEAKBARS(C,3,1,1)=0;底部:=TROUGHBARS(C,3,1,1)=0;DRAWTEXT(头部,H,'-----------有阻力'),COLORGREEN;DRAWTEXT(底部,L,'+++++++++有支撑'),COLORRED;JRH:=HHV(C,2);JRL:=LLV(C,2);YTSL:=(3*C+L+O+H)/6;Z1D:=C>=REF(C,1);Z1X:=C<=REF(C,1);Z2D:=C>=REF(C,2);Z2X:=C<=REF(C,2);X1D2:=Z1X AND Z2D;D1X2:=Z1D AND Z2X;R1:=Z1D AND Z2D;R2:=REF(R1,1) AND X1D2;R3:=REF(R2,1) AND D1X2;R4:=REF(R3,1) AND X1D2;R5:=REF(R4,1) AND D1X2;R6:=REF(R5,1) AND X1D2;R7:=REF(R6,1) AND D1X2;R8:=REF(R7,1) AND X1D2;R9:=REF(R8,1) AND D1X2;RA:=REF(R9,1) AND X1D2;RB:=REF(RA,1) AND D1X2;RC:=REF(RB,1) AND X1D2;RD:=Z1X AND Z2X;RE:=REF(RD,1) AND D1X2;RF:=REF(RE,1) AND X1D2;R10:=REF(RF,1) AND D1X2;R11:=REF(R10,1) AND X1D2;R12:=REF(R11,1) AND D1X2;R13:=REF(R12,1) AND X1D2;R14:=REF(R13,1) AND D1X2;R15:=REF(R14,1) AND X1D2;R16:=REF(R15,1) AND D1X2;R17:=REF(R16,1) AND X1D2;R18:=REF(R17,1) AND D1X2;R19:=((REF(RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,1)) AND R1);R1A:=((REF(R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,1)) AND RD);红色持股:=R1 OR R2 OR R3 OR R4 OR R5 OR R6 OR R7 OR R8 OR R9 OR RA OR RB OR RC,COLOR0000FF,NODRAW;离场:=IF(红色持股,JRL,NULL);明离场价:=离场,COLORFF99FF,NODRAW;今离场价:REF(离场,1),COLORGREEN,NODRAW;青色观望:=RD OR RE OR RF OR R10 OR R11 OR R12 OR R13 OR R14 OR R15 OR R16 OR R17 OR R18,COLORFFFF00,NODRAW;进:=IF(青色观望,JRH,NULL);明进场价:=进,COLOR33AACC,NODRAW;今进场价:REF(明进场价,1),COLORRED,NODRAW;短买:R19,COLORRED,NODRAW;STICKLINE1(ISLASTBAR AND (红色持股OR REF(红色持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF;STICKLINE1(ISLASTBAR AND (青色观望OR REF(青色观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00;QLIFE:=(EMA(CLOSE,60)+EMA(CLOSE,90))/2,POINTDOT,COLORGREEN,LINETHICK4; FROMOPEN:=IF(HOUR<12,60*(HOUR-9)-30+MINUTE,120+60*(HOUR-13)+MINUTE);TT:=240/FROMOPEN;比:=TT;J12:=(HIGH - ((HIGH - LOW) / 3));J23:=(LOW + ((HIGH - LOW) / 3));AAA:=REFX1(HHV(H,90),10000);BBB:=REFX1(LLV(L,100),10000);DRAWKLINE1(H,O,L,C);PL5:=ZIGZAG(C,5,1);EN1:=ZIGZAG(C,5,1)>REF(ZIGZAG(C,5,1),1) AND REF(ZIGZAG(C,5,1),1)<=REF(ZIGZAG(C,5,1),2) AND REF(ZIGZAG(C,5,1),2)<=REF(ZIGZAG(C,5,1),3);EX1:=ZIGZAG(C,5,1)<REF(ZIGZAG(C,5,1),1) AND REF(ZIGZAG(C,5,1),1)>=REF(ZIGZAG(C,5,1),2) AND REF(ZIGZAG(C,5,1),2)>=REF(ZIGZAG(C,5,1),3);PL10:=ZIGZAG(C,10,1);EN2:=ZIGZAG(C,10,1)>REF(ZIGZAG(C,10,1),1) AND REF(ZIGZAG(C,10,1),1)<=REF(ZIGZAG(C,10,1),2) AND REF(ZIGZAG(C,10,1),2)<=REF(ZIGZAG(C,10,1),3);EX2:=ZIGZAG(C,10,1)<REF(ZIGZAG(C,10,1),1) AND REF(ZIGZAG(C,10,1),1)>=REF(ZIGZAG(C,10,1),2) AND REF(ZIGZAG(C,10,1),2)>=REF(ZIGZAG(C,10,1),3);PL20:=ZIGZAG(C,20,1);EN3:=ZIGZAG(C,20,1)>REF(ZIGZAG(C,20,1),1) AND REF(ZIGZAG(C,20,1),1)<=REF(ZIGZAG(C,20,1),2) AND REF(ZIGZAG(C,20,1),2)<=REF(ZIGZAG(C,20,1),3);EX3:=ZIGZAG(C,20,1)<REF(ZIGZAG(C,20,1),1) AND REF(ZIGZAG(C,20,1),1)>=REF(ZIGZAG(C,20,1),2) AND REF(ZIGZAG(C,20,1),2)>=REF(ZIGZAG(C,20,1),3);PL40:=ZIGZAG(C,40,1);走强1:=BARSLAST(PL5<REF(PL5,1));走弱1:=BARSLAST(PL5>REF(PL5,1));走强2:=BARSLAST(PL10<REF(PL10,1));走弱2:=BARSLAST(PL10>REF(PL10,1));走强3:=BARSLAST(PL20<REF(PL20,1));走弱3:=BARSLAST(PL20>REF(PL20,1));ZTJZ5:=IF(PL10>REF(PL10,1),COUNT(EN1,走强2),0);ZTJD5:=IF(PL10>REF(PL10,1),COUNT(EX1,走强2),0);DTJZ5:=IF(PL10<REF(PL10,1),COUNT(EN1,走弱2),0);DTJD5:=IF(PL10<REF(PL10,1),COUNT(EX1,走弱2),0);ZTJZ10:=IF(PL20>REF(PL20,1),COUNT(EN2,走强3),0);ZTJD10:=IF(PL20>REF(PL20,1),COUNT(EX2,走强3),0);DTJZ10:=IF(PL20<REF(PL20,1),COUNT(EN2,走弱3),0);DTJD10:=IF(PL20<REF(PL20,1),COUNT(EX2,走弱3),0);DRAWTEXT(EN1 AND DTJZ5=1,L*0.95,'A浪进'),COLORGREEN;DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'B浪出'),COLORGREEN;DRAWTEXT(EN2 AND ZTJZ5=1,L*0.95,'C浪进'),COLORGREEN;DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,H*1.02,'⑴空出'),COLORYELLOW; DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,L*0.98,'⑵多进'),COLORYELLOW; DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,H*1.02,'⑶空出'),COLORYELLOW; DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,L*0.98,'⑷多进'),COLORYELLOW; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.02,'⑸空出'),COLORYELLOW; DRAWTEXT(EN2 AND DTJZ10=1,L*0.93,'Ⅰ多'),COLORFF00FF;DRAWTEXT(EX2 AND DTJD10=2,H*1.01,'Ⅱ空'),COLORFF00FF;DRAWTEXT(EN3 AND ZTJZ10=1,L*0.93,'Ⅲ多进'),COLORFF00FF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.06,'①空进'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.94,'②多买补仓'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.06,'③空进'),LINETHICK3,COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,L*0.94,'④多补仓持有'),LINETHICK3,COLOR00FFFF;BUY1:=ZIGZAG(C,10,1);SELL1:=MA(BUY1,2);DRAWICON(CROSS(BUY1,SELL1),L-0.3,7);DRAWICON(CROSS(SELL1,BUY1),H+0.2,8);STICKLINE1(BUY1>SELL1 AND O>=C,C,O,-1,0),COLORRED;STICKLINE1(BUY1>SELL1 AND O>=C,L,H,0,0),COLORRED;STICKLINE1(BUY1<SELL1 AND O<=C,O,C,-1,1),COLORCYAN;STICKLINE1(BUY1<SELL1 AND O<=C,O,L,0,1),COLORCYAN;STICKLINE1(BUY1<SELL1 AND O<=C,C,H,0,1),COLORCYAN;AMOUNT:=AVPRICE*V;SAT:=(AMOUNT/C)/(HHV(AMOUNT,20)/HHV(C,20));量能饱和:=IF(SAT>1,1,SAT)*100,NODRAW;获利筹码:=WINNER(C)*100,NODRAW;N:=5;LC:=REF(CLOSE,1);RSI值:=SMA(MAX(CLOSE-LC,0),6,1)/SMA(ABS(CLOSE-LC),6,1)*100;WR10:=(HHV(HIGH,3)-CLOSE)/(HHV(HIGH,3)-LLV(LOW,3))*100;活跃:=(RSI值-WR10);活跃度比:=IF(活跃>=0,(活跃+100)/2,100-ABS((活跃-100)/2)),NODRAW;A1:=BACKSET(ISLASTBAR,PEAKBARS(C,N,1,1)+1);A2:=A1>REF(A1,1);B1:=BACKSET(ISLASTBAR,PEAKBARS(C,N,2,1)+1);B2:=B1>REF(B1,1);C1:=BACKSET(ISLASTBAR,PEAKBARS(C,N,3,1)+1);C2:=C1>REF(C1,1);A11:=BACKSET(ISLASTBAR,TROUGHBARS(C,N,1,1)+1);A21:=A11>REF(A11,1);B11:=BACKSET(ISLASTBAR,TROUGHBARS(C,N,2,1)+1);B21:=B11>REF(B11,1);C11:=BACKSET(ISLASTBAR,TROUGHBARS(C,N,3,1)+1);C21:=C11>REF(C11,1);//高辅线:DRAWLINE1(B2,H,A2,H,1),COLORBLUE;//低辅线:DRAWLINE1(B21,L,A21,L,1),COLOR0000FF;KU1:=IF(HIGH=HHV(HIGH,3),1,0);KD1:=IF(LOW=LLV(LOW,3),1,0);UL:=IF(REF(KU1,2)=1 AND REF(KU1,1)=0AND KU1=0,REF(HIGH,2),REF(HIGH,2+BARSLAST(REF(KU1,2)=1AND REF(KU1,1)=0 AND KU1=0)));DL:=IF(REF(KD1,2)=1 AND REF(KD1,1)=0 AND KD1=0,REF(LOW,2),REF(LOW,2+BARSLAST(REF(KD1,2)=1AND REF(KD1,1)=0 AND KD1=0)));HV0:=H>UL AND H>REF(H,1) ;LV0:=L<DL AND L<REF(L,1) ;GP:=BARSLAST(HV0);DP:=BARSLAST(LV0);IP:=IF(GP=0,DP,GP)>3;HV1:=HV0 AND IP AND H>=HHV(H,BARSLAST(LV0));LV1:=LV0 AND IP AND L<=LLV(L,BARSLAST(HV0));DRAWLINE(LV1,LOW,HV1, HIGH,0),COLORYELLOW,LINETHICK2;DRAWLINE(HV1,HIGH,LV1, LOW,0),COLORMAGENTA,LINETHICK2;N1:=10;N2:=10;DISP:=2;。
文华财经指标公式源码MACD绿柱面积红柱面积公式源码
/*3.3,COLOR555555;0.45,COLOR555555;R0:=1;MA5:=MA(R0,5);最小值:=LLV(LOW,10);最大值:=HHV(HIGH,25);波动线:=EMA((CLOSE-最小值)/(最大值-最小值)*4,4);平均线:EMA(波动线,3);主力攻击:=R0-(ABS(REF(R0,1))+ABS(REF(R0,2))+ABS(REF(R0,3))+ABS(REF(R0,4))+ABS(REF( R0,5))/2)>0 AND 平均线>=REF(平均线,1) AND REF(平均线,1)<REF(平均线,2);主力撤退:=R0+(ABS(REF(R0,1))+ABS(REF(R0,2))+ABS(REF(R0,3))+ABS(REF(R0,4))+ABS(REF( R0,5))/2)<0 AND 平均线<=REF(平均线,1) AND REF(平均线,1)>REF(平均线,2); DRAWTEXT(主力攻击>0,1.5,'主进'),colorred;DRAWTEXT(主力撤退<0,2.8,'主退'),colorgreen;信息:=平均线>=REF(平均线,1);走强:=CLOSE>MA(CLOSE,20)AND CLOSE>MA(CLOSE,5);走弱:=CLOSE<MA(CLOSE,10)AND CLOSE<MA(CLOSE,5);量:=VOL>MA(VOL,5);STICKLINE(平均线>=REF(平均线,1),波动线,REF(波动线,1),6,0),colorred;STICKLINE(平均线<REF(平均线,1),波动线 ,REF(波动线,1),6,0),colorgreen;D:=信息=1 AND REF(信息,1)=0 AND (REF(信息,2)+REF(信息,3)=0) AND 平均线<0.5; S:=信息=1 AND REF(信息,1)=0 AND (REF(信息,2)+REF(信息,3)=0) AND 走强=1 AND REF(走强,1)=0 AND 量=1;DD:=平均线>2 AND (信息=0 AND REF(信息,1)=1) AND (REF(信息,2)+REF(信息,3)=2); TZ:=(信息=0 AND REF(信息,1)=1) AND (REF(信息,2)+REF(信息,3)=2) AND MA5<0AND 走弱=1 AND 平均线>1;DRAWTEXT(D=1,1.75,'极底'),colorred;DRAWTEXT(S=1,平均线,'升');DRAWTEXT(DD=1,平均线,'顶');DRAWTEXT(TZ=1,平均线,'下');IF(平均线>=REF(平均线,1),平均线,DRAWNULL),colorred,LINETHICK2;IF(平均线<REF(平均线,1),平均线,DRAWNULL),colorgreen,LINETHICK2;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);WR10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10)));ZCJL:=(RSI5 - WR10);最佳买入:=(AV + ZCJL);最佳买入选股:=IF(CROSS(最佳买入,0),1,0);VAR5:=SMA(最佳买入选股,3,1);VAR6:=SMA(VAR5,3,1);VAR7:=SMA(VAR6,3,1);建仓买点:=IF(CROSS(VAR6,VAR7) AND (VAR6<40),5,0);DRAWTEXT(建仓买点,0.75,'建仓'),colorred;VAR8:=REF(CLOSE,2);会员:=SMA(MAX(CLOSE-VAR8,0),7,1)/SMA(ABS(CLOSE-VAR8),7,1)*100;逃亡:=IF(会员< REF(会员,1) AND 会员>79,会员,0);DRAWTEXT(逃亡,3.1,'逃'),coloryellow;DRAWTEXT(88>0 AND REF(O,1)/REF(C,1)>1.04 AND REF(L,1)<=688 AND O>REF(C,1)AND C<REF(O,1)AND C/O>=1.01,1,'见底'),colorlired;DRAWTEXT(C-O>=0 AND O/L>1.05 AND L<=LLV(L,20),1,'绝底'),colorred;VAR11:=REF(LOW,1);VAR12:=SMA(ABS(LOW-VAR11),3,1)/SMA(MAX(LOW-VAR11,0),3,1)*100;VAR13:=EMA(IF(CLOSE*1.2,VAR12*10,VAR12/10),3);VAR14:=LLV(LOW,38);VAR15:=HHV(VAR13,38);VAR16:=IF(LLV(LOW,90),1,0);VAR17:=EMA(IF(LOW<=VAR14,(VAR13+VAR15*2)/2,0),3)/618*VAR16;CDXS:=HHV(VAR17,0)/2.6;STICKLINE(VAR17,0.53,VAR17/CDXS+0.53,0.6,0),colorwhite;HUA:=(CLOSE - LLV(LOW,14)) / (HHV(HIGH,14) - LLV(LOW,14)) * 1.2 * CLOSE;NV1:=EMA(HUA,4);NV2:=EMA(HUA,8);DRAWICON(CROSS(NV1,NV2) AND CLOSE/OPEN>1.05,0.5,1);DRAWICON(CROSS(NV2,NV1) AND COUNT(CROSS(NV1,NV2) AND CLOSE/OPEN>1.05 ,20) ,3.2,2);HUA2:=SMA(MAX(CLOSE-REF(CLOSE,1),0),16,2)/SMA(ABS(CLOSE/REF(CLOSE,1)),16,2)* 100;XIAN:=SMA(HUA2,3,1);NV3:=SMA(XIAN,3,1);XINV:=3*XIAN-2*NV3;买入条件:=CROSS(XINV,NV3);卖出条件:=CROSS(NV3,XINV);DRAWICON( 卖出条件,3.3,2),coloryellow;DRAWICON(买入条件,0.4,222),colorwhite;HXN:=IF(CLOSE/REF(CLOSE,1)>1.05 AND HIGH/CLOSE<1.01 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);DRAWTEXT(HXN>90 AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1) AND COUNT(HXN>90,30)=1,平均线-0.25, '见涨'),,colorlired;HXJZ:=MA((2*CLOSE+HIGH+LOW)/4,5);BZTD:=HXJZ*89/100;DRAWTEXT(CROSS(LOW,BZTD),1.25,'必涨'),colorred;花:=EMA(SLOPE(1,1)+C,3),colorred;女:=EMA(SLOPE(1,1)+C,7),colorblue;STICKLINE(花>女 ,0.5,0.53,6,0) ,colorred;STICKLINE(花<=女 ,0.5,0.53,6,0),colorgreen;RJ:=1;{好}RSI_1:=SMA(MAX(CLOSE-LC,0),3,1)/SMA(ABS(CLOSE-LC),3,1)*100;RSI_2:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;RSI_3:=SMA(MAX(CLOSE-LC,0),8,1)/SMA(ABS(CLOSE-LC),8,1)*100;相对强弱:=0.5*RSI_1+0.31*RSI_2+0.19*RSI_3;WAVE_1:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),3,1);WAVE_2:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),5,1);WAVE_3:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),8,1);短线波段:=0.5*WAVE_1+0.31*WAVE_2+0.19*WAVE_3;风险系数:=0.5*相对强弱+0.5*短线波段,coloryellow;CD1:=IF(风险系数<20 AND CLOSE>OPEN AND RJ>0,1,0);CD2:=IF(风险系数<20 AND LOW>=REF(LOW,1) AND CLOSE>LOW AND RJ>0,1,0);CD3:=IF(REF(风险系数,1)<20 AND 风险系数>REF(风险系数,1),1,0);SIGNALBUY:=(CD1=1 OR CD2=1 OR CD3=1);CD:=(SIGNALBUY AND COUNT(SIGNALBUY,3)=1);DRAWTEXT(CD,0.5,'抄底'),COLOR0099FF;DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100;DEA:=EMA(DIF,9);RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,9,3);D_:=SMA(K,9,3);GZ:=CROSS(DIF,DEA) AND CROSS(K,D_);DRAWTEXT(GZ,2,'金叉'),COLOR0099FF; */M:=10;MM:=9*M;SHORT:=MM*4/3;LONG:=MM*26/9;DIF:1000*(EMA(CLOSE,SHORT)-EMA(CLOSE,LONG))/ABS(EMA(CLOSE,SHORT)); MACD:EMA(DIF,MM),COLOR58FF58;DEF:2*(DIF-MACD),COLORFFFF00,NODRAW;STICKLINE1(DEF>=0 AND DEF>=REF(DEF,1),0,DEF,6,1),COLOR6058FF;STICKLINE1(DEF>=0 AND DEF< REF(DEF,1),0,DEF,6,0),COLOR6058FF;STICKLINE1(DEF<0 AND DEF>=REF(DEF,1),0,DEF,6,1),COLORFFFF00;STICKLINE1(DEF<0 AND DEF< REF(DEF,1),0,DEF,6,0),COLORFFFF00;PARTLINE(DIF<1000,0,COLORLIGHTRED);多头趋势:=IF(DIF>=0 AND MACD>=0 OR (DIF<0 AND MACD>=0),1,0);空头趋势:=DIF<0 AND MACD<0 OR (DIF>=0 AND MACD<0);缩头:=IF(DEF>0 AND REF(DEF,1)>REF(DEF,2) AND DEF< REF(DEF,1),1,0);缩脚:=IF(DEF<0 AND REF(DEF,1)< REF(DEF,2) AND DEF>REF(DEF,1),1,0);阻力:=IF(CROSS(CLOSE,MA(CLOSE,20)) OR CROSS(CLOSE,MA(CLOSE,60)),1,0);支撑:=IF(CROSS(MA(CLOSE,20),CLOSE) OR CROSS(MA(CLOSE,60),CLOSE),1,0);做多:=IF(CROSS(MACD,DIF) AND DIF>0 AND MACD>0,1,0);放空:=IF(CROSS(DIF,MACD) AND DIF<0 AND MACD<0,1,0);PARTLINE(DIF,DIF<1000,COLORCCFFFF),LINETHICK2;PARTLINE(MACD,MACD<1000,COLOR58FF58);BV:=SUM(DEF,0);BA:=IF(MAX(BV,REF(BV,2))<REF(BV,1) OR MIN(BV,REF(BV,2))>REF(BV,1),1,0);BC:=BARSLAST(BA)+1;SMACD:=BV-REF(BV,BC);V AR3:=IF(DEF>0,HHV(ABS(DEF),BC),LLV(DEF,BC));V AR4:=(DEF)/20;//{图形比例缩小1/20,可修改}V AR5:=SMACD;DRAWTEXT(REF(V AR4,1)>0 && V AR4<=0 ,REF(V AR3,1),'+REF(VAR5,1)'),COLORGREEN; DRAWTEXT(REF(V AR4,1)<0 && V AR4>=0 ,REF(VAR3,1),'+REF(ABS(V AR5),1)'),COLORFF00FF;DRAWTEXT(BARSTA TUS=2 && V AR4<0,REF(VAR3,1),'+ABS(V AR5)'),ALIGN2,COLORFF00FF;DRAWTEXT(BARSTA TUS=2 && V AR4>0,REF(VAR3,1),'+V AR5'),ALIGN2,COLORGREEN; M1:=REF(DEF,1);JC := MACD-DIF;绿柱面积:IF (DEF<0,SUM(DEF,BARSLAST(JC<0)),0),NODRAW,COLORGREEN;红柱面积:IF (DEF>0,SUM(DEF,BARSLAST(JC>0)),0),NODRAW,COLORRED;。
文华财经指标源码
阳光心情MA1:EMA(CLOSE,6),COLORWHITE;MA2:EMA(CLOSE,25),COLORRED;STICKLINE(MA1>MA2,MA1,MA2,COLORMAGENTA,0) ; STICKLINE(MA2>MA1,MA1,MA2,COLORGREEN,0);DRAWTEXT(MA2-MA1>0&&MA1/LOW>1.15,LOW,'▼'); DRAWTEXT(MA1-MA2>0&&HIGH/MA1>1.15,HIGH,'▲');无敌MACD文华版DIFF :EMA(CLOSE,12) - EMA(CLOSE,26);DEA : EMA(DIFF,9);2*(DIFF-DEA),COLORSTICK;L1:=(EMA(CLOSE,8)- EMA(CLOSE,13));L2:=EMA(L1,13);DRAWTEXT(CROSS(L1,L2),DIFF ,'买'),COLORRED;DRAWTEXT(CROSS(L2,L1),DIFF,'卖'),COLORGREEN;稳坐钓鱼台ZJX:MA(C,61)-2*STD(C,71),COLORRED;CJX:MA(C,125)-2*STD(C,145),COLORMAGENTA;A:(EMA(C,13)+MA(C,26)+MA(C,52))/3,COLORYELLOW;TMP:=OPEN-CLOSE;DRAWLINE(TMP>0.00001,HIGH,TMP>0.00001,OPEN,COLORCYAN);DRAWLINE(TMP>0.00001,LOW,TMP>0.00001,CLOSE,COLORCYA N);DRAWLINE(TMP<-0.00001,HIGH,TMP<-0.00001,CLOSE,COLORRED); DRAWLINE(TMP<-0.00001,LOW,TMP<-0.00001,OPEN,COLORRED);DRAWLINE(ABS(TMP)<0.00001,LOW,ABS(TMP)<0.00001,OPEN,COLORWHITE);DRAWLINE(ABS(TMP)<0.00001,HIGH,ABS(TMP)<0.00001,OPEN,COLORWHITE);STICKLINE(TMP>0,OPEN,CLOSE,COLORCYAN,0);STICKLINE(TMP<=0,OPEN,CLOSE,COLORRED,1);稳赢趋势HH:=HHV(HIGH,13);LL:=LLV(LOW,13);HH1:=BARSLAST((HH>REF(HH,1)));LL1:=BARSLAST((LL<REF(LL,1)));A:=IFELSE((HH1 <LL1),1,IFELSE((HH1>LL1),-1,0));AA:IFELSE(A>=0,LL,HH),COLORYELLOW;DRAWTEXT(CROSS(HH1,LL1),HH,'开空');DRAWTEXT(CROSS(LL1,HH1),LL,'开多');DRAWLINE(HH1>LL1,HIGH,HH1>LL1,OPEN,COLORCYAN);DRAWLINE(HH1>LL1,LOW,HH1>LL1,CLOSE,COLORCYAN); DRAWLINE(HH1<=LL1,HIGH,HH1<=LL1,CLOSE,COLORRED);DRAWLINE(HH1<=LL1,LOW,HH1<=LL1,OPEN,COLORRED);STICKLINE(HH1>LL1,OPEN,CLOSE,COLORCYAN,0);STICKLINE(HH1<=LL1,OPEN,CLOSE,COLORRED,1);天机均线VV:=(3*C+H+L+O)/6;DUAN:(8*VV+7*REF(VV,1)+6*REF(VV,2)+5*REF(VV,3)+4*REF(VV,4)+3*REF(VV,5)+2*REF(VV,6)+REF(VV,7))/36,COLORWHITE; ZONG:(LLV(DUAN,3)+LLV(DUAN,5)+LLV(DUAN,8))/3,COLORYELL OW;顺势有位PARTLINE(CLOSE>0,MA(CLOSE,5),COLORWHITE);PARTLINE(CLOSE>0,MA(CLOSE,6),COLORWHITE);PARTLINE(CLOSE>0,MA(CLOSE,7),COLORWHITE);PARTLINE(CLOSE>0,MA(CLOSE,8),COLORWHITE);PARTLINE(CLOSE>0,MA(CLOSE,9),COLORWHITE);PARTLINE(CLOSE>0,MA(CLOSE,10),COLORWHITE);PARTLINE(CLOSE>0,MA(CLOSE,25),COLORRED);PARTLINE(CLOSE>0,MA(CLOSE,26),COLORRED);PARTLINE(CLOSE>0,MA(CLOSE,27),COLORRED);PARTLINE(CLOSE>0,MA(CLOSE,28),COLORRED);PARTLINE(CLOSE>0,MA(CLOSE,29),COLORRED);PARTLINE(CLOSE>0,MA(CLOSE,30),COLORRED);拾金图STICKLINE((EMA(CLOSE,13)>=EMA(CLOSE,34)),LOW,HIGH,COL ORRED,0);STICKLINE((EMA(CLOSE,13) >= EMA(CLOSE,34)),OPEN,CLOSE,COLORRED,0);STICKLINE((EMA(CLOSE,13) <EMA(CLOSE,34)),LOW,HIGH,COL ORGREEN,0);STICKLINE((EMA(CLOSE,13) < EMA(CLOSE,34)),OPEN,CLOSE,COLORGREEN,0);LL1:=EMA(CLOSE,N);HH1:=EMA(CLOSE,N1);T:=IFELSE(HH1>LL1,1,-1);G:=IFELSE(HH1>LL1,HH1,LL1);DRAWLINE(T=1&&REF(T,1)=1,G,T=1&&REF(T,1)=1,REF(G,1),COLO RGREEN);DRAWLINE(T=-1&&REF(T,1)=-1,G,T=-1&&REF(T,1)=-1,REF(G,1),COLORR ED);DRAWSL(T=1,G,0,1,0,COLORGREEN);DRAWSL(T=-1,G,0,1,0,COLORRED);DRAWTEXT(CROSS(EMA(CLOSE,34),EMA(CLOSE,13)),HIGH,'S'); DRAWTEXT(CROSS(EMA(CLOSE,13),EMA(CLOSE,34)),LOW,'B'); DRAWNUMBER(CROSS(EMA(CLOSE,34),EMA(CLOSE,13)),LOW,CL OSE,0,COLORGREEN);DRAWNUMBER(CROSS(EMA(CLOSE,13),EMA(CLOSE,34)),HIGH,CLOSE,0,COLORRED);上帝主图TMP:=OPEN-CLOSE;DRAWLINE(TMP>0.00001,HIGH,TMP>0.00001,OPEN,COLORCYAN);DRAWLINE(TMP>0.00001,LOW,TMP>0.00001,CLOSE,COLORCYAN);DRAWLINE(TMP<-0.00001,HIGH,TMP<-0.00001,CLOSE,COLORRED); DRAWLINE(TMP<-0.00001,LOW,TMP<-0.00001,OPEN,COLORRED);DRAWLINE(ABS(TMP)<0.00001,LOW,ABS(TMP)<0.00001,OPEN,COLORWHITE);DRAWLINE(ABS(TMP)<0.00001,HIGH,ABS(TMP)<0.00001,OPEN,COL ORWHITE);STICKLINE(TMP>0,OPEN,CLOSE,COLORCYAN,0);STICKLINE(TMP<=0,OPEN,CLOSE,COLORRED,1);A1:=(LOW+HIGH+CLOSE)/3;B1:MA(A1,3),COLORWHITE;C1:HHV(B1,5),COLORGREEN;D1:HHV(B1,15),COLORMAGENTA;E1:LLV(B1,5),COLORYELLOW; F1:LLV(B1,15),COLORCYAN;。
文华财经软件指标源码公式最准不漂移指标公式源码
/*N=9,M1=3,M2=3}RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:=SMA(RSV,M1,1),LINETHICK2,COLORWHITE;D:=SMA(K,M2,1),COLORYELLOW;量能:=3*K-2*D,LINETHICK2;RSIE:=EMA(量能,3);DIFF : EMA(RSIE,12) - EMA(RSIE,26);BBDIFF:=DIFF-REF(DIFF,1);DEA : EMA(DIFF,9);BBDEA:=DEA-REF(DEA,1);MACD : 2*(DIFF-DEA), COLORSTICK;STICKLINE(MACD<REF(MACD,1)AND MACD>0,0,MACD,2,0),COLORFFFF00; STICKLINE(MACD<REF(MACD,1)AND MACD<0,0,MACD,2,0),COLOR00FF00; STICKLINE(MACD>REF(MACD,1)AND MACD<0,0,MACD,2,0),COLOR0099FF; STICKLINE(MACD>REF(MACD,1)AND MACD>0,0,MACD,2,0),COLORRED; 0,COLORFF8855,LINETHICK2;IF(DIFF>DEA,DIFF,DRAWNULL),COLORRED,LINETHICK2;IF(DEA>REF(DEA,1),DEA,DRAWNULL),COLORMAGENTA;DRAWICON(CROSS(DIFF,DEA),DEA,1);DRAWICON(CROSS(DEA,DIFF),DEA,2);DRAWBAND(DIFF,RGB(255,105,180),DEA,RGB(34,139,34));低位金叉:=CROSS(DIFF,DEA) AND DIFF<-0.1;STICKLINE(低位金叉,0,-1.5,2,0),COLORFFFF00;DRAWTEXT(低位金叉,-1.5,' 低位金叉'),COLORFFFF00;JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));二次金叉:=CROSS(DIFF,DEA) AND DEA<0 AND COUNT(JCCOUNT=2,21)=1; STICKLINE(二次金叉,0,-1,5,0),COLORFF00FF;DRAWICON(二次金叉,DEA*1.2,11) ;VAR3:=(2*CLOSE+HIGH+LOW)/4;VAR4:=LLV(LOW,34);VAR5:=HHV(HIGH,34);QYYJ:=EMA((VAR3-VAR4)/(VAR5-VAR4)*100,13);RQQ:=EMA(0.667*REF(QYYJ,1)+0.333*QYYJ,2);DRAWTEXT(CROSS(QYYJ,RQQ) AND QYYJ<10,L-0.2,'低吸'),COLORCYAN;AR26R:=(CLOSE-LLV(LOW,27))/(HHV(HIGH,27)-LLV(LOW,27))*100;VAR28R:=SMA(VAR26R,3,1);TTWWW:= SMA(VAR28R,3,1);KUIO:= SMA(TTWWW,3,1);DRAWTEXT(TTWWW<7 AND KUIO<7 AND TTWWW>REF(TTWWW,1),L-1,'底买'),COLORGREEN;VARU:=((CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100+(CLOSE-MA(CLOSE,24))/MA(CLOSE,2 4)*100+(CLOSE-MA(CLOSE,32))/MACLOSE,32)*100)/3;DRAWTEXT(VARU<-22 AND VARU> REF(VARU,1),L,'大底'),COLORYELLOW;VAR2TX:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;VAR3TX:=SMA(VAR2TX,4,1);VAR4TX:=SMA(VAR3TX,2,1);VAR5TX:=SMA(VAR4TX,2,1);DRAWTEXT(CROSS(VAR4TX,VAR5TX) AND VAR4TX<25 AND REF(C<O,1),L-0.1,'短波'),COLORWHITE;VAR01F:=(CLOSE-LLV(LOW,36))/(HHV(HIGH,36)-LLV(LOW,36))*100;VAR02F:=SMA(VAR01F,3,1);VAR03F:=SMA(VAR02F,3,1);VAR04F:=SMA(VAR03F,3,1);VAR06F:=CROSS(VAR03F,VAR04F) AND VAR03F<25;VAR07F:=VAR06F AND VOL>REF(VOL,1)*2 AND VOL>REF(MA(VOL,5),1)*2; DRAWTEXT(VAR07F,L-0.2,'波段短线'),COLORYELLOW;DRAWTEXT(二次金叉,-1,' 二次金叉'),COLORFF00FF;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));底背离:=REF(CLOSE,A1+1)>CLOSE AND DIFF>REF(DIFF,A1+1) AND CROSS(DIFF,DEA);STICKLINE(底背离,0,1.5,3,0),COLOR00FF00;DRAWLINE(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2; DRAWTEXT(底背离,2,' 底背离'),COLOR00FF00;A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));顶背离:=REF(CLOSE,A2+1)<CLOSE AND REF(DIFF,A2+1)>DIFF AND CROSS(DEA,DIFF);STICKLINE(顶背离,0,2,3,0),COLORFF8855;DRAWLINE(A2=0,DEA,顶背离,DEA,0),COLORFF8855,*/DIF1:=EMA(CLOSE,12) - EMA(CLOSE,26);DEA1:=EMA(DIF1,9);MACD1:=2*(DIF1-DEA1),STICK;MACD2:=EMA(MACD1,3);STICKLINE1(MACD1>MACD2 AND MACD1>0,0,MACD1,1,0),COLORRED;STICKLINE1(MACD1>MACD2 AND MACD1<0,0,MACD1,1,0),COLORGREEN;STICKLINE1(MACD1<MACD2,0,MACD1,1,0),COLORCBCBC0;STICKLINE1(MACD1>=0 OR MACD1<=0,0,0,50,1),COLORWHITE;DIF:DIF1,COLOR33FF33;DEA:DEA1,COLORYELLOW;MACD:MACD1,NODRAW,COLORMAGENTA;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1),COLORWHITE;D:=SMA(K,3,1),COLORYELLOW;J:=3*K-2*D,COLORFF00FF;MM:=IF(MACD< 0,MACD,0);JJ:=MM> REF(MM,1);ZZ:=REF(JJ,1)=1;准备:=(JJ AND ZZ)*DEA;JH:=HHV(MAX(K,MAX(D,J)),250);DH:=HHV(MAX(DIF,DEA),250);SH:=INTPART(JH/DH)/2;DIFF50:=SH*DIF+50,COLORFFFF00;DEA50:=SH*DEA+50,COLORBLUE;缩头:=IF(1.5*(DIFF50-DEA50)>0 AND REF(1.5*(DIFF50-DEA50),1)>REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)< REF(1.5*(DIFF50-DEA50),1),1,0);缩脚:=IF(1.5*(DIFF50-DEA50)<0 AND REF(1.5*(DIFF50-DEA50),1)< REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)>REF(1.5*(DIFF50-DEA50),1),1,0);杀多:=IF(1.5*(DIFF50-DEA50)<0 AND REF(1.5*(DIFF50-DEA50),1)> REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)<REF(1.5*(DIFF50-DEA50),1),1,0);诱空:=IF(1.5*(DIFF50-DEA50)>0 AND REF(1.5*(DIFF50-DEA50),1)< REF(1.5*(DIFF50-DEA50),2) AND 1.5*(DIFF50-DEA50)>REF(1.5*(DIFF50-DEA50),1),1,0);阻力:=IF(CROSS(C,MA(C,20)) OR CROSS(C,MA(C,60)),10,0);DRAWTEXT(FILTER(杀多,3) AND 杀多,MACD+0.1,'杀多'),COLORFF00FF;DRAWTEXT(FILTER(缩头,3) AND 缩头,MACD+0.1,'卖'),COLORFF00FF;DRAWTEXT(FILTER(诱空,3) AND 诱空,MACD+0.1,'?洗'),COLOR00FF00;DRAWTEXT(FILTER(缩脚,3) AND 缩脚,MACD-0.1,'买'),COLOR00FF00;IF(MACD>=REF(MACD,1),DIF1,NULL),COLORRED,LINETHICK2;。
文华财经软件-期货界最准确指标公式源码
文华财经软件-期货界最准确指标公式源码简介本文档提供了文华财经软件中期货界最准确指标的源码。
这些指标公式经过独立决策而非用户协助,旨在发挥我作为法律硕士的优势,并遵循简单策略,避免法律复杂性。
所有引用内容均可确认。
目标本文档的目标是提供文华财经软件中期货界最准确指标的源码,以便用户能够使用这些源码进行技术分析和预测。
源码以下是文华财经软件中几个期货界最准确指标的源码示例:1. 移动平均线指标def moving_average(data, period):return data.rolling(window=period).mean()2. 相对强弱指标(RSI)def rsi(data, period):delta = data.diff()up, down = delta.copy(), delta.copy()up[up < 0] = 0down[down > 0] = 0average_gain = up.rolling(window=period).mean()average_loss = abs(down.rolling(window=period).mean())rs = average_gain / average_lossrsi = 100 - (100 / (1 + rs))return rsi3. 布林带指标def bollinger_bands(data, period, std):mid_band = data.rolling(window=period).mean()upper_band = mid_band + std * data.rolling(window=period).std() lower_band = mid_band - std * data.rolling(window=period).std() return mid_band, upper_band, lower_band4. 随机指标(KDJ)def kdj(data, period):lowest_low = data.rolling(window=period).min()highest_high = data.rolling(window=period).max()rsv = (data - lowest_low) / (highest_high - lowest_low) * 100k = rsv.rolling(window=3).mean()d = k.rolling(window=3).mean()j = 3 * k - 2 * dreturn k, d, j请注意,以上仅是示例源码,实际使用时需要适应具体的数据来源和参数设置。
文华财经指标源码
文华财经指标源码下面是一个示例的文华财经指标源码,用于计算移动平均线(MA)指标。
该指标适用于股票等金融数据的分析和预测。
```pythonimport numpy as np#计算移动平均线def calculate_ma(data, period):ma = np.zeros(len(data))for i in range(len(data)):if i < period:ma[i] = np.mean(data[:i+1])else:ma[i] = np.mean(data[i-period+1:i+1])return ma#示例输入数据data = [10, 12, 15, 14, 13, 11, 9, 10]#计算5日移动平均线ma_5 = calculate_ma(data, 5)print("5日移动平均线:", ma_5)#计算10日移动平均线ma_10 = calculate_ma(data, 10)print("10日移动平均线:", ma_10)#计算20日移动平均线ma_20 = calculate_ma(data, 20)print("20日移动平均线:", ma_20)```说明:1. 首先,我们定义了一个`calculate_ma`函数,该函数接受两个参数:`data`为输入数据,`period`为移动平均线的周期。
该函数通过遍历数据并计算平均值来计算移动平均线。
返回一个包含移动平均线数值的NumPy数组。
2. 我们定义了一个示例的输入数据`data`,其中包含了8个价格数据。
3. 接下来,我们使用`calculate_ma`函数计算了5日、10日和20日的移动平均线。
4.最后,我们将计算得到的每个移动平均线打印出来。
这只是一个示例的源码,你可以根据自己的需求进行修改和扩展。
文华财经提供了丰富的金融指标计算工具,可以根据你的需要进行选取和应用。
文华财经精品-最准期货指标公式源码
文华财经精品-最准期货指标公式源码文华财经精品是一款专业的财经软件,提供了丰富的期货指标公式源码。
这些指标公式是通过大量的数据分析和实践验证得出的,具有较高的准确性和可靠性。
本文将介绍一些最准期货指标公式的源码,帮助用户更好地利用文华财经精品进行期货交易分析。
1. 移动平均线(Moving Average)移动平均线是一种常用的趋势指标,能够有效地反映出期货价格的变动趋势。
以下是计算简单移动平均线的源码:def moving_average(data, period):ma = []for i in range(period, len(data)):ma.append(sum(data[i-period:i]) / period)return ma2. 相对强弱指标(Relative Strength Index)相对强弱指标是一种衡量期货价格强弱程度的指标,可用于判断市场的超买超卖情况。
以下是计算相对强弱指标的源码:def relative_strength_index(data, period):rsi = []for i in range(period, len(data)):up_sum = 0down_sum = 0for j in range(i-period, i):diff = data[j+1] - data[j]if diff > 0:up_sum += diffelse:down_sum += abs(diff)rs = up_sum / down_sum if down_sum != 0 else 0rsi.append(100 - (100 / (1 + rs)))return rsi3. 随机指标(Stochastic Oscillator)随机指标是一种衡量期货价格高低位的指标,可用于判断市场的超买超卖情况。
以下是计算随机指标的源码:def stochastic_oscillator(data, period):stoch = []for i in range(period, len(data)):highest_high = max(data[i-period:i])lowest_low = min(data[i-period:i])stoch.append((data[i] - lowest_low) / (highest_high - lowest_low) * 100)return stoch以上是文华财经精品中一些最准期货指标的源码示例。
文华财经指标公式源码文华期货软件指标公式公式源码
/*拉升力:=(CLOSE-LLV(LOW,28))/(HHV(HIGH,30)-LLV(LOW,36))*0.6*CLOSE; 拉升力A:=SMA(拉升力,6.3,1);波峰波谷:SMA(拉升力A,3,1),COLORFF00FF;拉升力B:=3*拉升力A-2.1*波峰波谷;空方:=3*波峰波谷-1* 拉升力A;做空:IF(空方>拉升力B,拉升力B,空方),LINETHICK2,COLOR00FF00;做空周期:HHV(做空,21),COLORBLUE,LINETHICK2;多头:IF(做空>=REF(做空,1) ,做空,DRAWNULL),COLORRED,LINETHICK3; DRAWICON(做空>=REF(做空,1) AND REF(做空,1)<REF(做空,2),做空,23);空头:IF(做空<REF(做空,1),做空,DRAWNULL),COLORGREEN,LINETHICK3; {DRAWICON(做空<=REF(做空,1) AND REF(做空,1)>REF(做空,2),做空,19);} 短线:(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*20,LINETHICK0,COLORWHITE; 中线:(CLOSE-MA(CLOSE,4))/MA(CLOSE,4)*20,LINETHICK0,COLORYELLOW;红柱:SMA(短线,3,1),LINETHICK0,COLOR0000FF;蓝柱:SMA(中线,3,1),COLORSTICK,COLORFFFF00;{红柱}STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,2,0),COLOR888800; STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,1.5,0),COLORAAAA00; STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,0.8,0),COLORDDDD00; STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,0.3,0),COLORFFFF00; STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,2,0),COLOR000088; STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,1.5,0),COLOR0000AA; STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,0.8,0),COLOR0000DD; STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,0.3,0),COLOR0000FF; STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,2,0),COLOR008800; STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,1,0),COLOR00AA00; STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,0.8,0),COLOR00DD00; STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,0.3,0),COLOR00FF00;{蓝柱}STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,2,0),COLOR880088;STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,1.5,0),COLORAA00AA; STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,0.8,0),COLORDD00DD; STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,0.3,0),COLORFF00FF; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,2,0),COLOR888800; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,1.5,0),COLORAAAA00; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,0.8,0),COLORDDDD00; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,0.3,0),COLORFFFF00; STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,2,0),COLOR009999; STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,1.5,0),COLOR00BBBB; STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,0.8,0),COLOR00DDDD; STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,0.3,0),COLOR00FFFF;VAR200:=(CLOSE-LLV(LOW,20))/(HHV(HIGH,20)-LLV(LOW,20))*100;VAR300:=SMA(SMA(VAR200,3,1),3,1)/28.57;VAR400:=EMA(VAR300,5);B1:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;B2:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;B3:=(CLOSE-MA(CLOSE,20))/MA(CLOSE,20)*100;B4:=(CLOSE-MA(CLOSE,30))/MA(CLOSE,30)*100;M:=(LOW+HIGH+CLOSE)/3;HD:=(HIGH - REF(HIGH,1));LD:=(REF(LOW,1) - LOW);DMP:=(SUM(IF(((HD>0) AND (HD>LD)),HD,0),5) );DMM:=SUM(IF(((LD>0) AND (LD>HD)),LD,0),5);STX:=(((DMP)*100)/TR);FZX:=((DMM*100)/TR);XXX:=(MA(((ABS((FZX-STX))/(FZX+STX)) * 100),3));WJDB:=IF(((XXX>88) AND (STX<5.8)),25,0);DRAWICON(WJDB=25,-5,9);STICKLINE(B1<-7,5,0,3,0),COLOR0099FF;STICKLINE(B2<-9,10,0,2.2,0),COLOR0066FF;STICKLINE(B3<-11,15,0,1.4,0),COLOR0033FF;STICKLINE(B4<-13,20,0,0.6,0),COLOR0000FF;DRAWTEXT(B1<-7 AND B2<-9 AND B3<-11 AND B4<-13,18,'超跌'),COLORYELLOW; STICKLINE(B1>10,0,-5,3,0),COLORFFFF33;STICKLINE(B2>15,0,-10,2.2,0),COLORFFCC00;STICKLINE(B3>20,0,-15,1.4,0),COLORFF9933;STICKLINE(B4>25,0,-20,0.6,0),COLORFF6633;DRAWTEXT(B1>10 AND B2>15 AND B3>20 AND B4>25,-18,'预警'),COLORYELLOW; BL:(B1+B2+B3+B4)/2,LINETHICK2,COLORFF00FF;BLMA:MA(BL,6),LINETHICK2,COLORCC0000;DRAWTEXT(BL>50,BL-2,'◆谨慎'),COLORYELLOW;DRAWTEXT(BL<-35,BL+2,'◆关注'),COLORYELLOW;操盘:=3*VAR300-2*VAR400;A1:=CROSS(操盘,VAR300) AND VAR300<2.1 AND C>O;STICKLINE(A1,5,0,4,0),COLOR770077;STICKLINE(A1,5,0,3,0),COLOR990099;STICKLINE(A1,5,0,2,0),COLORBB00BB;STICKLINE(A1,5,0,1,0),COLORDD00DD;STICKLINE(A1,5,0,0.3,0),COLORFF00FF;DRAWTEXT(A1,5.2,'全仓买入'),COLORRED;*/S:=CROSS(CLOSE,EMA(HIGH,30));X:=CROSS(EMA(LOW,30),CLOSE);WS:=BARSLAST(S)+1;WX:=BARSLAST(X)+1;SS:=CROSS(SUM(S,WX),0.5);XX:=CROSS(SUM(X,WS),0.5);STICKLINE1(CLOSE>EMA(HIGH,30),EMA(HIGH,30),EMA(LOW,30),1,1),COLORRED; STICKLINE1(CLOSE<EMA(LOW,30),EMA(LOW,30),EMA(HIGH,30),1,1),COLORGREEN; STICKLINE1(CLOSE>EMA(HIGH,150),EMA(HIGH,150),EMA(LOW,150),1,1),COLORMAGENTA; STICKLINE1(CLOSE<EMA(LOW,150),EMA(LOW,150),EMA(HIGH,150),1,1),COLORBLUE; PARTLINE1(CLOSE>EMA(HIGH,30),EMA(HIGH,30)),COLORRED;PARTLINE1(CLOSE<EMA(HIGH,30),EMA(HIGH,30)),COLORGREEN;PARTLINE1(CLOSE>EMA(LOW,30),EMA(LOW,30)),COLORRED;PARTLINE1(CLOSE<EMA(LOW,30),EMA(LOW,30)),COLORGREEN;PARTLINE1(CLOSE>EMA(HIGH,150),EMA(HIGH,150)),COLORMAGENTA;PARTLINE1(CLOSE<EMA(HIGH,150),EMA(HIGH,150)),COLORBLUE;PARTLINE1(CLOSE>EMA(LOW,150),EMA(LOW,150)),COLORMAGENTA;PARTLINE1(CLOSE<EMA(LOW,150),EMA(LOW,150)),COLORBLUE;DRAWTEXT(SS,LOW*0.965,'B'),COLORRED;DRAWICON(SS,LOW*0.98,8);DRAWTEXT(XX,HIGH*1.035,'S'),COLORGREEN;DRAWICON(XX,HIGH*1.02,9);。
文华财经指标公式源码MACD绿柱面积红柱面积公式源码
/*3.3,COLOR555555;0.45,COLOR555555;R0:=1;MA5:=MA(R0,5);最小值:=LLV(LOW,10);最大值:=HHV(HIGH,25);波动线:=EMA((CLOSE-最小值)/(最大值-最小值)*4,4);平均线:EMA(波动线,3);主力攻击:=R0-(ABS(REF(R0,1))+ABS(REF(R0,2))+ABS(REF(R0,3))+ABS(REF(R0,4))+ABS(REF( R0,5))/2)>0 AND 平均线>=REF(平均线,1) AND REF(平均线,1)<REF(平均线,2);主力撤退:=R0+(ABS(REF(R0,1))+ABS(REF(R0,2))+ABS(REF(R0,3))+ABS(REF(R0,4))+ABS(REF( R0,5))/2)<0 AND 平均线<=REF(平均线,1) AND REF(平均线,1)>REF(平均线,2); DRAWTEXT(主力攻击>0,1.5,'主进'),colorred;DRAWTEXT(主力撤退<0,2.8,'主退'),colorgreen;信息:=平均线>=REF(平均线,1);走强:=CLOSE>MA(CLOSE,20)AND CLOSE>MA(CLOSE,5);走弱:=CLOSE<MA(CLOSE,10)AND CLOSE<MA(CLOSE,5);量:=VOL>MA(VOL,5);STICKLINE(平均线>=REF(平均线,1),波动线,REF(波动线,1),6,0),colorred;STICKLINE(平均线<REF(平均线,1),波动线 ,REF(波动线,1),6,0),colorgreen;D:=信息=1 AND REF(信息,1)=0 AND (REF(信息,2)+REF(信息,3)=0) AND 平均线<0.5; S:=信息=1 AND REF(信息,1)=0 AND (REF(信息,2)+REF(信息,3)=0) AND 走强=1 AND REF(走强,1)=0 AND 量=1;DD:=平均线>2 AND (信息=0 AND REF(信息,1)=1) AND (REF(信息,2)+REF(信息,3)=2); TZ:=(信息=0 AND REF(信息,1)=1) AND (REF(信息,2)+REF(信息,3)=2) AND MA5<0AND 走弱=1 AND 平均线>1;DRAWTEXT(D=1,1.75,'极底'),colorred;DRAWTEXT(S=1,平均线,'升');DRAWTEXT(DD=1,平均线,'顶');DRAWTEXT(TZ=1,平均线,'下');IF(平均线>=REF(平均线,1),平均线,DRAWNULL),colorred,LINETHICK2;IF(平均线<REF(平均线,1),平均线,DRAWNULL),colorgreen,LINETHICK2;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);WR10:=((100 * (HHV(HIGH,10) - CLOSE)) / (HHV(HIGH,10) - LLV(LOW,10)));ZCJL:=(RSI5 - WR10);最佳买入:=(AV + ZCJL);最佳买入选股:=IF(CROSS(最佳买入,0),1,0);VAR5:=SMA(最佳买入选股,3,1);VAR6:=SMA(VAR5,3,1);VAR7:=SMA(VAR6,3,1);建仓买点:=IF(CROSS(VAR6,VAR7) AND (VAR6<40),5,0);DRAWTEXT(建仓买点,0.75,'建仓'),colorred;VAR8:=REF(CLOSE,2);会员:=SMA(MAX(CLOSE-VAR8,0),7,1)/SMA(ABS(CLOSE-VAR8),7,1)*100;逃亡:=IF(会员< REF(会员,1) AND 会员>79,会员,0);DRAWTEXT(逃亡,3.1,'逃'),coloryellow;DRAWTEXT(88>0 AND REF(O,1)/REF(C,1)>1.04 AND REF(L,1)<=688 AND O>REF(C,1)AND C<REF(O,1)AND C/O>=1.01,1,'见底'),colorlired;DRAWTEXT(C-O>=0 AND O/L>1.05 AND L<=LLV(L,20),1,'绝底'),colorred;VAR11:=REF(LOW,1);VAR12:=SMA(ABS(LOW-VAR11),3,1)/SMA(MAX(LOW-VAR11,0),3,1)*100;VAR13:=EMA(IF(CLOSE*1.2,VAR12*10,VAR12/10),3);VAR14:=LLV(LOW,38);VAR15:=HHV(VAR13,38);VAR16:=IF(LLV(LOW,90),1,0);VAR17:=EMA(IF(LOW<=VAR14,(VAR13+VAR15*2)/2,0),3)/618*VAR16;CDXS:=HHV(VAR17,0)/2.6;STICKLINE(VAR17,0.53,VAR17/CDXS+0.53,0.6,0),colorwhite;HUA:=(CLOSE - LLV(LOW,14)) / (HHV(HIGH,14) - LLV(LOW,14)) * 1.2 * CLOSE;NV1:=EMA(HUA,4);NV2:=EMA(HUA,8);DRAWICON(CROSS(NV1,NV2) AND CLOSE/OPEN>1.05,0.5,1);DRAWICON(CROSS(NV2,NV1) AND COUNT(CROSS(NV1,NV2) AND CLOSE/OPEN>1.05 ,20) ,3.2,2);HUA2:=SMA(MAX(CLOSE-REF(CLOSE,1),0),16,2)/SMA(ABS(CLOSE/REF(CLOSE,1)),16,2)* 100;XIAN:=SMA(HUA2,3,1);NV3:=SMA(XIAN,3,1);XINV:=3*XIAN-2*NV3;买入条件:=CROSS(XINV,NV3);卖出条件:=CROSS(NV3,XINV);DRAWICON( 卖出条件,3.3,2),coloryellow;DRAWICON(买入条件,0.4,222),colorwhite;HXN:=IF(CLOSE/REF(CLOSE,1)>1.05 AND HIGH/CLOSE<1.01 AND IF(CLOSE>REF(CLOSE,1),88,0)>0, 91, 0);DRAWTEXT(HXN>90 AND VOL>REF(VOL,1) AND CLOSE>REF(CLOSE,1) AND COUNT(HXN>90,30)=1,平均线-0.25, '见涨'),,colorlired;HXJZ:=MA((2*CLOSE+HIGH+LOW)/4,5);BZTD:=HXJZ*89/100;DRAWTEXT(CROSS(LOW,BZTD),1.25,'必涨'),colorred;花:=EMA(SLOPE(1,1)+C,3),colorred;女:=EMA(SLOPE(1,1)+C,7),colorblue;STICKLINE(花>女 ,0.5,0.53,6,0) ,colorred;STICKLINE(花<=女 ,0.5,0.53,6,0),colorgreen;RJ:=1;{好}RSI_1:=SMA(MAX(CLOSE-LC,0),3,1)/SMA(ABS(CLOSE-LC),3,1)*100;RSI_2:=SMA(MAX(CLOSE-LC,0),5,1)/SMA(ABS(CLOSE-LC),5,1)*100;RSI_3:=SMA(MAX(CLOSE-LC,0),8,1)/SMA(ABS(CLOSE-LC),8,1)*100;相对强弱:=0.5*RSI_1+0.31*RSI_2+0.19*RSI_3;WAVE_1:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),3,1);WAVE_2:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),5,1);WAVE_3:=SMA(100*(CLOSE-LLV(LOW,8))/(HHV(HIGH,8)-LLV(LOW,8)),8,1);短线波段:=0.5*WAVE_1+0.31*WAVE_2+0.19*WAVE_3;风险系数:=0.5*相对强弱+0.5*短线波段,coloryellow;CD1:=IF(风险系数<20 AND CLOSE>OPEN AND RJ>0,1,0);CD2:=IF(风险系数<20 AND LOW>=REF(LOW,1) AND CLOSE>LOW AND RJ>0,1,0);CD3:=IF(REF(风险系数,1)<20 AND 风险系数>REF(风险系数,1),1,0);SIGNALBUY:=(CD1=1 OR CD2=1 OR CD3=1);CD:=(SIGNALBUY AND COUNT(SIGNALBUY,3)=1);DRAWTEXT(CD,0.5,'抄底'),COLOR0099FF;DIF:=(EMA(CLOSE,12)-EMA(CLOSE,26))*100;DEA:=EMA(DIF,9);RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,9,3);D_:=SMA(K,9,3);GZ:=CROSS(DIF,DEA) AND CROSS(K,D_);DRAWTEXT(GZ,2,'金叉'),COLOR0099FF; */M:=10;MM:=9*M;SHORT:=MM*4/3;LONG:=MM*26/9;DIF:1000*(EMA(CLOSE,SHORT)-EMA(CLOSE,LONG))/ABS(EMA(CLOSE,SHORT)); MACD:EMA(DIF,MM),COLOR58FF58;DEF:2*(DIF-MACD),COLORFFFF00,NODRAW;STICKLINE1(DEF>=0 AND DEF>=REF(DEF,1),0,DEF,6,1),COLOR6058FF;STICKLINE1(DEF>=0 AND DEF< REF(DEF,1),0,DEF,6,0),COLOR6058FF;STICKLINE1(DEF<0 AND DEF>=REF(DEF,1),0,DEF,6,1),COLORFFFF00;STICKLINE1(DEF<0 AND DEF< REF(DEF,1),0,DEF,6,0),COLORFFFF00;PARTLINE(DIF<1000,0,COLORLIGHTRED);多头趋势:=IF(DIF>=0 AND MACD>=0 OR (DIF<0 AND MACD>=0),1,0);空头趋势:=DIF<0 AND MACD<0 OR (DIF>=0 AND MACD<0);缩头:=IF(DEF>0 AND REF(DEF,1)>REF(DEF,2) AND DEF< REF(DEF,1),1,0);缩脚:=IF(DEF<0 AND REF(DEF,1)< REF(DEF,2) AND DEF>REF(DEF,1),1,0);阻力:=IF(CROSS(CLOSE,MA(CLOSE,20)) OR CROSS(CLOSE,MA(CLOSE,60)),1,0);支撑:=IF(CROSS(MA(CLOSE,20),CLOSE) OR CROSS(MA(CLOSE,60),CLOSE),1,0);做多:=IF(CROSS(MACD,DIF) AND DIF>0 AND MACD>0,1,0);放空:=IF(CROSS(DIF,MACD) AND DIF<0 AND MACD<0,1,0);PARTLINE(DIF,DIF<1000,COLORCCFFFF),LINETHICK2;PARTLINE(MACD,MACD<1000,COLOR58FF58);BV:=SUM(DEF,0);BA:=IF(MAX(BV,REF(BV,2))<REF(BV,1) OR MIN(BV,REF(BV,2))>REF(BV,1),1,0);BC:=BARSLAST(BA)+1;SMACD:=BV-REF(BV,BC);V AR3:=IF(DEF>0,HHV(ABS(DEF),BC),LLV(DEF,BC));V AR4:=(DEF)/20;//{图形比例缩小1/20,可修改}V AR5:=SMACD;DRAWTEXT(REF(V AR4,1)>0 && V AR4<=0 ,REF(V AR3,1),'+REF(VAR5,1)'),COLORGREEN; DRAWTEXT(REF(V AR4,1)<0 && V AR4>=0 ,REF(VAR3,1),'+REF(ABS(V AR5),1)'),COLORFF00FF;DRAWTEXT(BARSTA TUS=2 && V AR4<0,REF(VAR3,1),'+ABS(V AR5)'),ALIGN2,COLORFF00FF;DRAWTEXT(BARSTA TUS=2 && V AR4>0,REF(VAR3,1),'+V AR5'),ALIGN2,COLORGREEN; M1:=REF(DEF,1);JC := MACD-DIF;绿柱面积:IF (DEF<0,SUM(DEF,BARSLAST(JC<0)),0),NODRAW,COLORGREEN;红柱面积:IF (DEF>0,SUM(DEF,BARSLAST(JC>0)),0),NODRAW,COLORRED;。
文华财经指标公式源码文华财经指标MACD低位金叉二次金叉指标
/*{M1=5 M2=13 M3=34 M4=55 M5=89 M6=144 M7=233}涨停:STICKLINE(C>REF(C,1)*1.099,C,O,3,0),COLORCC00CC; 跌停:STICKLINE(REF(C,1)*0.909>C,C,O,3,0),COLORGREEN; EMA5:EMA(C,M1);EMA13:EMA(C,M2);EMA21:EMA(C,M5),COLOR5CADAD;EMA34:EMA(C,M3);EMA55:EMA(C,M4),COLORRED,LINETHICK2;EMA144:EMA(C,M6),COLOR20BA22;EMA233:EMA(C,M7),COLORBLUE;X1:=EMA(EMA(CLOSE,9),9);X2:=(X1-REF(X1,1))/REF(X1,1);DRAWICON(CROSS(X2,0),L*0.97,1);DRAWNUMBER(ISLASTBAR,LOW,BARSLAST(NOT(EMA(C,M1)<REF(E MA(C,M1),1))));IF(EMA55<REF(EMA55,1),EMA55,DRAWNULL),COLORGREEN,LINETH ICK2;倍量:=VOL>=REF(V,1)*1.91 AND C>O;缩量:=REF(V,1)>=VOL*1.91 AND C<O;STICKLINE(倍量,OPEN,(C+O)*0.5,0.3,0),COLORRED; STICKLINE(缩量,OPEN,(C+O)*0.5,0.3,0),COLORBLUE;上跳:STICKLINE(LOW>REF(C,1) ,L*0.996,L*0.9925,2,0),COLORRED; 下跳:STICKLINE(H<REF(C,1) ,H*1.002,H*1.006,2,0),COLORBLUE;双线持币:HHV(MA(HIGH,(3)),2),LINETHICK1,COLOR00FF00;单线持股:LLV(MA(HIGH,(3)),1),LINETHICK1,COLOR0000FF;VAR1:=CLOSE>REF(CLOSE,1) AND CLOSE>REF(CLOSE,2);VAR2:=REF(VAR1,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2);VAR3:=REF(VAR2,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2);VAR4:=REF(VAR3,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2);VAR5:=REF(VAR4,1) AND CLOSE>=REF(CLOSE,1) ANDCLOSE<=REF(CLOSE,2);VAR6:=REF(VAR5,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR7:=REF(VAR6,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR8:=REF(VAR7,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR9:=REF(VAR8,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VARA:=REF(VAR9,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VARB:=REF(VARA,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VARC:=REF(VARB,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VARD:=CLOSE<REF(CLOSE,1) AND CLOSE<REF(CLOSE,2); VARE:=REF(VARD,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VARF:=REF(VARE,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR10:=REF(VARF,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR11:=REF(VAR10,1) AND CLOSE<=REF(CLOSE,1) ANDCLOSE>=REF(CLOSE,2);VAR12:=REF(VAR11,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR13:=REF(VAR12,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR14:=REF(VAR13,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR15:=REF(VAR14,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR16:=REF(VAR15,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR17:=REF(VAR16,1) AND CLOSE<=REF(CLOSE,1) AND CLOSE>=REF(CLOSE,2);VAR18:=REF(VAR17,1) AND CLOSE>=REF(CLOSE,1) AND CLOSE<=REF(CLOSE,2);VAR19:=REF(VARD OR VARE OR VARF OR VAR10 OR VAR11 OR VAR12 OR VAR13 ORVAR14 OR VAR15 OR VAR16 OR VAR17 OR VAR18,1) AND VAR1; VAR1A:=REF(VAR1 OR VAR2 OR VAR3 OR VAR4 OR VAR5 OR VAR6 OR VAR7 ORVAR8 OR VAR9 OR VARA OR VARB OR VARC,1) AND VARD;STICKLINE(VAR1A,H*1.010,H*1.006,1,0),COLORGREEN; STICKLINE(VAR19,L*0.994,L*0.99,1,0),COLORYELLOW;AAA:=CONST(HHV(H,90));TT:=240/FROMOPEN;比:=TT;J12:=(HIGH - ((HIGH - LOW) / 3));J23:=(LOW + ((HIGH - LOW) / 3));D1{早晨之星}:=CONST(IF((REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1)< REF(CLOSE,2) ANDABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.03 AND CLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2)),1,0));D2{黄昏之星}:=CONST(IF((REF(CLOSE,2)/REF(OPEN,2) > 1.03 AND REF(OPEN,1)> REF(CLOSE,2) ANDABS(REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<0.02AND CLOSE/OPEN<0.97 AND CLOSE<REF(CLOSE,2)),1,0));D3{长十字}:=CONST(IF((CLOSE=OPEN AND HIGH/LOW >1.03),1,0)); D4{垂死十字}:=CONST(IF((CLOSE=OPEN AND CLOSE=LOW AND CLOSE!=HIGH),1,0));D5{早晨十字星}:=CONST(IF((REF(CLOSE,2)/REF(OPEN,2) < 0.95 AND REF(OPEN,1)< REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) ANDCLOSE/OPEN>1.05 AND CLOSE>REF(CLOSE,2)),1,0));D6{黄昏十字星}:=CONST(IF((REF(CLOSE,2)/REF(OPEN,2) > 1.05 AND REF(OPEN,1)> REF(CLOSE,2) AND REF(OPEN,1)=REF(CLOSE,1) ANDCLOSE/OPEN<0.95 AND CLOSE<REF(CLOSE,2)),1,0));D7{射击之星}:=CONST(IF((MIN(OPEN,CLOSE)=LOW ANDHIGH-LOW >3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE > MA(CLOSE,5)),1,0));D8{倒转锤头}:=CONST(IF((MIN(OPEN,CLOSE)=LOW ANDHIGH-LOW >3*(MAX(OPEN,CLOSE)-LOW) AND CLOSE < MA(CLOSE,5)),1,0));D9{锤头}:=CONST(IF((HIGH = MAX(OPEN,CLOSE) ANDHIGH-LOW >3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE < MA(CLOSE,5)),1,0));D10{吊颈}:=CONST(IF((HIGH = MAX(OPEN,CLOSE) ANDHIGH-LOW >3*(HIGH-MIN(OPEN,CLOSE)) AND CLOSE>MA(CLOSE,5)),1,0));D11{穿头破脚}:=CONST(IF(((REF(CLOSE,1)/REF(OPEN,1)>1.03 AND CLOSE/OPEN<0.96AND CLOSE<REF(OPEN,1)AND OPEN>REF(CLOSE,1))OR (REF(CLOSE,1)/REF(OPEN,1)<0.97AND CLOSE/OPEN>1.04AND CLOSE>REF(OPEN,1) AND OPEN<REF(CLOSE,1))),1,0));D12{乌云盖顶}:=CONST(IF((REF(CLOSE,1)/REF(OPEN,1)>1.03 AND CLOSE/OPEN<0.97AND OPEN>REF(CLOSE,1) AND CLOSE<REF(CLOSE,1)),1,0));D13{曙光初现}:=CONST(IF((REF(CLOSE,1)/REF(OPEN,1)<0.97 AND CLOSE/OPEN>1.03AND OPEN<REF(CLOSE,1) AND CLOSE>REF(CLOSE,1)),1,0));D14{身怀六甲}:=CONST(IF((ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) > 0.04AND ABS(CLOSE-OPEN)/CLOSE<0.005 ANDMAX(CLOSE,OPEN) < MAX(REF(CLOSE,1),REF(OPEN,1)) ANDMIN(CLOSE,OPEN)> MIN(REF(CLOSE,1),REF(OPEN,1))),1,0));D15{十字胎}:=CONST(IF((ABS(REF(CLOSE,1)-REF(OPEN,1))/REF(CLOSE,1) > 0.04AND CLOSE=OPEN ANDCLOSE < MAX(REF(CLOSE,1),REF(OPEN,1)) AND CLOSE >MIN(REF(CLOSE,1),REF(OPEN,1))),1,0));D16{平顶}:=CONST(IF((ABS(HIGH-REF(HIGH,1))/HIGH<0.001),1,0));D17{平底}:=CONST(IF(((ABS(LOW-REF(LOW,1))/LOW<0.001 AND ABS(REF(LOW,1)-REF(LOW,2))/REF(LOW,1)<=0.001)),1,0));D18{大阳烛}:=CONST(IF((CLOSE/OPEN>1.05 AND HIGH/LOW < CLOSE/OPEN+0.018),1,0));D19{三个白武士}:=CONST(IF((REF(CLOSE,2)>REF(OPEN,2) AND REF(CLOSE,1)>REF(OPEN,1) AND CLOSE>OPENAND REF(CLOSE,1)>REF(CLOSE,2) AND CLOSE>REF(CLOSE,1)),1,0)); D20{双飞乌鸦}:=CONST(IF((REF(CLOSE,1)<REF(OPEN,1) AND CLOSE<OPENAND CLOSE/OPEN<0.98),1,0));D21{孕育线}:=CONST(IF((REF(CLOSE,2)>REF(OPEN,2) AND(REF(CLOSE,2)-REF(OPEN,2))/REF(OPEN,2)>=2/100 ANDREF(OPEN,1)>=REF(CLOSE,1)AND (REF(OPEN,1)-REF(CLOSE,1))/REF(CLOSE,1)<=2/100 AND REF(OPEN,1)<=REF(CLOSE,2) AND REF(CLOSE,1)>=REF(OPEN,2) ANDC>=OPENAND (CLOSE-OPEN)/OPEN>=2/100 AND CLOSE>=REF(OPEN,1) AND OPEN<=REF(CLOSE,1)AND(MAX(CLOSE,REF(C,2))-MIN(CLOSE,REF(CLOSE,2)))/MIN(CLOSE,REF (CLOSE,2))*/DIFF:EMA(CLOSE,12)-EMA(CLOSE,27);DEA:EMA(DIFF,9);MACD:=2*(DIFF-DEA);STICKLINE1(MACD>=0&&MACD>REF(MACD,1),MACD,0,1,0),COLORMAGENTA; STICKLINE1(MACD>=0&&MACD<REF(MACD,1),MACD,0,1,0),COLORRED; STICKLINE1(MACD<0,0,MACD,1,0 ),COLORGREEN;STICKLINE1(MACD<0&&CROSS(MACD>REF(MACD,1),0.5),0,MACD,1,0 ),COLORYELL OW;IF(DIFF<0,DIFF,0),COLORRED,LINETHICK1;IF(DIFF<0,0,DIFF),COLORYELLOW,LINETHICK1;//IF(DIFFIF(DIFF>DEA,DEA,DEA),COLORWHITE,LINETHICK1;低位金叉:=CROSS(DIFF,DEA) && DIFF<-0.1;STICKLINE1(低位金叉,0,-0.18,6,0),COLORYELLOW;DRAWTEXT(低位金叉,-0.1,' 低位金叉'),COLORYELLOW;高位死叉:=CROSSDOWN(DIFF,DEA) && DIFF>0.1;DRAWTEXT(高位死叉,0.1,' 高位死叉'),COLORYELLOW;JCCOUNT:=COUNT(CROSS(DIFF,DEA),BARSLAST(DEA>=0));SCCOUNT:=COUNT(CROSSDOWN(DIFF,DEA),BARSLAST(DEA<0));二次金叉:=CROSS(DIFF,DEA) && DEA<0 && COUNT(JCCOUNT=2,21)=1;STICKLINE1(二次金叉,0,-0.18,6,0),COLORFF00FF;DRAWICON(二次金叉,DEA*1.04,13) ;DRAWTEXT(二次金叉,-0.1,' 二次金叉'),COLORFF00FF;二次死叉:=CROSSDOWN(DIFF,DEA) && DEA>=0 && COUNT(SCCOUNT=2,21)=1; DRAWTEXT(二次死叉,0.1,' 二次死叉'),COLORFF00FF;A1:=BARSLAST(REF(CROSS(DIFF,DEA),1));底背离:=REF(CLOSE,A1+1)>CLOSE && DIFF>REF(DIFF,A1+1) && CROSS(DIFF,DEA); STICKLINE1(底背离,0,0.13,6,0),COLOR00FF00;DRAWLINE1(A1=0,DEA,底背离,DEA,0),COLORRED,LINETHICK2;DRAWTEXT(底背离,0.1,' 底背离'),COLOR00FF00;A2:=BARSLAST(REF(CROSS(DEA,DIFF),1));顶背离:=REF(CLOSE,A2+1)<C&&DIFF<REF(DIFF,A1+2) && CROSS(DEA,DIFF); DRAWLINE1(A2=0,DEA,顶背离,DEA,0),COLORGREEN,LINETHICK2;DRAWCOLORLINE(BARSLAST(高位死叉)<BARSLAST(低位金叉),DIFF,COLORCYAN,COLORRED);。
文华财经指标公式源码文华财经指标多指标顶底背离
/*一号线:EMA(CLOSE,144);工作线:EMA(CLOSE,14),COLORRED;二号线:EMA(CLOSE,25);三号线:EMA(CLOSE,318);生命线:EMA(CLOSE,453),COLORRED,LINETHICK2;五号线:EMA(CLOSE,550);六号线:EMA(CLOSE,610);七号线:EMA(CLOSE,730);八号线:EMA(CLOSE,888);九号线:EMA(CLOSE,99),COLORGREEN;DIFF:=( EMA(CLOSE,7) - EMA(CLOSE,19));DEA:=EMA(DIFF,9);MACD:=0.90*(DIFF-DEA);TJ:=(DIFF>=DEA);TJ1:=(DIFF>=0);STICKLINE(TJ,H,L,0.5,0),COLORYELLOW;STICKLINE(TJ,O,C,4,0),COLORYELLOW;STICKLINE(TJ1 AND TJ,H,L,0.5,0),COLORF00FF0;STICKLINE(TJ1 AND TJ,O,C,4,1),COLORF00FF0;STICKLINE(DIFF<DEA,H,L,0.5,0),COLORF0F000;STICKLINE(DIFF<DEA,O,C,4,0),COLORF0F000;VAR1:=(CLOSE*2+HIGH+LOW)/4;SK:= EMA(VAR1,13)-EMA(VAR1,73);SD:= EMA(SK,2);DRAWTEXT((CROSS(SK,SD) AND SK<-0.04 AND (C-REF(C,1))/REF(C,1)>=0.03) OR (CROSS(SK,SD) AND SK<=-0.14 )OR (CROSS(SK,SD) AND SK<=0.05 AND (V/MA(V,5)>2 OR C/REF(C,1)>0.035)) ,L*0.99,'短线'),COLORGREEN;STICKLINE((CROSS(SK,SD) AND SK<-0.04 AND (C-REF(C,1))/REF(C,1)>=0.03) OR (CROSS(SK,SD) AND SK<=-0.14 )OR (CROSS(SK,SD) AND SK<=0.05 AND (V/MA(V,5)>2 OR C/REF(C,1)>0.035)),H,L,0.5,0),COLORRED;STICKLINE((CROSS(SK,SD) AND SK<-0.04 AND (C-REF(C,1))/REF(C,1)>=0.03) OR (CROSS(SK,SD) AND SK<=-0.14 )OR (CROSS(SK,SD) AND SK<=0.05 AN */DIFF :=EMA(CLOSE,12) - EMA(CLOSE,26);DEA :=EMA(DIFF,9);MACD :=(DIFF-DEA)*2;TR := SUM(MAX(MAX(HIGH-LOW,ABS(HIGH-REF(CLOSE,1))),ABS(LOW-REF(CLOSE,1))),14); HD := HIGH-REF(HIGH,1);LD := REF(LOW,1)-LOW;PDM:= SUM(IF(HD>0 AND HD>LD,HD,0),14);MDM:= SUM(IF(LD>0 AND LD>HD,LD,0),14);PDI:= PDM*100/TR;MDI:= MDM*100/TR;RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;LC :=REF(CLOSE,6);//前一周期收盘价RSI1:=SMA(MAX(CLOSE-LC,0),12,1)/SMA(ABS(CLOSE-LC),12,1)*100;//当根K线收盘价与前一周期收盘价做差,在该差值与0之间取最大值,做N1周期移动平均。
文华财经指标:均线源码
文华财经指标:均线源码MA60MA1:=MA(CLOSE,60);CLOSE>REF(HHV(HIGH,9),1)&&CLOSE>MA1,BK;CLOSE<REF(LLV(LOW,4),1),SP;CLOSE<REF(LLV(LOW,9),1)&&CLOSE<MA1,SK;CLOSE>REF(HHV(HIGH,4),1),BP;MA穿K线MA5:=MA(CLOSE,5);MA20:=MA(CLOSE,20);MA10:=MA(CLOSE,10);CLOSE-MA5>1,BK;CLOSE-MA5>98||CROSS(MA10,CLOSE),SP;CROSS(MA10,CLOSE),SK;MA5-CLOSE>98||CROSS(CLOSE,MA10),BP;三均线模型MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);MA20:=MA(CLOSE,20);MA5>MA10&&MA10>MA20,BPK;MA10>MA5&&MA20>MA10,SPK;站稳公式MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);MA5>REF(MA5,1) && MA10>REF(MA10,1)&& CLOSE>MA5 || CLOSE>REF(HIGH,5),BPK;MA5<REF(MA5,1) && MA10<REF(MA10,1)&& CLOSE<MA5 || CLOSE<REF(LOW,5),SPK;豆5分钟线MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);CROSS(MA10,MA5)||(CLOSE-MA5)>6,SK;(MA5-CLOSE)>4,BP;CROSS(MA5,MA10)||(MA5-CLOSE)>6,BK;(CLOSE-MA5)>4,SP;豆麦均线模型MA2:=EMA(CLOSE,10);MA1:=EMA(CLOSE,3);CROSS(MA1,MA2),BK;REF(MA1,1)-MA1>=3,SP;CROSS(MA2,MA1),SK;REF(MA1,1)-MA1<=2,BP;均线差公式MA1:=MA(CLOSE,3);MA2:=MA(CLOSE,7);FMA1:=REF(MA1,1);FFMA1:=REF(MA1,2);FMA2:=REF(MA2,1);FFMA2:=REF(MA2,1);CHA11:=FMA1-FFMA1;CHA12:=MA1-FMA1;CHA21:=FMA2-FFMA2;CHA22:=MA2-FMA2;CHA11>=0&&CHA12>=0,BPK;CHA11+3<=0&&CHA12+3<=0||CHA21+2<=0&&CHA22+ 2<=0,SPK;均线差公式2MA1:=MA(CLOSE,3);MA2:=MA(CLOSE,10);CROSS(MA1,MA2),BK;CROSS(MA2,MA1),SK;CHA1:=MA1-REF(MA1,1);CHA2:=REF(MA1,1)-REF(MA1,2);CHA1<=0&&CHA2<=0,SP;CHA1>=0&&CHA2>=0,BP;移动平均线MA1:MA(CLOSE,N1),COLORRED;MA2:MA(CLOSE,N2),COLORYELLOW;MA3:MA(CLOSE,N3),COLORGREEN;MA4:MA(CLOSE,N4),COLORMAGENTA;均线组合MA5:=MA(CLOSE,N1);MA10:=MA(CLOSE,N2);MA20:=MA(CLOSE,N3);CROSS(MA5,MA20),BK;CROSS(MA10,MA5),SP;CROSS(MA20,MA5),SK;CROSS(MA5,MA10),BP;均线最简MA5:=MA(CLOSE,5);MA10:= MA(CLOSE,10);CROSS(MA10,MA5),SPK;CROSS(MA5,MA10),BPK;豆一合约5分钟MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);CROSS(MA10,MA5)||(CLOSE-MA5)>8,SK;(MA5-CLOSE)>6,BP;CROSS(MA5,MA10)||(MA5-CLOSE)>8,BK; (CLOSE-MA5)>6,SP;。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
阳光心情
MA1:EMA(CLOSE,6),COLORWHITE;
MA2:EMA(CLOSE,25),COLORRED ;
STICKLINE(MA1>MA2,MA1,MA2,COLORMAGENTA,0) ; STICKLINE(MA2>MA1,MA1,MA2,COLORGREEN,0); DRAWTEXT(MA2-MA1>0&&MA1/LOW>1.15,LOW,'▼'); DRAWTEXT(MA1-MA2>0&&HIGH/MA1>1.15,HIGH,'▲');
无敌MACD文华版
DIFF : EMA(CLOSE,12) - EMA(CLOSE,26);
DEA : EMA(DIFF,9);
2*(DIFF-DEA),COLORSTICK;
L1:=(EMA(CLOSE,8) - EMA(CLOSE,13));
L2:=EMA(L1,13);
DRAWTEXT(CROSS(L1,L2),DIFF ,'买'),COLORRED; DRAWTEXT(CROSS(L2,L1),DIFF ,'卖'),COLORGREEN;
稳坐钓鱼台
ZJX:MA(C,61)-2*STD(C,71),COLORRED;
CJX:MA(C,125)-2*STD(C,145),COLORMAGENTA;
A:(EMA(C,13)+MA(C,26)+MA(C,52))/3,COLORYELLOW;
TMP:=OPEN-CLOSE;
DRAWLINE(TMP>0.00001,HIGH,TMP>0.00001,OPEN,COLORCYAN); DRAWLINE(TMP>0.00001,LOW,TMP>0.00001,CLOSE,COLORCYAN); DRAWLINE(TMP<-0.00001,HIGH,TMP<-0.00001,CLOSE,COLORRED); DRAWLINE(TMP<-0.00001,LOW,TMP<-0.00001,OPEN,COLORRED); DRAWLINE(ABS(TMP)<0.00001,LOW,ABS(TMP)<0.00001,OPEN,COLORWHITE); DRAWLINE(ABS(TMP)<0.00001,HIGH,ABS(TMP)<0.00001,OPEN,COLORWHITE); STICKLINE(TMP>0,OPEN,CLOSE,COLORCYAN,0);
STICKLINE(TMP<=0,OPEN,CLOSE,COLORRED,1);
稳赢趋势
HH:=HHV(HIGH,13);
LL:=LLV(LOW,13);
HH1:=BARSLAST((HH>REF(HH,1)));
LL1:=BARSLAST((LL<REF(LL,1)));
A:=IFELSE((HH1 < LL1),1,IFELSE((HH1 > LL1),-1,0));
AA:IFELSE(A>=0,LL,HH),COLORYELLOW;
DRAWTEXT(CROSS(HH1,LL1),HH,'开空');
DRAWTEXT(CROSS(LL1,HH1),LL,'开多');
DRAWLINE(HH1>LL1,HIGH,HH1>LL1,OPEN,COLORCYAN);
DRAWLINE(HH1>LL1,LOW,HH1>LL1,CLOSE,COLORCYAN);
DRAWLINE(HH1<=LL1,HIGH,HH1<=LL1,CLOSE,COLORRED);
DRAWLINE(HH1<=LL1,LOW,HH1<=LL1,OPEN,COLORRED);
STICKLINE(HH1>LL1,OPEN,CLOSE,COLORCYAN,0);
STICKLINE(HH1<=LL1,OPEN,CLOSE,COLORRED,1);
天机均线
VV:=(3*C+H+L+O)/6;
DUAN:(8*VV+7*REF(VV,1)+6*REF(VV,2)+5*REF(VV,3)+4*REF(VV,4)+3*REF(VV,5)+2* REF(VV,6)+REF(VV,7))/36,COLORWHITE;
ZONG:(LLV(DUAN,3)+LLV(DUAN,5)+LLV(DUAN,8))/3,COLORYELLOW;
顺势有位
PARTLINE(CLOSE>0,MA(CLOSE,5),COLORWHITE);
PARTLINE(CLOSE>0,MA(CLOSE,6),COLORWHITE);
PARTLINE(CLOSE>0,MA(CLOSE,7),COLORWHITE);
PARTLINE(CLOSE>0,MA(CLOSE,8),COLORWHITE);
PARTLINE(CLOSE>0,MA(CLOSE,9),COLORWHITE);
PARTLINE(CLOSE>0,MA(CLOSE,10),COLORWHITE);
PARTLINE(CLOSE>0,MA(CLOSE,25),COLORRED);
PARTLINE(CLOSE>0,MA(CLOSE,26),COLORRED);
PARTLINE(CLOSE>0,MA(CLOSE,27),COLORRED);
PARTLINE(CLOSE>0,MA(CLOSE,28),COLORRED);
PARTLINE(CLOSE>0,MA(CLOSE,29),COLORRED);
PARTLINE(CLOSE>0,MA(CLOSE,30),COLORRED);
拾金图
STICKLINE((EMA(CLOSE,13) >= EMA(CLOSE,34)),LOW,HIGH,COLORRED,0); STICKLINE((EMA(CLOSE,13) >= EMA(CLOSE,34)),OPEN,CLOSE,COLORRED,0); STICKLINE((EMA(CLOSE,13) < EMA(CLOSE,34)),LOW,HIGH,COLORGREEN,0); STICKLINE((EMA(CLOSE,13) < EMA(CLOSE,34)),OPEN,CLOSE,COLORGREEN,0);
LL1:=EMA(CLOSE,N);
HH1:=EMA(CLOSE,N1);
T:=IFELSE(HH1>LL1,1,-1);
G:=IFELSE(HH1>LL1,HH1,LL1);
DRAWLINE(T=1&&REF(T,1)=1,G,T=1&&REF(T,1)=1,REF(G,1),COLORGREEN); DRAWLINE(T=-1&&REF(T,1)=-1,G,T=-1&&REF(T,1)=-1,REF(G,1),COLORRED); DRAWSL(T=1,G,0,1,0,COLORGREEN);
DRAWSL(T=-1,G,0,1,0,COLORRED);
DRAWTEXT(CROSS(EMA(CLOSE,34),EMA(CLOSE,13)),HIGH,'S');
DRAWTEXT(CROSS(EMA(CLOSE,13),EMA(CLOSE,34)),LOW,'B'); DRAWNUMBER(CROSS(EMA(CLOSE,34),EMA(CLOSE,13)),LOW,CLOSE,0,COLORGREE N);
DRAWNUMBER(CROSS(EMA(CLOSE,13),EMA(CLOSE,34)),HIGH,CLOSE,0,COLORRED) ;
上帝主图
TMP:=OPEN-CLOSE;
DRAWLINE(TMP>0.00001,HIGH,TMP>0.00001,OPEN,COLORCYAN);
DRAWLINE(TMP>0.00001,LOW,TMP>0.00001,CLOSE,COLORCYAN); DRAWLINE(TMP<-0.00001,HIGH,TMP<-0.00001,CLOSE,COLORRED); DRAWLINE(TMP<-0.00001,LOW,TMP<-0.00001,OPEN,COLORRED); DRAWLINE(ABS(TMP)<0.00001,LOW,ABS(TMP)<0.00001,OPEN,COLORWHITE); DRAWLINE(ABS(TMP)<0.00001,HIGH,ABS(TMP)<0.00001,OPEN,COLORWHITE); STICKLINE(TMP>0,OPEN,CLOSE,COLORCYAN,0);
STICKLINE(TMP<=0,OPEN,CLOSE,COLORRED,1);
A1:=(LOW+HIGH+CLOSE)/3;
B1:MA(A1,3),COLORWHITE;
C1:HHV(B1,5),COLORGREEN;
D1:HHV(B1,15),COLORMAGENTA;
E1:LLV(B1,5),COLORYELLOW;
F1:LLV(B1,15),COLORCYAN;。