火旺旺 / 公式 / 文华指标3

分享

   

文华指标3

2012-07-31  火旺旺

文华指标

(2011-08-08 19:52:03)
标签:

杂谈

文华专用指标- 雷凯投资 超短线:(cc)

H1:=IF(H<REF(H,2)&&REF(H,1)<REF(H,2)&&REF(H,2)>=REF(H,3)&&REF(H,2)>=REF(H,4), REF(H,2),0);
L1:=IF(L>REF(L,2)&&REF(L,1)>REF(L,2)&&REF(L,2)<=REF(L,3)&&REF(L,2)<=REF(L,4), REF(L,2),0);
H2:=VALUEWHEN(H1>0,H1);
L2:=VALUEWHEN(L1>0,L1);
K1:=IF(H>H2,-3,IF(L<L2,1,0));
K2:=VALUEWHEN(K1<>0,K1);
G:=IF(K2=1,H2,L2);
G1:=VALUEWHEN(ISLASTBAR,G);
DRAWNUMBER(L>0,G1,G1,0,COLORCYAN);
TMP:=VALUEWHEN(K1<>0,K1);
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,0);
DRAWLINE(TMP=1&&REF(TMP,1)=1,G,TMP=1&&REF(TMP,1)=1,REF(G,1),COLORCYAN);
DRAWLINE(TMP=-3&&REF(TMP,1)=-3,G,TMP=-3&&REF(TMP,1)=-3,REF(G,1),COLORRED);
DRAWSL(K2=1,G,0,1,0,COLORCYAN);
DRAWSL(K2=-3,G,0,1,0,COLORRED);

