文华财经公式集(源码)开放

合集下载

文华财经期货软件指标公式源码至尊波段王指标公式源码

文华财经期货软件指标公式源码至尊波段王指标公式源码

/*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;。

文华财经期货软件指标公式源码赢顺云指标趋势多空买卖点指标

文华财经期货软件指标公式源码赢顺云指标趋势多空买卖点指标

文华财经期货软件指标公式源码赢顺云指标趋势多空买卖点指标>注意:以下公式源码仅供参考,未经确认请勿引用。

引言本文介绍了文华财经期货软件的指标公式源码,其中包括赢顺云指标、趋势指标以及多空买卖点指标。

这些指标可以帮助财经期货软件用户更好地分析市场走势和进行交易决策。

赢顺云指标赢顺云指标是一种技术分析指标,用于判断股票、期货等市场的买卖信号。

以下是该指标的公式源码:// 赢顺云指标公式源码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结论本文介绍了文华财经期货软件中的指标公式源码,包括赢顺云指标、趋势指标以及多空买卖点指标。

文华财经指标公式源码主力进出主力

文华财经指标公式源码主力进出主力

文华财经指标公式源码主力进出主力主力进出主力是一个常用的技术指标,用于衡量市场的资金流向,特别是大资金的买卖动向。

下面是一个主力进出主力指标的源码示例:```//定义主力进出主力指标计算函数def main_force_in_out(main_force, main_force_in,main_force_out):if main_force > 0:main_force_in += main_forceelse:main_force_out += abs(main_force)return main_force_in, main_force_out//初始化主力进出主力变量main_force_in = 0main_force_out = 0//循环计算主力进出主力指标for i in range(len(data)):main_force = data['主力资金'].iloc[i] - data['超大资金'].iloc[i] # 假设主力资金和超大资金分别为两列数据main_force_in, main_force_out = main_force_in_out(main_force, main_force_in, main_force_out)//打印结果print("主力进:", main_force_in)print("主力出:", main_force_out)```上述代码演示了如何使用Python编程语言计算主力进出主力指标。

首先通过遍历每一个数据项,计算主力资金和超大资金的差值,然后根据差值的正负来确定是主力进还是主力出,并进行相应的累加操作。

最后打印出主力进和主力出的数值。

请注意,以上源码仅仅是一个示例,实际使用时可能需要根据具体的数据结构和算法逻辑进行调整和修改。

为了达到1200字的要求,还需要进一步补充说明此指标的定义、计算方法和使用场景。

文华财经软件指标源码公式最准不漂移指标公式源码

文华财经软件指标源码公式最准不漂移指标公式源码

/*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;。

文华财经指标文华财经期货软件指标超级主升指标公式源码

文华财经指标文华财经期货软件指标超级主升指标公式源码

/*暗渡陈仓主}C1:=REF(C,1);C2:=REF(C,2);C3:=REF(C,3);C4:=REF(C,4);C5:=REF(C,5);C6:=REF(C,6);O1:=REF(O,1);O2:=REF(O,2);O3:=REF(O,3);O4:=REF(O,4);MA52:MA(C,5),NODRAW;MA10:MA(C,10),NODRAW;MA20:MA(C,20),NODRAW;P11:=C2<=C3 AND C2<=C4 AND C2<=C5 AND C2<=C6;P22:=C>MA(C,5) AND C>MA(C,10) AND C>MA(C,20);P33:=C>O AND C1>C2;P44:=C>C1;{以下为基本面}CAP1:=CAPITAL>=8000 AND CAPITAL<=5000000;{流通盘在8000万股到5亿股}S:=IF(NAMELIKE('S'),1,0)=0;{非S}ST:=IF(NAMELIKE('ST'),1,0)=0;{非ST}SST:=IF(NAMELIKE('*S'),1,0)=0;{非*S}停牌:=IF((C=0 OR V=0),0,1);PE:=C/FINANCE(33);SYL:=PE>0;{市盈率为正}JBM:=S AND ST AND SST AND 停牌 AND SYL;P:=P11 AND P22 AND P33 AND P44 AND JBM AND C1/C2<=1.05;{画烟雨阳彩柱}STICKLINE(P,O,O+0.382*(C-O),3,0),COLORYELLOW;STICKLINE(P,O+0.382*(C-O),C,3,0),COLORRED;DRAWTEXT(P,LOW*0.91,'↑暗仓'),COLORWHITE;{狙杀主图主图}MA6:MA(C,6),COLORWHITE,LINETHICK2,NODRAW;MA18:MA(C,18),COLOR0099FF,LINETHICK2,NODRAW;MA55:MA(C,55),COLORFF00FF,NODRAW;MA125:MA(C,125),COLORFFCC66,NODRAW;MA250:MA(C,250),COLORBLUE,NODRAW;TY:=C;A1:=REF(TY,10)=HHV(TY,2*10+1); B1:=FILTER(A1,10); C11:=BACKSET(B1,10+1); HD:=FILTER(C11,10);A21:=REF(TY,10)=LLV(TY,2*10+1); B2:=FILTER(A21,10); C23:=BACKSET(B2,10+1); LD:=FILTER(C23,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;买进价:=((C-REF(MA6,1))/6+MA6)*1.004;买进条件:=CROSS(C,买进价) AND 买进价>REF(买进价,1);白K买进:IF(买进条件,L,H),COLORWHITE,POINTDOT;DRAWTEXT(买进条件,LOW*0.95,'↑买'),COLORWHITE;加码价:=((C-REF(MA18,1))/18+MA18)*1.004;加码条件:=CROSS(C,加码价) AND 加码价>REF(加码价,1);黄K加码:IF(加码条件,L,H),COLORYELLOW,POINTDOT;DRAWTEXT(加码条件,LOW*0.99,'↑加'),COLORWHITE;*/VAR3AA:=IF((CLOSE>REF(CLOSE,1)),88,0);VAR4AA:=IF(((CLOSE)/(REF(CLOSE,1))>1.05) AND ((HIGH)/(CLOSE)<1.01) AND (VAR3AA>0),91,0); XG:=(FILTER((VAR4AA>90),45)),COLORYELLOW;STICKLINE(XG,150,0,4,0),COLOR000099;STICKLINE(XG,150,0,2,0),COLOR0000BB;STICKLINE(XG,150,0,1,0),COLOR0000DD;STICKLINE(XG,150,0,0.9,0),COLOR0000FF;DRAWTEXT(XG>0,130,'神量'),COLOR00C5FF;VAR11:=3*SMA((C-LLV(L,180))/(HHV(H,180)-LLV(L,180))*100,5,1)-2*SMA(SMA((C-LLV(L,180))/(HHV(H,180)-LLV(L,180))*100,180,1),15,1);超级主升:EMA(VAR11,5),LINETHICK2,COLOR6600FF;100,LINETHICK2 ,COLOR999999;STICKLINE(CROSS(超级主升,100),100,120,3,0),COLORRED;DRAWTEXT(CROSS(超级主升,100),100,'超级主升'),COLORYELLOW;。

文华财经指标公式源码文华期货软件指标公式公式源码

文华财经指标公式源码文华期货软件指标公式公式源码