YY: (MA(C,3)+MA(C,4)+MA(C,5)+MA(C,6))/4,COLORBLUE;
VV: (MA(C,8)+MA(C,9)+MA(C,6)+MA(C,7))/4,COLORBLUE;
WW:=(MA(C,4)+MA(C,8)+MA(C,16)+MA(C,32))/4;
AA: (MA(C,13)+MA(C,21)+MA(C,34)+MA(C,55))/4,COLORMAGENTA;
DRAWTEXT(CROSS(C,WW),L-0.02,'
');
DRAWTEXT(CROSS(WW,C),H+0.06,'
');
MA60:MA(CLOSE,60),COLORGREEN;
MA120:MA(CLOSE,120),COLORRED;

 

 

大资金活动(dd)

VAR3:=(CLOSE-MA(CLOSE,6))/MA(CLOSE,6)*100;
VAR4:=(CLOSE-MA(CLOSE,24))/MA(CLOSE,24)*100;
VAR5:=(CLOSE-MA(CLOSE,32))/MA(CLOSE,32)*100;
VAR6:=(VAR3+VAR4+VAR5)/3;
VAR7:=EMA(VAR6,5);
ZHIB: EMA(EMA(VAR3,5),5)*3, COLORSTICK;
VAR8:=IF(VAR6<=-20,10,0);
VAR9:=HHV(VAR8,10);
STICKLINE(VAR8=10,20,10,COLORRED,0);
VARA:=IF(VAR9 && CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
K:EMA(VAR7,5)*2,COLORGREEN;
D:EMA(K,5), COLORWHITE;
J:K*3-D*2, COLORYELLOW;
VARB:=BETWEEN(CLOSE,MA(CLOSE,3),MA(CLOSE,5)) && J>10;
DRAWTEXT(VARA=20,15,'
底部');
STICKLINE((VARA=20),0,10,COLORWHITE,0);
VARC:=(ZIGZAG(CLOSE,5,1)>REF(ZIGZAG(CLOSE,5,1),1)) && (REF(ZIGZAG(CLOSE,5,1),1)<=REF(ZIGZAG(CLOSE,5,1),2)) && (REF(ZIGZAG
(CLOSE,5,1),2)<=REF(ZIGZAG(CLOSE,5,1),3));
VARD:=(ZIGZAG(CLOSE,5,1)<REF(ZIGZAG(CLOSE,5,1),1)) && (REF(ZIGZAG(CLOSE,5,1),1)>=REF(ZIGZAG(CLOSE,5,1),2)) && (REF(ZIGZAG
(CLOSE,5,1),2)>=REF(ZIGZAG(CLOSE,5,1),3));
STICKLINE((VARC=1),(-14),0,COLORMAGENTA,0);
DRAWTEXT((VARC=1),(-14),'
');
STICKLINE((VARD=1),14,0,COLORGREEN,0);
DRAWTEXT((VARD=1),18,'
');
VARE:=MA(100*(CLOSE-LLV(CLOSE,34))/(HHV(HIGH,34)-LLV(LOW,34)),5)-20;
VARF:=100-3*SMA((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA
((CLOSE-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR10:=100-3*SMA((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1)+2*SMA(SMA
((OPEN-LLV(LOW,75))/(HHV(HIGH,75)-LLV(LOW,75))*100,20,1),15,1);
VAR11:=VARF<REF(VAR10,1) && VOL>REF(VOL,1) && CLOSE>REF(CLOSE,1);
DRAWTEXT(VAR11 && COUNT(VAR11,30)=1,15,'
大资金活动');
STICKLINE(VAR11 && COUNT(VAR11,30)=1,1,10,COLORCYAN,0);
VAR12:=(HIGH+LOW+CLOSE)/3;
VAR13:=(VAR12-MA(VAR12,14))/(0.015*AVEDEV(VAR12,14));
VAR14:=(VAR12-MA(VAR12,70))/(0.015*AVEDEV(VAR12,70));
VAR15:=IF(VAR13>=150 && VAR13<200 && VAR14>=150 && VAR14<200,10,0);
VAR16:=IF(VAR13<=-150 && VAR13>-200 && VAR14<=-150 && VAR14>-200,-10,VAR15);
VAR17:=(CLOSE-MA(CLOSE,13))/MA(CLOSE,13)*100;
VAR18:=100-ABS(VAR17);
VAR19:=IF(VAR18<90,VAR18,100);
VAR1A:=IF(VARE>0,VARE,0);
VAR1B:=IF(VAR14>=200 && VAR13>=150,15,IF(VAR14<=-200 && VAR13<=-150,-15,VAR16))+60;
VAR1C:=VAR1A>48 && VAR1B>60 && VAR19<100;
DRAWTEXT(VAR1C && COUNT(VAR1C,30)=1,15,'
大笔出货');
STICKLINE(VAR1C && COUNT(VAR1C,30)=1,0,10,COLORYELLOW,0

CCI突破 

5天大于10天大于30天线. CCI往上突破0.   开仓买入

5天小于10天小于30天线.CCI往下突破0,    开仓卖出

TYP:=(CLOSE+HIGH+LOW)/3;
CCI:(TYP-MA(TYP,N))/(0.015*AVEDEV(TYP,N));
MA(CLOSE,5)>MA(CLOSE,10)&&MA(CLOSE,10)>MA(CLOSE,30)&&CROSS(CCI,0),BPK;
MA(CLOSE,5)<MA(CLOSE,10)&&MA(CLOSE,10)<MA(CLOSE,30)&&CROSS(0,CCI),SPK;

 

我想用SAR/MACD/RSI/CCI做参考编辑模型  

我想用SAR/MACD/RSI/CCI做参考编辑模型可以吗?

做多:当SAR是支撑/MACD金*/RSI金*/CCI大于0值,至少应满足3个条件开多,平多为MACD死*或RSI死*并小于50

做空:当SAR是压力/MACD死*/RSI死*/CCI小于0值,至少应满足3个条件开空,平空为MACD金*或RSI金*并大于50

并且希望有:开多/加多/平多/开空/加空/平空等文字的提示,拜托各位高人了!感谢!

 

可以编写如下:

SARLINE:=SAR(4,0.02,0.2);
DIFF:=EMA(CLOSE,12) - EMA(CLOSE,26);
DEA:=EMA(DIFF,9);
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;
TYP:=(CLOSE+HIGH+LOW)/3;
CCI:=(TYP-MA(TYP,14))/(0.015*AVEDEV(TYP,14));
A1:=SARLINE>0;
B1:=SARLINE<0;
A2:=CROSS(DIFF,DEA);
B2:=CROSS(DEA,DIFF);
A3:=CROSS(RSI1,RSI2);
B3:=CROSS(RSI2,RSI1);
A4:=CCI>0;
B4:=CCI<0;
(A1&&A2&&A3)||(A1&&A2&&A4)||(A1&&A3&&A4)||(A2&&A3&&A4),BK;
B2||(B3&&RSI1<50&&RSI2<50),SP;
(B1&&B2&&B3)||(B1&&B2&&B4)||(B1&&B3&&B4)||(B2&&B3&&B4),SK;
A2||(A3&&RSI1>50&&RSI2>50),BP;

 

两头堵  

条件如下:玩法是这样,用一分钟图,均线设置5,13。
做多系统:价格上破13均线并且有连续2根收盘在13均线上,第三根开盘买入。
平仓条件是价格在13均线上,但有连续两根线收盘在5均线下,第三根开盘平仓。
平仓后,如果价格没破13均线,且有连续两根收盘价在5均线上,第三根线开盘买入,平仓条件同上。
做空系统:价格跌破13均线并且连续两根收盘在13均线下,第三根开盘,卖出。
平仓条件:价格上破5均线且连续2根收盘站稳在5均线上,第三根线开盘平仓。
平仓后,如果价格没破13均线,且有连续两根收盘价在5均线下,第三根线开盘买入,平仓条件同上。

可以编写如下:

MA5:=MA(CLOSE,5);
MA13:=MA(CLOSE,13);
LC1:=REF(CLOSE,1);
LC2:=REF(CLOSE,2);
LC3:=REF(CLOSE,3);
(CROSS(LC3,MA13)&&LC1>MA13&&LC2>MA13)||(LC1>MA13&&LC2>MA13&&LC1>MA5&&LC2>MA5),BK;
LC1>MA13&&LC2>MA13&&LC1<MA5&&LC2<MA5,SP;
(CROSS(MA13,LC3)&&LC1<MA13&&LC2<MA13)||(LC1>MA13&&LC2>MA13&&LC1<MA5&&LC2<MA5),SK;
CROSS(LC3,MA5)&&LC1>MA5&&LC2>MA5,BP;

 

心在山林  

[N,0.000000,30.000000,2.000000]
[M,0.000000,30.000000,5.000000]
K1:=(CLOSE-REF(CLOSE,3))/REF(CLOSE,3)*100;

K2:=(CLOSE-REF(CLOSE,4))/REF(CLOSE,4)*100;

K3:=(CLOSE-REF(CLOSE,5))/REF(CLOSE,5)*100;

K4:=(CLOSE-REF(CLOSE,6))/REF(CLOSE,6)*100;

KK1:=EMA(K1,2);

KK2:=EMA(K2,3);

KK3:=EMA(K3,4);

KK4:=EMA(K4,5);

KBQ:=(KK1+KK2+KK3+KK4)/4;

KB1:=EMA2(KBQ,N);

KB2:=EMA(KB1,M);

CROSS(KB1,KB2),BPK;

CROSS(KB2,KB1),SPK;

 

山溪 

MA(MA(CLOSE,5),3);
MA(MA(CLOSE,5),4);
MA(MA(CLOSE,5),5);
MA(MA(CLOSE,5),6);
MA(MA(CLOSE,5),7);
MA(MA(CLOSE,5),8);
MA(MA(CLOSE,5),9);
MA(MA(CLOSE,5),10);
TMP:=OPEN-CLOSE;
SARLINE:=ABS(SAR(3,0.01,0.1));
DRAWLINE(CLOSE>SARLINE,HIGH,TMP>0.00001,OPEN,COLORYELLOW);
DRAWLINE(CLOSE>SARLINE,LOW,TMP>0.00001,CLOSE,COLORYELLOW);
DRAWLINE(CLOSE>SARLINE,HIGH,TMP<-0.00001,CLOSE,COLORYELLOW);
DRAWLINE(CLOSE>SARLINE,LOW,TMP<-0.00001,OPEN,COLORYELLOW);
DRAWLINE(CLOSE>SARLINE,LOW,ABS(TMP)<0.00001,OPEN,COLORYELLOW);
DRAWLINE(CLOSE>SARLINE,HIGH,ABS(TMP)<0.00001,OPEN,COLORYELLOW);
STICKLINE(TMP>0&&CLOSE>SARLINE,OPEN,CLOSE,COLORYELLOW,0);
STICKLINE(TMP<=0&&CLOSE>SARLINE,OPEN,CLOSE,COLORYELLOW,1);

DRAWLINE(CLOSE<SARLINE,HIGH,TMP>0.00001,OPEN,COLORLIGHTGREY);
DRAWLINE(CLOSE<SARLINE,LOW,TMP>0.00001,CLOSE,COLORLIGHTGREY);
DRAWLINE(CLOSE<SARLINE,HIGH,TMP<-0.00001,CLOSE,COLORLIGHTGREY);
DRAWLINE(CLOSE<SARLINE,LOW,TMP<-0.00001,OPEN,COLORLIGHTGREY);
DRAWLINE(CLOSE<SARLINE,LOW,ABS(TMP)<0.00001,OPEN,COLORLIGHTGREY);
DRAWLINE(CLOSE<SARLINE,HIGH,ABS(TMP)<0.00001,OPEN,COLORLIGHTGREY);
STICKLINE(TMP>0&&CLOSE<SARLINE,OPEN,CLOSE,COLORLIGHTGREY,0);
STICKLINE(TMP<=0&&CLOSE<SARLINE,OPEN,CLOSE,COLORLIGHTGREY,1);

 

 

翻译成汉语  

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);

H:=HIGH;

L:=LOW;

HH1:=IF(H<REF(H,2)&&REF(H,1)<REF(H,2),REF(H,2),0);

LL1:=IF(L>REF(L,2)&&REF(L,1)>REF(L,2),REF(L,2),0);

HH2:=VALUEWHEN(HH1>0,HH1);

LL2:=VALUEWHEN(LL1>0,LL1);

K1:=IF(CLOSE>HH2,-3,IF(CLOSE<LL2,1,0));

K2:=VALUEWHEN(K1<>0,K1);

CROSS(AB,CLOSE)&&K2=1,SK;

CROSS(AB,CLOSE)||K2=1,SP;

CROSS(CLOSE,AB)&&K2=-3,BK;

CROSS(CLOSE,AB)||K2=-3,BP;

老师实在不好意思,我翻译了一下,感觉还是好多错误,你给我修改以下吧,谢谢。

X:=BARSLAST(HIGH=HHV(HIGH,N));(x=N日内的最高价到目前的周期数)

LL:=MIN(REF(LOW,X+3),MIN(REF(LOW,X+2),MIN(REF(LOW,X),REF(LOW,X+1))));(ll=X、x+1、x+2、x+3周日内的最低值的最小值)

Y:=BARSLAST(LOW=LLV(LOW,N));(y=N日内的最低价到目前的周期数)

HH:=MAX(REF(HIGH,Y+3),MAX(REF(HIGH,Y+2),MAX(REF(HIGH,Y),REF(HIGH,Y+1))));(hh=y、y+1、y+2、y+3周日内的最高价的最大值)

A:=BARSLAST(CLOSE>=HH);(a=收盘价>=最高价到目前的周期数)

B:=BARSLAST(CLOSE<=LL);(B=收盘价<=最低价到目前的周期数)

AB:=IF(A>B,HH,LL)(如果A>B,返回HHLL);

H:=HIGH;(最高价)

L:=LOW;(最低价)

HH1:=IF(H<REF(H,2)&&REF(H,1)<REF(H,2),REF(H,2),0);(如果目前最高价小于两天前的最高价,且一日前的最高价小于两日前的最高价,返回两日前的最高价)

LL1:=IF(L>REF(L,2)&&REF(L,1)>REF(L,2),REF(L,2),0);(如果目前最低价大于两天前的最低价,且一日前的最低价大于两日前的最低价,返回两日前的最低价)

HH2:=VALUEWHEN(HH1>0,HH1);(如果HH1>0,返回到HH1

LL2:=VALUEWHEN(LL1>0,LL1);(如果LL1>0,返回到LL1,)

K1:=IF(CLOSE>HH2,-3,IF(CLOSE<LL2,1,0));(如果目前收盘价>HH2,则返回-3,否则返回1或0(如果目前收盘价<LL2,则返回一,否则返回0))

K2:=VALUEWHEN(K1<>0,K1);(如果k1不等于0,返回K1

CROSS(AB,CLOSE)&&K2=1,SK;(如果AB上穿收盘价,且K2=1,卖开)

CROSS(AB,CLOSE)||K2=1,SP;(如果AB上穿收盘价,或K2=1,卖平

CROSS(CLOSE,AB)&&K2=-3,BK;(如果收盘价上穿AB,且K2=-3,买开)

CROSS(CLOSE,AB)||K2=-3,BP;(如果收盘价上穿AB,或K2=-3,买平

可能理解上有错误的语句:

X:=BARSLAST(HIGH=HHV(HIGH,N));(x=  某日最高价为N日内的最高价时到目前的周期数)

LL:=MIN(REF(LOW,X+3),MIN(REF(LOW,X+2),MIN(REF(LOW,X),REF(LOW,X+1))));(找出前X+3。x+2,x+1,x,个周期内最低价的最小值)

HH2:=VALUEWHEN(HH1>0,HH1);(如果HH1>0,返回HH1,否则返回上个HH1 的值

类似的函数含义请对照理解

 

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多
    喜欢该文的人也喜欢 更多

    ×
    ×

    ¥.00

    微信或支付宝扫码支付:

    开通即同意《个图VIP服务协议》

    全部>>