/*拉升力:=(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);。

文华财经指标公式源码顶底卖出买入趋势线公式源码

文华财经指标公式源码顶底卖出买入趋势线公式源码
多空线:=(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;
BB0:=REF(趋势线,1)<11 AND CROSS(趋势线,11) AND C<中线;
BB1:=REF(趋势线,1)<11 AND REF(趋势线,1)>6 AND CROSS(趋势线,11);
BB2:=REF(趋势线,1)<6 AND REF(趋势线,1)>3 AND CROSS(趋势线,6);
MA2h:=(EMA(h,(7*2))+EMA(h,15)+EMA(h,(8*2)))/3;
MA2l:=(EMA(l,(7*2))+EMA(l,15)+EMA(l,(8*2)))/3;
MA2o:=(EMA(O,(7*2))+EMA(O,15)+EMA(O,(8*2)))/3;
MA2:=((MA2c*0.618+MA2O*0.382)*0.618+(MA2H*0.5+MA2L*0.5)*0.382);
DD3:=REF(趋势线,1)>97 AND REF(趋势线,1)>99 AND CROSS(97,趋势线);
DD4:=REF(趋势线,1)>99 AND REF(趋势线,1)<100 AND CROSS(99,趋势线);
DD5:=REF(趋势线,1)>100 AND CROSS(100,趋势线);

文华财经指标公式源码最神奇的主图买卖指标公式源码

文华财经指标公式源码最神奇的主图买卖指标公式源码

/* 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;。

文华财经指标公式源码文华财经指标MACD低位金叉二次金叉指标

文华财经指标公式源码文华财经指标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);。

文华财经期货软件指标公式源码散户吸筹指标公式源码

文华财经期货软件指标公式源码散户吸筹指标公式源码

/*ZLCM:=EMA(WINNER(CLOSE)*70,3);{//主力筹码估算}SHCM:=EMA((WINNER(CLOSE*1.1)-WINNER(CLOSE*0.9))*80,3);{//小筹码估算} ZSHTL:=SHCM/(ZLCM+SHCM)*100;{//小股民套牢筹码比率}ZZLKP:=ZLCM/(ZLCM+SHCM)*100;{//主力控盘筹码比率}ZCMZL:=MA(ZLCM+SHCM,13);{//市场筹码总量}ZZNTS:=BARSLAST(ZSHTL<90 AND REF(ZSHTL,1)>90);{//走牛天数} ZSHJJ:=EMA(ZSHTL,89);{//小股民警戒}ZZLJJ:=EMA(ZZLKP,89);{//主力警戒}ZJLRQD:=INTPART(ZZLKP-ZZLJJ);{//资金流入强度}SH8:=EMA(ZSHTL,8);DKB:=IF(ZZLKP-REF(ZZLKP,1)>ZSHTL-REF(ZSHTL,1),1,0);{神秘黑洞}STICKLINE(REF(ZSHTL,1)>90 AND ZSHTL<90,ZSHTL,0,4,0),COLOR9966FF; {小股民套牢筹码}STICKLINE(C>0,ZSHTL,ZZLKP,0,0),COLOREEEEEE;{小股民筹码警戒}STICKLINE(ZSHJJ>REF(ZSHJJ,1),ZSHTL,ZSHJJ,1,0),COLORAAAAAA;{主力控盘筹码}STICKLINE(C>0,ZZLKP,0,3,0),COLORBLUE;{铸顶风险区}STICKLINE(ZZLKP>75,ZZLKP,0,3,0),COLORFFFFFF;{顶部:(ZZLKP>75),COLORFFFFFF;}{主力筹码警戒}STICKLINE(ZZLJJ>REF(ZZLJJ,1),ZZLKP,ZZLJJ,3,0),COLORRED; {筑底散兵坑}STICKLINE(ZSHTL>=90,ZZLKP,0,3,0),COLORYELLOW;{底部:(ZSHTL>=90),COLOR66FFCC;}{筹码总量上升}{IF(ZCMZL,ZCMZL>REF(ZCMZL,1),0),COLOR0066FF,LINETHICK0;} {增量资金}{//------【数值显示】}套牢系数:INTPART(ZSHTL),NODRAW;控盘系数:INTPART(ZZLKP),COLORCYAN,NODRAW;资金流入强度:ZJLRQD,NODRAW;{☆精确风险}{【参数定义】}RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100; K1:=SMA(RSV,10,1);D1:=SMA(K1,5,1);KK:=INTPART(K1);DD:=INTPART(D1);TFXXS:=KK+DD;{//变异KD风险系数}TGLD:=MOD(TFXXS,10);{//踏浪涨停概率点}TGLXS:=(TFXXS-REF(TFXXS,1))*10;{//变异KD乖离系数} TYCFX:=TFXXS+TGLXS;{//变异KD预测风险}乖离系数:TGLXS,LINETHICK0,COLORGREEN;{【图解模板】}{级别拐点}{乖离系数}STICKLINE(TGLXS>0,100,100+TGLXS,3,0),COLOR000088; STICKLINE(TGLXS>0,100,100+TGLXS,2.5,0),COLOR000099; STICKLINE(TGLXS>0,100,100+TGLXS,2,0),COLOR0000AA; STICKLINE(TGLXS>0,100,100+TGLXS,1.5,0),COLOR0000BB; {STICKLINE(TGLXS>0,100,100+TGLXS,1.2,0),COLOR0000CC;} STICKLINE(TGLXS>0,100,100+TGLXS,1.0,0),COLOR0000DD;{STICKLINE(TGLXS>0,100,100+TGLXS,0.8,0),COLOR0000EE;}STICKLINE(TGLXS>0,100,100+TGLXS,0.5,0),COLOR0000FF;{//红柱} STICKLINE(TGLXS<0,100,100+TGLXS,3,0),COLOR008800;{STICKLINE(TGLXS<0,100,100+TGLXS,2.8,0),COLOR009900;}STICKLINE(TGLXS<0,100,100+TGLXS,2.5,0),COLOR00AA00;STICKLINE(TGLXS<0,100,100+TGLXS,2,0),COLOR00BB00;{STICKLINE(TGLXS<0,100,100+TGLXS,1.8,0),COLOR00CC00;}STICKLINE(TGLXS<0,100,100+TGLXS,1.5,0),COLOR00DD00;{STICKLINE(TGLXS<0,100,100+TGLXS,1.2,0),COLOR00EE00;}STICKLINE(TGLXS<0,100,100+TGLXS,1,0),COLOR00FF00;{//绿柱} STICKLINE(TGLXS=0 AND REF(TGLXS,1)>=0,100,100+TGLXS,8,0),COLORRED; STICKLINE(TGLXS=0 AND REF(TGLXS,1)<0,100,100+TGLXS,8,0),COLORGREEN; {【数值显示】}风险系数:TFXXS,LINETHICK2,COLORYELLOW;T1:=CONST( ZCMZL>REF(ZCMZL,1) AND DKB=1);T2:=CONST( ZCMZL>REF(ZCMZL,1) AND DKB=0);T3:=CONST( ZCMZL=REF(ZCMZL,1));T4:=CONST( ZCMZL<REF(ZCMZL,1) AND DKB=1);T5:=CONST( ZCMZL<REF(ZCMZL,1) AND DKB=0);T6:=CONST(TFXXS<=50 );*/M:=55;N:=34;LC:=REF(CLOSE,1);RSI:=((SMA(MAX((CLOSE - LC),0),3,1) / SMA(ABS((CLOSE - LC)),3,1)) * 100);FF:=EMA(CLOSE,3);MA15:=EMA(CLOSE,21);DRAWTEXT(CROSS(85,RSI),75,'▼'),COLORGREEN;VAR1:=1;VAR2:=REF(LOW,1)*VAR1;VAR3:=SMA(ABS(LOW-VAR2),3,1)/SMA(MAX(LOW-VAR2,0),3,1)*100*VAR1;VAR4:=EMA(IF(CLOSE*1.3,VAR3*10,VAR3/10),3)*VAR1;VAR5:=LLV(LOW,30)*VAR1;VAR6:=HHV(VAR4,30)*VAR1;VAR7:=IF(MA(CLOSE,58),1,0)*VAR1;VAR8:=EMA(IF(LOW<=VAR5,(VAR4+VAR6*2)/2,0),3)/618*VAR7*VAR1;吸筹:IF(VAR8>100,100,VAR8)*VAR1,COLORRED;STICKLINE(吸筹>-150,0,吸筹,8,0),COLORRED;散户: 100*(HHV(HIGH,M)-CLOSE)/(HHV(HIGH,M)-LLV(LOW,M)),COLORWHITE,LINETHICK2; RSV:=(CLOSE-LLV(LOW,N))/(HHV(HIGH,N)-LLV(LOW,N))*100;K:=SMA(RSV,3,1);D:=SMA(K,3,1);J:=3*K-2*D;庄家:EMA(J,6),COLORBLUE,LINETHICK2;NZ:=10;VARZ1:=1;VARZ2:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100*VARZ1;DK:SMA(SMA(VARZ2,2,1)+3*VARZ1,2,1),LINETHICK1,COLORMAGENTA;TL:95,LINETHICK1,COLORBLUE;TL1:88,DOT,COLORBLUE;DL:10,LINETHICK1,COLORCYAN;DL1:22,DOT,COLORYELLOW;ZC:50,LINETHICK1,COLORYELLOW;DRAWNUMBER(ISLASTBAR,DK,DK,2,COLORMAGENTA),ALIGN0;EMA144:=EMA(C,144),COLORMAGENTA;EMA199:=EMA(C,199),COLORRED;MA30:=MA(C,30),COLORGREEN;MA13:=MA(C,13),COLORWHITE,DASH;PT := REF(HIGH,1)-REF(LOW,1);CDP := (REF(HIGH,1) + REF(LOW,1) + REF(CLOSE,1))/3;DMA3:=DMA(C,0.22) ,COLORYELLOW ;AL := MA(CDP - PT,NZ),COLORBLUE;AH := MA(CDP + PT,NZ),RGB(255,128,0);//SETTLE,COLORMAGENTA,LINETHICK3;D1:BARSLAST(CROSSDOWN(DK,80))<BARSLAST(CROSS(DK,50))&&C<AL&&DK>20&&BARSLAST(CR OSS(DK,20))<BARSLAST(CROSSDOWN(DK,50)),NODRAW;DRAWTEXT(C>MA30&&DK>90&&C>EMA144&&C<EMA199,DK,'空');DRAWTEXT(REF(CROSSDOWN(C,MA30),3)&&DK<23.5||D1,DK,'多');。

文华财经指标公式源码 多空均线加变色K线公式源码

文华财经指标公式源码 多空均线加变色K线公式源码

/*总手:VOL,NODRAW;ZZ:=IF(REF(C,1)>REF(O,1) AND O>REF(C,1)*1.014 AND C<O*1.02,1,3);V5:=MA(V,5);V12:=MA(V,12);V34:=MA(V,34);C6:=MA(C,6);STICKLINE(VOL,0,VOL,1,0),COLORLIGRAY;STICKLINE(CROSS(C,C6) AND V>V5*1.2 AND V>V12*1.2 AND ZZ>2 AND C>H*0.975,0,VOL,1,0),COLORRED;STICKLINE(CROSS(C6,C) AND V>V5*1.2 AND V>V12*1.2,0,VOL,1,0),COLORGREEN; STICKLINE(VOL>MA(VOL,5)*2 AND V>V34*3 AND C<REF(C,1)*1.05,0,VOL,1,0),COLORYELLOW;AR1:=MA(CLOSE,1);VAR2:=MA(CLOSE,3);VAR3:MA(VAR2,1);VAR4:MA(VAR2,3);STICKLINE(VAR3>VAR4,VAR3,VAR4,2,0),LINETHICK1,COLORFF00FF; STICKLINE(VAR3<VAR4,VAR3,VAR4,2,0),LINETHICK1,COLOR00FF00; A:=IF(CLOSE>=OPEN,(CLOSE-OPEN)/4,0);CBFB:=MA(C,2);JL:=IF(C>CBFB,V,0);CL:=IF(C<CBFB,V,0);JLH:=SUM(JL,4);CLH:=SUM(CL,4);LHB:=CLH/JLH;私募:IF(HHV(LHB,5)>4 AND CROSS(2,LHB) AND C>=O,1,0); DRAWICON(私募,L*0.96,9);STICKLINE(VOL<MA(VOL,5)/2 AND V<V12/2,0,VOL,1,0),COLORBLUE;STICKLINE(VOL>MA(VOL,5)*2 AND V>V34*3 AND C<REF(C,1)*1.05 AND CROSS(C,C6) AND V>V5*1.2 AND V>V12*1.2 AND ZZ>2 AND C>H*0.975,VOL*0.5,0,1,0),COLORRED; STICKLINE(VOL>MA(VOL,5)*2 AND V>V34*3 AND C<REF(C,1)*1.05 AND CROSS(C6,C) AND V>V5*1.2 AND V>V12*1.2,VOL*0.5,0,1,0),COLORRED;*/MA1:MA(CLOSE,5);MA2:MA(CLOSE,10);MA3:MA(CLOSE,20);MA4:MA(CLOSE,30);MA5:MA(CLOSE,50);MA6:MA(CLOSE,60);MAXMA:MAX1(MA1,MA2,MA3,MA4,MA5,MA6);MINMA:MIN1(MA1,MA2,MA3,MA4,MA5,MA6);DRAWCOLORKLINE(C>MAXMA&&ISDOWN,COLORMAGENTA,0); DRAWCOLORKLINE(C<MINMA&&ISDOWN,COLORGREEN,0); DRAWCOLORKLINE(C>MAXMA&&ISUP,COLORMAGENTA,1); DRAWCOLORKLINE(C<MINMA&&ISUP,COLORGREEN,1);。

文华财经期货软件指标公式源码至尊风险王指标公式源码

文华财经期货软件指标公式源码至尊风险王指标公式源码

文华财经期货软件指标公式源码至尊风险王指标公式源码文华财经期货软件指标公式源码-至尊风险王指标公式源码1. 简介本文档提供了文华财经期货软件的至尊风险王指标公式源码,该指标是专为期货交易而设计的技术指标,旨在提供市场风险评估和信号生成的参考。

2. 至尊风险王指标公式源码1. 输入参数:* 参数1:收盘价数组(Close)* 参数2:最高价数组(High)* 参数3:最低价数组(Low)* 参数4:指标周期(Period)2. 算法步骤:* 步骤1:计算真实波动范围(True Range):* TR1 = High - Low* TR2 = Abs(High - PreClose)* TR3 = Abs(Low - PreClose)* TrueRange = Max(TR1, TR2, TR3)* 步骤2:计算波动指标(Volatility Index):* 平均真实波动范围(Average True Range,ATR)=SMA(TrueRange, Period)* VolatilityIdx = ATR / Close * 100* 步骤3:计算风险指标(Risk Index):* 风险指标(Risk Index)= SMA(VolatilityIdx, Period)* 步骤4:计算至尊风险王指标(Supreme Risk King):* 至尊风险王(Supreme Risk King)= EMA(Risk Index, Period)3. 输出结果:* 至尊风险王指标(Supreme Risk King)3. 使用示例以下是使用文华财经期货软件指标公式源码计算至尊风险王指标的示例代码:导入必要的库import numpy as np准备输入数据close_prices = np.array([10, 11, 12, 11, 10])high_prices = np.array([12, 13, 14, 13, 12])low_prices = np.array([8, 9, 10, 9, 8])period = 5计算至尊风险王指标def supreme_risk_king(close_prices, high_prices, low_prices, period):步骤1:计算真实波动范围tr1 = high_prices - low_pricestr2 = np.abs(high_prices - np.roll(close_prices, 1))tr3 = np.abs(low_prices - np.roll(close_prices, 1)) true_range = np.maximum(tr1, np.maximum(tr2, tr3))步骤2:计算波动指标atr = np.mean(true_range)volatility_idx = atr / close_prices * 100步骤3:计算风险指标risk_idx = np.mean(volatility_idx)步骤4:计算至尊风险王指标supreme_risk_king = np.mean(risk_idx)return supreme_risk_king执行计算result = supreme_risk_king(close_prices, high_prices, low_prices, period)print("至尊风险王指标:", result)4. 注意事项请注意,该指标公式源码仅作为参考,在实际使用中可能需要根据具体需求进行适当调整。

文华财经公式集(源码)开放

文华财经公式集(源码)开放

文华财经公式判断趋势MA50:MA(CLOSE,50);STICKLINE(CLOSE<MA50,OPEN,CLOSE,COLORCYAN,0); DRAWLINE(CLOSE<MA50,HIGH,CLOSE<MA50,LOW,COLORCYAN); STICKLINE(CLOSE>MA50,OPEN,CLOSE,COLORRED,0); DRAWLINE(CLOSE>MA50,HIGH,CLOSE>MA50,LOW,COLORRED); 每日均价A1:=IF(DAY=1,CLOSE,0);A2:=IF(DAY=2,CLOSE,0);A3:=IF(DAY=3,CLOSE,0);A4:=IF(DAY=4,CLOSE,0);A5:=IF(DAY=5,CLOSE,0);A6:=IF(DAY=6,CLOSE,0);A7:=IF(DAY=7,CLOSE,0);A8:=IF(DAY=8,CLOSE,0);A9:=IF(DAY=9,CLOSE,0);A10:=IF(DAY=10,CLOSE,0);A11:=IF(DAY=11,CLOSE,0);A12:=IF(DAY=12,CLOSE,0);A13:=IF(DAY=13,CLOSE,0);A14:=IF(DAY=14,CLOSE,0);A15:=IF(DAY=15,CLOSE,0);A16:=IF(DAY=16,CLOSE,0);A17:=IF(DAY=17,CLOSE,0);A18:=IF(DAY=18,CLOSE,0);A19:=IF(DAY=19,CLOSE,0);A20:=IF(DAY=20,CLOSE,0);A21:=IF(DAY=21,CLOSE,0);A22:=IF(DAY=22,CLOSE,0);A23:=IF(DAY=23,CLOSE,0);A24:=IF(DAY=24,CLOSE,0);A25:=IF(DAY=25,CLOSE,0);A26:=IF(DAY=26,CLOSE,0);A27:=IF(DAY=27,CLOSE,0);A28:=IF(DAY=28,CLOSE,0);A29:=IF(DAY=29,CLOSE,0);A30:=IF(DAY=30,CLOSE,0);A31:=IF(DAY=31,CLOSE,0);B1:=IF(DAY=1,VOL,0);B2:=IF(DAY=2,VOL,0);B3:=IF(DAY=3,VOL,0);B4:=IF(DAY=4,VOL,0);B5:=IF(DAY=5,VOL,0);B6:=IF(DAY=6,VOL,0);B7:=IF(DAY=7,VOL,0);B8:=IF(DAY=8,VOL,0);B9:=IF(DAY=9,VOL,0);B10:=IF(DAY=10,VOL,0);B11:=IF(DAY=11,VOL,0);B12:=IF(DAY=12,VOL,0);B13:=IF(DAY=13,VOL,0);B14:=IF(DAY=14,VOL,0);B15:=IF(DAY=15,VOL,0);B16:=IF(DAY=16,VOL,0);B17:=IF(DAY=17,VOL,0);B18:=IF(DAY=18,VOL,0);B19:=IF(DAY=19,VOL,0);B20:=IF(DAY=20,VOL,0);B21:=IF(DAY=21,VOL,0);B22:=IF(DAY=22,VOL,0);B23:=IF(DAY=23,VOL,0);B24:=IF(DAY=24,VOL,0);B25:=IF(DAY=25,VOL,0);B26:=IF(DAY=26,VOL,0);B27:=IF(DAY=27,VOL,0);B28:=IF(DAY=28,VOL,0);B29:=IF(DAY=29,VOL,0);B30:=IF(DAY=30,VOL,0);B31:=IF(DAY=31,VOL,0);AB1:=SUM(A1*B1,N)/SUM(B1,N);AB2:=SUM(A2*B2,N)/SUM(B2,N);AB3:=SUM(A3*B3,N)/SUM(B3,N);AB4:=SUM(A4*B4,N)/SUM(B4,N);AB5:=SUM(A5*B5,N)/SUM(B5,N);AB6:=SUM(A6*B6,N)/SUM(B6,N);AB7:=SUM(A7*B7,N)/SUM(B7,N);AB8:=SUM(A8*B8,N)/SUM(B8,N);AB9:=SUM(A9*B9,N)/SUM(B9,N);AB10:=SUM(A10*B10,N)/SUM(B10,N); AB11:=SUM(A11*B11,N)/SUM(B11,N); AB12:=SUM(A12*B12,N)/SUM(B12,N); AB13:=SUM(A13*B13,N)/SUM(B13,N); AB14:=SUM(A14*B14,N)/SUM(B14,N); AB15:=SUM(A15*B15,N)/SUM(B15,N); AB16:=SUM(A16*B16,N)/SUM(B16,N); AB17:=SUM(A17*B17,N)/SUM(B17,N); AB18:=SUM(A18*B18,N)/SUM(B18,N);AB19:=SUM(A19*B19,N)/SUM(B19,N); AB20:=SUM(A20*B20,N)/SUM(B20,N); AB21:=SUM(A21*B21,N)/SUM(B21,N); AB22:=SUM(A22*B22,N)/SUM(B22,N); AB23:=SUM(A23*B23,N)/SUM(B23,N); AB24:=SUM(A24*B24,N)/SUM(B24,N); AB25:=SUM(A25*B25,N)/SUM(B25,N); AB26:=SUM(A26*B26,N)/SUM(B26,N); AB27:=SUM(A27*B27,N)/SUM(B27,N); AB28:=SUM(A28*B28,N)/SUM(B28,N); AB29:=SUM(A29*B29,N)/SUM(B29,N); AB30:=SUM(A30*B30,N)/SUM(B30,N); AB31:=SUM(A31*B31,N)/SUM(B31,N); PARTLINE(DAY=1,AB1,COLORYELLOW); PARTLINE(DAY=2,AB2,COLORYELLOW); PARTLINE(DAY=3,AB3,COLORYELLOW); PARTLINE(DAY=4,AB4,COLORYELLOW); PARTLINE(DAY=5,AB5,COLORYELLOW); PARTLINE(DAY=6,AB6,COLORYELLOW); PARTLINE(DAY=7,AB7,COLORYELLOW); PARTLINE(DAY=8,AB8,COLORYELLOW); PARTLINE(DAY=9,AB9,COLORYELLOW); PARTLINE(DAY=10,AB10,COLORYELLOW); PARTLINE(DAY=11,AB11,COLORYELLOW); PARTLINE(DAY=12,AB12,COLORYELLOW); PARTLINE(DAY=13,AB13,COLORYELLOW); PARTLINE(DAY=14,AB14,COLORYELLOW); PARTLINE(DAY=15,AB15,COLORYELLOW); PARTLINE(DAY=16,AB16,COLORYELLOW); PARTLINE(DAY=17,AB17,COLORYELLOW); PARTLINE(DAY=18,AB18,COLORYELLOW); PARTLINE(DAY=19,AB19,COLORYELLOW); PARTLINE(DAY=20,AB20,COLORYELLOW); PARTLINE(DAY=21,AB21,COLORYELLOW); PARTLINE(DAY=22,AB22,COLORYELLOW); PARTLINE(DAY=23,AB23,COLORYELLOW); PARTLINE(DAY=24,AB24,COLORYELLOW); PARTLINE(DAY=25,AB25,COLORYELLOW); PARTLINE(DAY=26,AB26,COLORYELLOW); PARTLINE(DAY=27,AB27,COLORYELLOW); PARTLINE(DAY=28,AB28,COLORYELLOW); PARTLINE(DAY=29,AB29,COLORYELLOW); PARTLINE(DAY=30,AB30,COLORYELLOW); PARTLINE(DAY=31,AB31,COLORYELLOW);N=31买卖频谱X:=BARSLAST(HIGH=HHV(HIGH,N));LL:=MIN(REF(LOW,X+3),MIN(REF(LOW,X+2),MIN(REF(LOW,X),REF(LOW,X+1))));Y:=BARSLAST(LOW=LLV(LOW,N));HH:=MAX(REF(HIGH,Y+3),MAX(REF(HIGH,Y+2),MAX(REF(HIGH,Y),REF(HIGH,Y+1))));A:=BARSLAST(CLOSE>=HH);B:=BARSLAST(CLOSE<=LL);AB:IF(A>B,HH,LL);TM:=CLOSE>=AB;TP:=CLOSE<AB;DRAWLINE(TP,HIGH,TP,OPEN,COLORCYAN);DRAWLINE(TP,LOW,TP,CLOSE,COLORCYAN);DRAWLINE(TM,HIGH,TM,CLOSE,COLORRED);DRAWLINE(TM,LOW,TM,OPEN,COLORRED);STICKLINE(TP,OPEN,CLOSE,COLORCYAN,0);STICKLINE(TM,OPEN,CLOSE,COLORRED,1);HH1:=BARSLAST((HH > REF(HH,1)));LL1:=BARSLAST((LL < REF(LL,1)));N=10龙出沧海公式VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6;DTX:(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4)+15*REF( VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR2,9)+10*REF(VAR2, 10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF(VAR2,14)+5*REF(VAR2,15)+4 *REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+REF(VAR2,20))/210,COLORWHITE;KTX: MA(DTX,10), COLORYELLOW;STICKLINE(DTX>KTX,DTX,KTX, COLORRED,10);STICKLINE(DTX<KTX,DTX,KTX, COLORGREEN,10) ;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE, COLORRED,1);DRAWLINE(CLOSE>=OPEN,HIGH, CLOSE>=OPEN,CLOSE, COLORRED);DRAWLINE(CLOSE>=OPEN,LOW, CLOSE>=OPEN,OPEN, COLORRED);STICKLINE(CLOSE<OPEN,OPEN,CLOSE, COLORGREEN,0);DRAWLINE(CLOSE<OPEN,HIGH, CLOSE<OPEN,LOW, COLORGREEN);MU:MA(CLOSE,60),COLORBLUE;MH:MA(CLOSE,360),COLORMAGENTA;龙出沧海VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6;DTX:(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4)+15*REF( VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR2,9)+10*REF(VAR2, 10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF(VAR2,14)+5*REF(VAR2,15)+4 *REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+REF(VAR2,20))/210,COLORWHITE;KTX: MA(DTX,10), COLORYELLOW;STICKLINE(DTX>KTX,DTX,KTX, COLORLIGHTRED,10);STICKLINE(DTX<KTX,DTX,KTX, COLORBLUE,10) ;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE, COLORRED,1);DRAWLINE(CLOSE>=OPEN,HIGH, CLOSE>=OPEN,CLOSE, COLORRED); DRAWLINE(CLOSE>=OPEN,LOW, CLOSE>=OPEN,OPEN, COLORRED); STICKLINE(CLOSE<OPEN,OPEN,CLOSE, COLORGREEN,0);DRAWLINE(CLOSE<OPEN,HIGH, CLOSE<OPEN,LOW, COLORGREEN);两个指标Y:=(HIGH+LOW)/2;AO:MA(Y ,5 )-MA(Y ,34 ),COLORWHITE;AO1:=REF(AO,1);AC:AO-MA( AO,5),COLORYELLOW;A:0.99*(AO+AC)/2,COLORRED;AC1:=REF(AC,1);STICKLINE(AO>0&&AC>0,0,AO+AC,COLORRED,0);STICKLINE(AO<0&&AC>0,0,AO,COLORWHITE,1);STICKLINE(AO<0&&AC>0,0,AO+AC,COLORWHITE,0);STICKLINE(AO>0&&AC<0,0,AO,COLORRED,1);STICKLINE(AO>0&&AC<0,0,AC+AO,COLORRED,0);STICKLINE(AO<0&&AC<0,0,AC+AO,COLORWHITE,0);俩条飘带C:=CLOSE;HZ:=EMA(CLOSE,13);DB:EMA(HZ,1),COLORWHITE;ZB:EMA(HZ,26),COLORMAGENTA;JX148:=EMA(C,148);HZ2:EMA(HZ,8),COLORGREEN;HZ4:EMA(HZ,39),COLORMAGENTA;FILLRGN(DB>HZ2,DB,HZ2,COLORGREEN);FILLRGN(DB<HZ2,DB,HZ2,COLORWHITE);FILLRGN(ZB>HZ4,ZB,HZ4,COLORMAGENTA);FILLRGN(ZB<HZ4,ZB,HZ4,COLORBLUE);可以变色K线MID:=MA(CLOSE,20);UPPER:=MID+2*STD(CLOSE,20);LOWER:=MID-2*STD(CLOSE,20);V1:=(CLOSE-LOWER)/(UPPER-LOWER)*100;V2:=V1-EMA(V1,5);K1:=SUM(LLV(V2,4),4)/4;V3:=EMA(V2,64)*10;V4:=EMA(0.4*V2*(-1),3);V5:=-1*EMA(V2,39)*10;A:=V3>10;B:=V2>V4;D:=V5>10;E:=V3<=10||V2<=V4||V5<=10;KS:=(CLOSE-SMA(CLOSE,13,1))/SMA(CLOSE,13,1)*(-100);RKS:=REF(KS,1);MLS:=RKS/KS>1.23 && RKS>13 && CLOSE/REF(CLOSE,1)>1.03;DRAWLINE(CLOSE>=OPEN && E,HIGH,CLOSE>=OPEN && E,LOW,COLORRED); STICKLINE(CLOSE>=OPEN && E,CLOSE,OPEN,COLORRED,0);DRAWLINE(CLOSE< OPEN && E,HIGH,CLOSE< OPEN && E,LOW,COLORGREEN); STICKLINE(CLOSE< OPEN && E,CLOSE,OPEN,COLORGREEN,0);DRAWLINE(OPEN> CLOSE && A,LOW,OPEN> CLOSE && A,HIGH,COLORYELLOW); STICKLINE(OPEN> CLOSE && A,CLOSE,OPEN,COLORYELLOW,0);DRAWLINE(OPEN<=CLOSE && A,LOW,OPEN<=CLOSE && A,HIGH,COLORYELLOW); STICKLINE(OPEN<=CLOSE && A,CLOSE,OPEN,COLORYELLOW,1);DRAWLINE(OPEN> CLOSE && B,LOW,OPEN> CLOSE && B,HIGH,COLORRED); STICKLINE(OPEN> CLOSE && B,CLOSE,OPEN,COLORRED,0);DRAWLINE(OPEN<=CLOSE && B,LOW,OPEN<=CLOSE && B,HIGH,COLORRED); STICKLINE(OPEN<=CLOSE && B,CLOSE,OPEN,COLORRED,1);DRAWLINE(OPEN> CLOSE && D,LOW,OPEN> CLOSE && D,HIGH,COLORGREEN); STICKLINE(OPEN> CLOSE && D,CLOSE,OPEN,COLORGREEN,0);DRAWLINE(OPEN<=CLOSE && D,LOW,OPEN<=CLOSE && D,HIGH,COLORGREEN); STICKLINE(OPEN<=CLOSE && D,CLOSE,OPEN,COLORGREEN,1);DRAWLINE(KS>13,HIGH,KS>13,LOW,COLORWHITE);DRAWLINE(MLS=1,HIGH,MLS=1,LOW,COLORMAGENTA);STICKLINE(KS>13,OPEN,CLOSE,COLORWHITE,1);STICKLINE(MLS=1,OPEN,CLOSE,COLORMAGENTA,1);HH:=HHV(HIGH,N);LL:=LLV(LOW,N);HH1:=BARSLAST((HH > REF(HH,1)));LL1:=BARSLAST((LL < REF(LL,1)));DRAWTEXT(CROSS(HH1,LL1),HH,'开空');DRAWTEXT(CROSS(LL1,HH1),LL,'开多');T:=IF(HH1>LL1,1,-1);G:=IF(HH1>LL1,HH,LL);DRAWLINE(T=1&&REF(T,1)=1,G,T=1&&REF(T,1)=1,REF(G,1),COLORCYAN); 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,COLORCYAN);DRAWSL(T=-1,G,0,1,0,COLORRED);N=10考夫曼的ama-自适应移动平均线交易指标:DIRECTION:=CLOSE-REF(CLOSE,N);VOLATILITY:=SUM(ABS((CLOSE-REF(CLOSE,1))),N);ER:=ABS(DIRECTION/VOLATILITY);FASTSC:=2/(2 + 1);SLOWSC:=2/(30 + 1);SSC:=ER*(FASTSC-SLOWSC)+SLOWSC;CONSTANT:=SSC*SSC;AMAHIGH:REF(EMA(HIGH,N),1)+CONSTANT*(HIGH- REF(EMA(HIGH,N),1)); AMALOW:REF(EMA(LOW,N),1)+CONSTANT*(LOW- REF(EMA(LOW,N),1));参数N的数值自己定义考夫曼的ama-自适应移动平均线交易模型:DIRECTION:=CLOSE-REF(CLOSE,N);VOLATILITY:=SUM(ABS((CLOSE-REF(CLOSE,1))),N);ER:=ABS(DIRECTION/VOLATILITY);FASTSC:=2/(2 + 1);SLOWSC:=2/(30 + 1);SSC:=ER*(FASTSC-SLOWSC)+SLOWSC;CONSTANT:=SSC*SSC;AMAHIGH:=REF(EMA(HIGH,N),1)+CONSTANT*(HIGH- REF(EMA(HIGH,N),1)); AMACLOSE:=REF(EMA(CLOSE,N),1)+CONSTANT*(CLOSE- REF(EMA(CLOSE,N),1)); AMALOW:=REF(EMA(LOW,N),1)+CONSTANT*(LOW- REF(EMA(LOW,N),1)); LOW>AMAHIGH,BK;CLOSE<AMACLOSE,SP;HIGH<AMALOW,SK;CLOSE>AMACLOSE,BP;开空开多HH:=HHV(HIGH,N);LL:=LLV(LOW,N);HH1:=BARSLAST((HH>REF(HH,1)));LL1:=BARSLAST((LL<REF(LL,1)));A:=IF((HH1 < LL1),1,IF((HH1 > LL1),-1,0));IF(A>=0,LL,HH),COLORYELLOW;STICKLINE((HH1 < LL1),CLOSE,OPEN,COLORRED,0);DRAWLINE((HH1 < LL1),HIGH,(HH1<LL1),LOW,COLORRED);STICKLINE((HH1 > LL1),CLOSE,OPEN,COLORBLUE,0);DRAWLINE((HH1 > LL1),HIGH,(HH1 > LL1),LOW,COLORBLUE);DRAWTEXT(CROSS(HH1,LL1),HH,'开空');DRAWTEXT(CROSS(LL1,HH1),LL,'开多');N=15,N=10决战MACDVAR1:=((EMA(CLOSE,12) - EMA(CLOSE,26)) * 100);VAR2:=EMA(VAR1,9);VAR3:=(2 * (VAR1 - VAR2));FILLRGN((VAR1 >= 0),0,(VAR1 * 0.8),COLORRED);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.7),COLORMAGENTA);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.6),COLORYELLOW);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.5),COLORGREEN);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.4),COLORBLUE);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.3),COLORLIGHTGREEN);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.2),COLORLIGHTBLUE);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.1),COLORCYAN);FILLRGN((VAR1 < 0),0,(VAR1 * 0.8),COLORRED);FILLRGN((VAR1 < 0),0,(VAR1 * 0.7),COLORMAGENTA);FILLRGN((VAR1 < 0),0,(VAR1 * 0.6),COLORYELLOW);FILLRGN((VAR1 < 0),0,(VAR1 * 0.5),COLORGREEN);FILLRGN((VAR1 < 0),0,(VAR1 * 0.4),COLORBLUE);FILLRGN((VAR1 < 0),0,(VAR1 * 0.3),COLORLIGHTGREEN);FILLRGN((VAR1 < 0),0,(VAR1 * 0.2),COLORLIGHTBLUE);FILLRGN((VAR1 < 0),0,(VAR1 * 0.1),COLORCYAN);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.8),COLORRED);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.7),COLORMAGENTA);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.6),COLORYELLOW);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.5),COLORGREEN);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.4),COLORBLUE);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.3),COLORLIGHTGREEN);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.2),COLORLIGHTBLUE);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.1),COLORCYAN);FILLRGN((VAR2 < 0),0,(VAR2 * 0.8),COLORRED);FILLRGN((VAR2 < 0),0,(VAR2 * 0.7),COLORMAGENTA);FILLRGN((VAR2 < 0),0,(VAR2 * 0.6),COLORYELLOW);FILLRGN((VAR2 < 0),0,(VAR2 * 0.5),COLORGREEN);FILLRGN((VAR2 < 0),0,(VAR2 * 0.4),COLORBLUE);FILLRGN((VAR2 < 0),0,(VAR2 * 0.3),COLORLIGHTGREEN);FILLRGN((VAR2 < 0),0,(VAR2 * 0.2),COLORLIGHTBLUE);FILLRGN((VAR2 < 0),0,(VAR2 * 0.1),COLORCYAN);金融天娇赢利公式参数:n1 21;n2 7;X1:=HHV(HIGH,N1);X2:=LLV(LOW,N2);D1:(X1+X2*2)/3,COLORGREEN;TMP:=D1-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.00001,OPEN,CLOSE,COLORCYAN,1);STICKLINE(TMP<-0.00001,OPEN,CLOSE,COLORRED,1);金龙行天下C:=CLOSE;L:=LOW;H:=HIGH;O:=OPEN;RSV:=(C-LLV(L,7))/(HHV(H,7)-LLV(L,7))*100;RSV1:=(C-LLV(L,38))/(HHV(H,38)-LLV(L,38))*100;LJ:SMA(RSV1,5,1),COLORWHITE;SY:SMA(LJ,10,1),COLORYELLOW;FILLRGN(LJ<=SY,LJ,SY,COLORGREEN);FILLRGN(LJ>=SY,SY,LJ,COLORRED);A:=(3*C+L+O+H)/6;VAR2Q:=MA(C,80)-MA(C,13)/3;SQX:=MA((C-VAR2Q)/VAR2Q,1);XA:=EMA(SQX,12)*0.7;XB:=EMA(SQX,3);DBQY:IF(LLV(XB-XA,12)>0,0,-15),COLORBLUE;DIFF:=(EMA(C,17)-EMA(C,73))*100;DEA:=EMA(DIFF,73);MACD:=2*(DIFF-DEA);STICKLINE(DIFF<=0 && DEA<=DIFF && REF(DIFF,1)<REF(DEA,1),3,26,COLORCYAN,0); IF(DIFF<=0 && DEA<=DIFF && REF(DIFF,1)<REF(DEA,1),10,0),COLORMAGENTA;胶实测年收益达176%的模型(胶30分线)MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);MA40:=MA(CLOSE,40);MA80:=MA(CLOSE,80);CROSS(MA5,MA10) {5均线上穿10均线且均线成多头排列,买平买开}&&MA10>REF(MA10,1)&&REF(MA10,1)>REF(MA10,2)&&MA5>REF(MA5,1)&&REF(MA5,1)>REF(MA5,2),BPK;CROSS(MA10,MA5) {5均线下穿10均线且均线成空头排列,卖平卖开}&&MA10<REF(MA10,1)&&REF(MA10,1)<REF(MA10,2)&&MA5<REF(MA5,1)&&REF(MA5,1)<REF(MA5,2),SPK;自已做的模型,目的在于和大家交流,希望志同道合者回贴。

文华财经指标公式源码箱体突破公式源码

文华财经指标公式源码箱体突破公式源码

/*短线:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*20,LINETHICK0,COLOR YELLOW;中线:=(CLOSE-MA(CLOSE,4))/MA(CLOSE,4)*20,LINETHICK0,COLORWH ITE;红柱:SMA(短线,3,1),LINETHICK0,COLOR0000FF;蓝柱:SMA(中线,3,1),COLORSTICK,COLORFFFF00;{红柱}STICKLINE(红柱<REF(红柱,0.5)AND 红柱>0,0,红柱,8,0),COLOR0000AA;STICKLINE(红柱<REF(红柱,0.5)AND 红柱>0,0,红柱,7,0),COLOR0000BB;STICKLINE(红柱<REF(红柱,0.5)AND 红柱>0,0,红柱,6,0),COLOR0000CC;STICKLINE(红柱<REF(红柱,0.5)AND 红柱>0,0,红柱,5,0),COLOR0000DD;STICKLINE(红柱<REF(红柱,0.5)AND 红柱>0,0,红柱,4,0),COLOR0000EE;STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,3,0),COLOR0000FF; STICKLINE(红柱<REF(红柱,1)AND 红柱>0,0,红柱,2,0),COLORRED; STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,8,0),COLOR0000AA;STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,7,0),COLOR0000BB;STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,6,0),COLOR0000CC;STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,5,0),COLOR0000DD;STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,4,0),COLOR0000EE; STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,3,0),COLOR0000FF; STICKLINE(红柱>REF(红柱,1)AND 红柱>0,0,红柱,2,0),COLORRED; STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,9,0),COLOR0000FF;STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,7,0),COLOR0033FF;STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,6,0),COLOR0055FF;STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,5,0),COLOR0077FF;STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,4,0),COLOR0099FF;STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,3,0),COLOR00BBFF;STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,2,0),COLOR00DDFF;STICKLINE(蓝柱<REF(蓝柱,1) AND 蓝柱>0,0,蓝柱,1,0),COLOR00FFFF;{蓝柱}STICKLINE(红柱>REF(红柱,0)AND 红柱<0,0,红柱,8,0),COLORFF0000; STICKLINE(红柱>REF(红柱,0)AND 红柱<0,0,红柱,7,0),COLORFF3300; STICKLINE(红柱>REF(红柱,0)AND 红柱<0,0,红柱,6,0),COLORFF5500; STICKLINE(红柱>REF(红柱,0)AND 红柱<0,0,红柱,5,0),COLORFF7700; STICKLINE(红柱>REF(红柱,0)AND 红柱<0,0,红柱,4,0),COLORFF9900; STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,3,0),COLORFFBB00;STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,2,0),COLORFFDD00;STICKLINE(红柱>REF(红柱,1)AND 红柱<0,0,红柱,1,0),COLORFFFF00; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,8,0),COLORFF0000; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,7,0),COLORFF3300; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,6,0),COLORFF5500; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,5,0),COLORFF7700; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,4,0),COLORFF9900; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,3,0),COLORFFBB00; STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,2,0),COLORFFDD00;STICKLINE(红柱<REF(红柱,1)AND 红柱<0,0,红柱,1,0),COLORFFFF00; STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,10,0),COLOR998800;STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,7,0),COLORBBAA90;STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,4,0),COLORDDCC99;STICKLINE(蓝柱>REF(蓝柱,1)AND 蓝柱<0,0,蓝柱,1,0),COLORFFEEBB;*/M1:=10;M2:=10;M3:=20;M4:=20;MA1:MA(CLOSE,M1);MA2:MA(CLOSE,M2);MA3:MA(CLOSE,M3);MA4:MA(CLOSE,M4);AB:=EMA(((2*C+H+L)/4-LLV(LOW,30))/(HHV(HIGH,30)-LLV(LOW,30))*100,8); BA:=EMA(AB,5);A1:=REFX1(REF(HHV(H,96),5),10000);B1:=REFX1(REF(LLV(L,96),5),10000);DY:=((A1)+(B1))/2;箱顶:IF(AB>0 AND AB-BA<=0,A1,A1),LINETHICK3,COLOR00FF00;箱腰:IF(AB>0 AND AB-BA<=0,DY,DY),LINETHICK3,COLOR00FF00;箱低:IF(AB>0 AND AB-BA<=0,B1,B1),LINETHICK3,COLOR00FF00;高1:IF(AB>0 AND AB-BA>0,A1,NULL),LINETHICK3,COLORRED;中1:IF(AB>0 AND AB-BA>0,DY,NULL),LINETHICK3,COLORRED;低1:IF(AB>0 AND AB-BA>0,B1,NULL),LINETHICK3,COLORRED;。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

文华财经公式判断趋势MA50:MA(CLOSE,50);STICKLINE(CLOSE<MA50,OPEN,CLOSE,COLORCYAN,0); DRAWLINE(CLOSE<MA50,HIGH,CLOSE<MA50,LOW,COLORCYAN); STICKLINE(CLOSE>MA50,OPEN,CLOSE,COLORRED,0); DRAWLINE(CLOSE>MA50,HIGH,CLOSE>MA50,LOW,COLORRED); 每日均价A1:=IF(DAY=1,CLOSE,0);A2:=IF(DAY=2,CLOSE,0);A3:=IF(DAY=3,CLOSE,0);A4:=IF(DAY=4,CLOSE,0);A5:=IF(DAY=5,CLOSE,0);A6:=IF(DAY=6,CLOSE,0);A7:=IF(DAY=7,CLOSE,0);A8:=IF(DAY=8,CLOSE,0);A9:=IF(DAY=9,CLOSE,0);A10:=IF(DAY=10,CLOSE,0);A11:=IF(DAY=11,CLOSE,0);A12:=IF(DAY=12,CLOSE,0);A13:=IF(DAY=13,CLOSE,0);A14:=IF(DAY=14,CLOSE,0);A15:=IF(DAY=15,CLOSE,0);A16:=IF(DAY=16,CLOSE,0);A17:=IF(DAY=17,CLOSE,0);A18:=IF(DAY=18,CLOSE,0);A19:=IF(DAY=19,CLOSE,0);A20:=IF(DAY=20,CLOSE,0);A21:=IF(DAY=21,CLOSE,0);A22:=IF(DAY=22,CLOSE,0);A23:=IF(DAY=23,CLOSE,0);A24:=IF(DAY=24,CLOSE,0);A25:=IF(DAY=25,CLOSE,0);A26:=IF(DAY=26,CLOSE,0);A27:=IF(DAY=27,CLOSE,0);A28:=IF(DAY=28,CLOSE,0);A29:=IF(DAY=29,CLOSE,0);A30:=IF(DAY=30,CLOSE,0);A31:=IF(DAY=31,CLOSE,0);B1:=IF(DAY=1,VOL,0);B2:=IF(DAY=2,VOL,0);B3:=IF(DAY=3,VOL,0);B4:=IF(DAY=4,VOL,0);B5:=IF(DAY=5,VOL,0);B6:=IF(DAY=6,VOL,0);B7:=IF(DAY=7,VOL,0);B8:=IF(DAY=8,VOL,0);B9:=IF(DAY=9,VOL,0);B10:=IF(DAY=10,VOL,0);B11:=IF(DAY=11,VOL,0);B12:=IF(DAY=12,VOL,0);B13:=IF(DAY=13,VOL,0);B14:=IF(DAY=14,VOL,0);B15:=IF(DAY=15,VOL,0);B16:=IF(DAY=16,VOL,0);B17:=IF(DAY=17,VOL,0);B18:=IF(DAY=18,VOL,0);B19:=IF(DAY=19,VOL,0);B20:=IF(DAY=20,VOL,0);B21:=IF(DAY=21,VOL,0);B22:=IF(DAY=22,VOL,0);B23:=IF(DAY=23,VOL,0);B24:=IF(DAY=24,VOL,0);B25:=IF(DAY=25,VOL,0);B26:=IF(DAY=26,VOL,0);B27:=IF(DAY=27,VOL,0);B28:=IF(DAY=28,VOL,0);B29:=IF(DAY=29,VOL,0);B30:=IF(DAY=30,VOL,0);B31:=IF(DAY=31,VOL,0);AB1:=SUM(A1*B1,N)/SUM(B1,N);AB2:=SUM(A2*B2,N)/SUM(B2,N);AB3:=SUM(A3*B3,N)/SUM(B3,N);AB4:=SUM(A4*B4,N)/SUM(B4,N);AB5:=SUM(A5*B5,N)/SUM(B5,N);AB6:=SUM(A6*B6,N)/SUM(B6,N);AB7:=SUM(A7*B7,N)/SUM(B7,N);AB8:=SUM(A8*B8,N)/SUM(B8,N);AB9:=SUM(A9*B9,N)/SUM(B9,N);AB10:=SUM(A10*B10,N)/SUM(B10,N); AB11:=SUM(A11*B11,N)/SUM(B11,N); AB12:=SUM(A12*B12,N)/SUM(B12,N); AB13:=SUM(A13*B13,N)/SUM(B13,N); AB14:=SUM(A14*B14,N)/SUM(B14,N); AB15:=SUM(A15*B15,N)/SUM(B15,N); AB16:=SUM(A16*B16,N)/SUM(B16,N); AB17:=SUM(A17*B17,N)/SUM(B17,N); AB18:=SUM(A18*B18,N)/SUM(B18,N);AB19:=SUM(A19*B19,N)/SUM(B19,N); AB20:=SUM(A20*B20,N)/SUM(B20,N); AB21:=SUM(A21*B21,N)/SUM(B21,N); AB22:=SUM(A22*B22,N)/SUM(B22,N); AB23:=SUM(A23*B23,N)/SUM(B23,N); AB24:=SUM(A24*B24,N)/SUM(B24,N); AB25:=SUM(A25*B25,N)/SUM(B25,N); AB26:=SUM(A26*B26,N)/SUM(B26,N); AB27:=SUM(A27*B27,N)/SUM(B27,N); AB28:=SUM(A28*B28,N)/SUM(B28,N); AB29:=SUM(A29*B29,N)/SUM(B29,N); AB30:=SUM(A30*B30,N)/SUM(B30,N); AB31:=SUM(A31*B31,N)/SUM(B31,N); PARTLINE(DAY=1,AB1,COLORYELLOW); PARTLINE(DAY=2,AB2,COLORYELLOW); PARTLINE(DAY=3,AB3,COLORYELLOW); PARTLINE(DAY=4,AB4,COLORYELLOW); PARTLINE(DAY=5,AB5,COLORYELLOW); PARTLINE(DAY=6,AB6,COLORYELLOW); PARTLINE(DAY=7,AB7,COLORYELLOW); PARTLINE(DAY=8,AB8,COLORYELLOW); PARTLINE(DAY=9,AB9,COLORYELLOW); PARTLINE(DAY=10,AB10,COLORYELLOW); PARTLINE(DAY=11,AB11,COLORYELLOW); PARTLINE(DAY=12,AB12,COLORYELLOW); PARTLINE(DAY=13,AB13,COLORYELLOW); PARTLINE(DAY=14,AB14,COLORYELLOW); PARTLINE(DAY=15,AB15,COLORYELLOW); PARTLINE(DAY=16,AB16,COLORYELLOW); PARTLINE(DAY=17,AB17,COLORYELLOW); PARTLINE(DAY=18,AB18,COLORYELLOW); PARTLINE(DAY=19,AB19,COLORYELLOW); PARTLINE(DAY=20,AB20,COLORYELLOW); PARTLINE(DAY=21,AB21,COLORYELLOW); PARTLINE(DAY=22,AB22,COLORYELLOW); PARTLINE(DAY=23,AB23,COLORYELLOW); PARTLINE(DAY=24,AB24,COLORYELLOW); PARTLINE(DAY=25,AB25,COLORYELLOW); PARTLINE(DAY=26,AB26,COLORYELLOW); PARTLINE(DAY=27,AB27,COLORYELLOW); PARTLINE(DAY=28,AB28,COLORYELLOW); PARTLINE(DAY=29,AB29,COLORYELLOW); PARTLINE(DAY=30,AB30,COLORYELLOW); PARTLINE(DAY=31,AB31,COLORYELLOW);N=31买卖频谱X:=BARSLAST(HIGH=HHV(HIGH,N));LL:=MIN(REF(LOW,X+3),MIN(REF(LOW,X+2),MIN(REF(LOW,X),REF(LOW,X+1))));Y:=BARSLAST(LOW=LLV(LOW,N));HH:=MAX(REF(HIGH,Y+3),MAX(REF(HIGH,Y+2),MAX(REF(HIGH,Y),REF(HIGH,Y+1))));A:=BARSLAST(CLOSE>=HH);B:=BARSLAST(CLOSE<=LL);AB:IF(A>B,HH,LL);TM:=CLOSE>=AB;TP:=CLOSE<AB;DRAWLINE(TP,HIGH,TP,OPEN,COLORCYAN);DRAWLINE(TP,LOW,TP,CLOSE,COLORCYAN);DRAWLINE(TM,HIGH,TM,CLOSE,COLORRED);DRAWLINE(TM,LOW,TM,OPEN,COLORRED);STICKLINE(TP,OPEN,CLOSE,COLORCYAN,0);STICKLINE(TM,OPEN,CLOSE,COLORRED,1);HH1:=BARSLAST((HH > REF(HH,1)));LL1:=BARSLAST((LL < REF(LL,1)));N=10龙出沧海公式VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6;DTX:(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4)+15*REF( VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR2,9)+10*REF(VAR2, 10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF(VAR2,14)+5*REF(VAR2,15)+4 *REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+REF(VAR2,20))/210,COLORWHITE;KTX: MA(DTX,10), COLORYELLOW;STICKLINE(DTX>KTX,DTX,KTX, COLORRED,10);STICKLINE(DTX<KTX,DTX,KTX, COLORGREEN,10) ;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE, COLORRED,1);DRAWLINE(CLOSE>=OPEN,HIGH, CLOSE>=OPEN,CLOSE, COLORRED);DRAWLINE(CLOSE>=OPEN,LOW, CLOSE>=OPEN,OPEN, COLORRED);STICKLINE(CLOSE<OPEN,OPEN,CLOSE, COLORGREEN,0);DRAWLINE(CLOSE<OPEN,HIGH, CLOSE<OPEN,LOW, COLORGREEN);MU:MA(CLOSE,60),COLORBLUE;MH:MA(CLOSE,360),COLORMAGENTA;龙出沧海VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6;DTX:(20*VAR2+19*REF(VAR2,1)+18*REF(VAR2,2)+17*REF(VAR2,3)+16*REF(VAR2,4)+15*REF( VAR2,5)+14*REF(VAR2,6)+13*REF(VAR2,7)+12*REF(VAR2,8)+11*REF(VAR2,9)+10*REF(VAR2, 10)+9*REF(VAR2,11)+8*REF(VAR2,12)+7*REF(VAR2,13)+6*REF(VAR2,14)+5*REF(VAR2,15)+4 *REF(VAR2,16)+3*REF(VAR2,17)+2*REF(VAR2,18)+REF(VAR2,20))/210,COLORWHITE;KTX: MA(DTX,10), COLORYELLOW;STICKLINE(DTX>KTX,DTX,KTX, COLORLIGHTRED,10);STICKLINE(DTX<KTX,DTX,KTX, COLORBLUE,10) ;STICKLINE(CLOSE>=OPEN,OPEN,CLOSE, COLORRED,1);DRAWLINE(CLOSE>=OPEN,HIGH, CLOSE>=OPEN,CLOSE, COLORRED); DRAWLINE(CLOSE>=OPEN,LOW, CLOSE>=OPEN,OPEN, COLORRED); STICKLINE(CLOSE<OPEN,OPEN,CLOSE, COLORGREEN,0);DRAWLINE(CLOSE<OPEN,HIGH, CLOSE<OPEN,LOW, COLORGREEN);两个指标Y:=(HIGH+LOW)/2;AO:MA(Y ,5 )-MA(Y ,34 ),COLORWHITE;AO1:=REF(AO,1);AC:AO-MA( AO,5),COLORYELLOW;A:0.99*(AO+AC)/2,COLORRED;AC1:=REF(AC,1);STICKLINE(AO>0&&AC>0,0,AO+AC,COLORRED,0);STICKLINE(AO<0&&AC>0,0,AO,COLORWHITE,1);STICKLINE(AO<0&&AC>0,0,AO+AC,COLORWHITE,0);STICKLINE(AO>0&&AC<0,0,AO,COLORRED,1);STICKLINE(AO>0&&AC<0,0,AC+AO,COLORRED,0);STICKLINE(AO<0&&AC<0,0,AC+AO,COLORWHITE,0);俩条飘带C:=CLOSE;HZ:=EMA(CLOSE,13);DB:EMA(HZ,1),COLORWHITE;ZB:EMA(HZ,26),COLORMAGENTA;JX148:=EMA(C,148);HZ2:EMA(HZ,8),COLORGREEN;HZ4:EMA(HZ,39),COLORMAGENTA;FILLRGN(DB>HZ2,DB,HZ2,COLORGREEN);FILLRGN(DB<HZ2,DB,HZ2,COLORWHITE);FILLRGN(ZB>HZ4,ZB,HZ4,COLORMAGENTA);FILLRGN(ZB<HZ4,ZB,HZ4,COLORBLUE);可以变色K线MID:=MA(CLOSE,20);UPPER:=MID+2*STD(CLOSE,20);LOWER:=MID-2*STD(CLOSE,20);V1:=(CLOSE-LOWER)/(UPPER-LOWER)*100;V2:=V1-EMA(V1,5);K1:=SUM(LLV(V2,4),4)/4;V3:=EMA(V2,64)*10;V4:=EMA(0.4*V2*(-1),3);V5:=-1*EMA(V2,39)*10;A:=V3>10;B:=V2>V4;D:=V5>10;E:=V3<=10||V2<=V4||V5<=10;KS:=(CLOSE-SMA(CLOSE,13,1))/SMA(CLOSE,13,1)*(-100);RKS:=REF(KS,1);MLS:=RKS/KS>1.23 && RKS>13 && CLOSE/REF(CLOSE,1)>1.03;DRAWLINE(CLOSE>=OPEN && E,HIGH,CLOSE>=OPEN && E,LOW,COLORRED); STICKLINE(CLOSE>=OPEN && E,CLOSE,OPEN,COLORRED,0);DRAWLINE(CLOSE< OPEN && E,HIGH,CLOSE< OPEN && E,LOW,COLORGREEN); STICKLINE(CLOSE< OPEN && E,CLOSE,OPEN,COLORGREEN,0);DRAWLINE(OPEN> CLOSE && A,LOW,OPEN> CLOSE && A,HIGH,COLORYELLOW); STICKLINE(OPEN> CLOSE && A,CLOSE,OPEN,COLORYELLOW,0);DRAWLINE(OPEN<=CLOSE && A,LOW,OPEN<=CLOSE && A,HIGH,COLORYELLOW); STICKLINE(OPEN<=CLOSE && A,CLOSE,OPEN,COLORYELLOW,1);DRAWLINE(OPEN> CLOSE && B,LOW,OPEN> CLOSE && B,HIGH,COLORRED); STICKLINE(OPEN> CLOSE && B,CLOSE,OPEN,COLORRED,0);DRAWLINE(OPEN<=CLOSE && B,LOW,OPEN<=CLOSE && B,HIGH,COLORRED); STICKLINE(OPEN<=CLOSE && B,CLOSE,OPEN,COLORRED,1);DRAWLINE(OPEN> CLOSE && D,LOW,OPEN> CLOSE && D,HIGH,COLORGREEN); STICKLINE(OPEN> CLOSE && D,CLOSE,OPEN,COLORGREEN,0);DRAWLINE(OPEN<=CLOSE && D,LOW,OPEN<=CLOSE && D,HIGH,COLORGREEN); STICKLINE(OPEN<=CLOSE && D,CLOSE,OPEN,COLORGREEN,1);DRAWLINE(KS>13,HIGH,KS>13,LOW,COLORWHITE);DRAWLINE(MLS=1,HIGH,MLS=1,LOW,COLORMAGENTA);STICKLINE(KS>13,OPEN,CLOSE,COLORWHITE,1);STICKLINE(MLS=1,OPEN,CLOSE,COLORMAGENTA,1);HH:=HHV(HIGH,N);LL:=LLV(LOW,N);HH1:=BARSLAST((HH > REF(HH,1)));LL1:=BARSLAST((LL < REF(LL,1)));DRAWTEXT(CROSS(HH1,LL1),HH,'开空');DRAWTEXT(CROSS(LL1,HH1),LL,'开多');T:=IF(HH1>LL1,1,-1);G:=IF(HH1>LL1,HH,LL);DRAWLINE(T=1&&REF(T,1)=1,G,T=1&&REF(T,1)=1,REF(G,1),COLORCYAN); 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,COLORCYAN);DRAWSL(T=-1,G,0,1,0,COLORRED);N=10考夫曼的ama-自适应移动平均线交易指标:DIRECTION:=CLOSE-REF(CLOSE,N);VOLATILITY:=SUM(ABS((CLOSE-REF(CLOSE,1))),N);ER:=ABS(DIRECTION/VOLATILITY);FASTSC:=2/(2 + 1);SLOWSC:=2/(30 + 1);SSC:=ER*(FASTSC-SLOWSC)+SLOWSC;CONSTANT:=SSC*SSC;AMAHIGH:REF(EMA(HIGH,N),1)+CONSTANT*(HIGH- REF(EMA(HIGH,N),1)); AMALOW:REF(EMA(LOW,N),1)+CONSTANT*(LOW- REF(EMA(LOW,N),1));参数N的数值自己定义考夫曼的ama-自适应移动平均线交易模型:DIRECTION:=CLOSE-REF(CLOSE,N);VOLATILITY:=SUM(ABS((CLOSE-REF(CLOSE,1))),N);ER:=ABS(DIRECTION/VOLATILITY);FASTSC:=2/(2 + 1);SLOWSC:=2/(30 + 1);SSC:=ER*(FASTSC-SLOWSC)+SLOWSC;CONSTANT:=SSC*SSC;AMAHIGH:=REF(EMA(HIGH,N),1)+CONSTANT*(HIGH- REF(EMA(HIGH,N),1)); AMACLOSE:=REF(EMA(CLOSE,N),1)+CONSTANT*(CLOSE- REF(EMA(CLOSE,N),1)); AMALOW:=REF(EMA(LOW,N),1)+CONSTANT*(LOW- REF(EMA(LOW,N),1)); LOW>AMAHIGH,BK;CLOSE<AMACLOSE,SP;HIGH<AMALOW,SK;CLOSE>AMACLOSE,BP;开空开多HH:=HHV(HIGH,N);LL:=LLV(LOW,N);HH1:=BARSLAST((HH>REF(HH,1)));LL1:=BARSLAST((LL<REF(LL,1)));A:=IF((HH1 < LL1),1,IF((HH1 > LL1),-1,0));IF(A>=0,LL,HH),COLORYELLOW;STICKLINE((HH1 < LL1),CLOSE,OPEN,COLORRED,0);DRAWLINE((HH1 < LL1),HIGH,(HH1<LL1),LOW,COLORRED);STICKLINE((HH1 > LL1),CLOSE,OPEN,COLORBLUE,0);DRAWLINE((HH1 > LL1),HIGH,(HH1 > LL1),LOW,COLORBLUE);DRAWTEXT(CROSS(HH1,LL1),HH,'开空');DRAWTEXT(CROSS(LL1,HH1),LL,'开多');N=15,N=10决战MACDVAR1:=((EMA(CLOSE,12) - EMA(CLOSE,26)) * 100);VAR2:=EMA(VAR1,9);VAR3:=(2 * (VAR1 - VAR2));FILLRGN((VAR1 >= 0),0,(VAR1 * 0.8),COLORRED);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.7),COLORMAGENTA);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.6),COLORYELLOW);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.5),COLORGREEN);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.4),COLORBLUE);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.3),COLORLIGHTGREEN);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.2),COLORLIGHTBLUE);FILLRGN((VAR1 >= 0),0,(VAR1 * 0.1),COLORCYAN);FILLRGN((VAR1 < 0),0,(VAR1 * 0.8),COLORRED);FILLRGN((VAR1 < 0),0,(VAR1 * 0.7),COLORMAGENTA);FILLRGN((VAR1 < 0),0,(VAR1 * 0.6),COLORYELLOW);FILLRGN((VAR1 < 0),0,(VAR1 * 0.5),COLORGREEN);FILLRGN((VAR1 < 0),0,(VAR1 * 0.4),COLORBLUE);FILLRGN((VAR1 < 0),0,(VAR1 * 0.3),COLORLIGHTGREEN);FILLRGN((VAR1 < 0),0,(VAR1 * 0.2),COLORLIGHTBLUE);FILLRGN((VAR1 < 0),0,(VAR1 * 0.1),COLORCYAN);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.8),COLORRED);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.7),COLORMAGENTA);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.6),COLORYELLOW);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.5),COLORGREEN);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.4),COLORBLUE);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.3),COLORLIGHTGREEN);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.2),COLORLIGHTBLUE);FILLRGN((VAR2 >= 0),0,(VAR2 * 0.1),COLORCYAN);FILLRGN((VAR2 < 0),0,(VAR2 * 0.8),COLORRED);FILLRGN((VAR2 < 0),0,(VAR2 * 0.7),COLORMAGENTA);FILLRGN((VAR2 < 0),0,(VAR2 * 0.6),COLORYELLOW);FILLRGN((VAR2 < 0),0,(VAR2 * 0.5),COLORGREEN);FILLRGN((VAR2 < 0),0,(VAR2 * 0.4),COLORBLUE);FILLRGN((VAR2 < 0),0,(VAR2 * 0.3),COLORLIGHTGREEN);FILLRGN((VAR2 < 0),0,(VAR2 * 0.2),COLORLIGHTBLUE);FILLRGN((VAR2 < 0),0,(VAR2 * 0.1),COLORCYAN);金融天娇赢利公式参数:n1 21;n2 7;X1:=HHV(HIGH,N1);X2:=LLV(LOW,N2);D1:(X1+X2*2)/3,COLORGREEN;TMP:=D1-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.00001,OPEN,CLOSE,COLORCYAN,1);STICKLINE(TMP<-0.00001,OPEN,CLOSE,COLORRED,1);金龙行天下C:=CLOSE;L:=LOW;H:=HIGH;O:=OPEN;RSV:=(C-LLV(L,7))/(HHV(H,7)-LLV(L,7))*100;RSV1:=(C-LLV(L,38))/(HHV(H,38)-LLV(L,38))*100;LJ:SMA(RSV1,5,1),COLORWHITE;SY:SMA(LJ,10,1),COLORYELLOW;FILLRGN(LJ<=SY,LJ,SY,COLORGREEN);FILLRGN(LJ>=SY,SY,LJ,COLORRED);A:=(3*C+L+O+H)/6;VAR2Q:=MA(C,80)-MA(C,13)/3;SQX:=MA((C-VAR2Q)/VAR2Q,1);XA:=EMA(SQX,12)*0.7;XB:=EMA(SQX,3);DBQY:IF(LLV(XB-XA,12)>0,0,-15),COLORBLUE;DIFF:=(EMA(C,17)-EMA(C,73))*100;DEA:=EMA(DIFF,73);MACD:=2*(DIFF-DEA);STICKLINE(DIFF<=0 && DEA<=DIFF && REF(DIFF,1)<REF(DEA,1),3,26,COLORCYAN,0); IF(DIFF<=0 && DEA<=DIFF && REF(DIFF,1)<REF(DEA,1),10,0),COLORMAGENTA;胶实测年收益达176%的模型(胶30分线)MA5:=MA(CLOSE,5);MA10:=MA(CLOSE,10);MA40:=MA(CLOSE,40);MA80:=MA(CLOSE,80);CROSS(MA5,MA10) {5均线上穿10均线且均线成多头排列,买平买开}&&MA10>REF(MA10,1)&&REF(MA10,1)>REF(MA10,2)&&MA5>REF(MA5,1)&&REF(MA5,1)>REF(MA5,2),BPK;CROSS(MA10,MA5) {5均线下穿10均线且均线成空头排列,卖平卖开}&&MA10<REF(MA10,1)&&REF(MA10,1)<REF(MA10,2)&&MA5<REF(MA5,1)&&REF(MA5,1)<REF(MA5,2),SPK;自已做的模型,目的在于和大家交流,希望志同道合者回贴。

相关文档
最新文档