请教老师,我编写的公式怎么都打不开 [文华财经]
-
咨询内容:
请教老师,我编写的公式怎么都打不开
来源:程序化99
-
文华技术人员:
菜单-》量化-》编写公式-》双击模型名称可以打开,
还有疑问配合截图说明下现象,帮您分析。来源: WWW.CXH99.COM
-
文华客服:
LONG:=24;
SHORT:=13;
M:=6;
N:=6;
RCC:=DYNAINFO( 3);
S2:=SMA(C,3,1);
S6:=SMA(C,5,1);
KK:=1;
TT:=FROMOPEN;
RC:=DYNAINFO( 3);
SS2:=SMA(C,2,1);
SS6:=SMA(C,6,1);
DK:=2*(S2-S6);
DK1:=CONST(HHV(RC+DK,TT+1));
DK2:=CONST(LLV(RC+DK,TT+1));
DC1:=CONST(HHV(C,TT+1));
DC2:=CONST(LLV(C,TT+1));
MMA:=CONST(MAX(DC1,DK1));
MMB:=CONST(MIN(DC2,DK2));
{时间设置}
V1:=TIME;
A1:=COUNT(BARSCOUNT(C)=1 AND TIME<102000 ,0 );
T:=IF(V1<130000,(FLOOR(V1/10000)-9.5)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000)),
(FLOOR(V1/10000)-11)*60+(FLOOR(V1/100)-100*FLOOR(V1/10000)));
TTT:=INTPART(2*T/5);
P:=IF(TT<120,4,10);
P2:=IF(TT<120,20,30);
STICKLINE(C>0,H,L,6,1),COLOR000000;
STICKLINE(CURRBARSCOUNT<TT+1,MMB,MMA,4,1),COLORFF0000;
{CYC}
VAR1:=AMOUNT/VOL/100;
VAR2:=(3*HIGH+LOW+OPEN+2*CLOSE)/7;
VAR3:=SUM(AMOUNT,5)/VAR1/100;
VAR4:=SUM(AMOUNT,13)/VAR1/100;
VAR5:=SUM(AMOUNT,34)/VAR1/100;
CYC5:=DMA(VAR2,VOL/VAR3);
CYC13:=DMA(VAR2,VOL/VAR4);
CYC34:=DMA(VAR2,VOL/VAR5);
{股旁网-股票公式网站 WWW.GUPANG.COM}
DRAWBAND(CYC5,RGB(50,120,120),CYC13,DRAWNULL);
DRAWBAND(CYC13,RGB(0,150,150),CYC34,DRAWNULL);
{分时MACD}
昨收:=DYNAINFO( 3);
HH:=DYNAINFO(5);
LL:=DYNAINFO(6);
FK:=MAX(HH-昨收,昨收-LL)*0.1;
ZS:=昨收-FK*3.2;
Q1:=昨收-FK*3.22;
Q2:=昨收-2*FK*3.22;
Q3:=昨收-3*FK*3.2;
MA5:=MA(CLOSE,5);
MA10:=MA(CLOSE,10);
MA20:=MA(CLOSE,20);
MA30:=MA(CLOSE,30);
DIF:=(EMA(CLOSE,SHORT) - EMA(CLOSE,LONG));
DEA:=(EMA(DIF,M));
MACD:=5*(DIF-DEA);
A4:=BARSLAST(REF(CROSS(DIF,DEA),1));
B1:=REF(C,A4+1)>C AND REF(DIF,A4+1)<DIF AND CROSS(DIF,DEA);
{DRAWTEXT(FILTER(B1>0,5),RCC*KK-0.03*RCC*KK,'离',COLORYELLOW;
}
STICKLINE(MACD>=0 AND MACD>=REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLORFF00FF,LINETHICK3;
STICKLINE(MACD>=0 AND MACD< REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLORBLUE,LINETHICK3;
STICKLINE(MACD<0 AND MACD>=REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLOR4ABEFF,LINETHICK3;
STICKLINE(MACD<0 AND MACD< REF(MACD,1),RCC*KK,MACD*4+RCC*KK,3,0),COLORBLUE,LINETHICK3;
STICKLINE(DK>0,RCC*KK,RCC*KK+DK,0,1),COLORRED;
STICKLINE(DK<0,RCC*KK,RCC*KK+DK,0,1),COLORCYAN;
分时线:C,COLORFFFFFF,LINETHICK2;
AA1:=REF(分时线,P)=HHV(分时线,2*P+1);
BB1:=FILTER(AA1,P);
CC1:=BACKSET(BB1,P+1);
DD1:=FILTER(CC1,P);
{高点}
AA2:=REF(分时线,P)=LLV(分时线,2*P+1);
BB2:=FILTER(AA2,P);
CC2:=BACKSET(BB2,P+1);
DD2:=FILTER(CC2,P);
{低点}
QA1:=REF(分时线,P2)=HHV(分时线,P2+1);
QB1:=FILTER(QA1,P2);
QC1:=BACKSET(QB1,P2+1);
QD1:=FILTER(QC1,P2);
{高点2}
QA2:=REF(分时线,P2)=LLV(分时线,2*P2+1);
QB2:=FILTER(QA2,P2);
QC2:=BACKSET(QB2,P+1);
QD2:=FILTER(QC2,P2);
{低点};
R11:=BACKSET(ISLASTBAR,BARSLAST(DD1)+1);
S11:=R11>REF(R11,1);
QR11:=BACKSET(ISLASTBAR,BARSLAST(QD1)+1);
QS11:=QR11>REF(QR11,1);
压力线:=DRAWLINE(DD1,分时线,S11,分时线,1),COLORYELLOW;
压力线2:=DRAWLINE(QD1,分时线,QS11,分时线,1),COLORGREEN;
压力线3:=DRAWLINE(QS11,分时线,DD1,分时线,1),COLORWHITE;
IF(BETWEEN(压力线,MMA,MMB),压力线,DRAWNULL),COLORRED,LINETHICK1;
IF(BETWEEN(压力线2,MMA,MMB),压力线2,DRAWNULL),COLORGREEN,LINETHICK1;
IF(BETWEEN(压力线3,MMA,MMB),压力线3,DRAWNULL),COLORWHITE,LINETHICK1;
T11:=BACKSET(ISLASTBAR,BARSLAST(DD2)+1);
U11:=T11>REF(T11,1);
QT11:=BACKSET(ISLASTBAR,BARSLAST(QD2)+1);
QU11:=QT11>REF(QT11,1);
支撑线:=DRAWLINE(DD2,分时线,U11,分时线,1),COLORYELLOW;
支撑线2:=DRAWLINE(QD2,分时线,QU11,分时线,1),COLORGREEN;
支撑线3:=DRAWLINE(QU11,分时线,DD2,分时线,1),COLORWHITE;
IF(BETWEEN(支撑线,MMA,MMB),支撑线,DRAWNULL),COLORRED,LINETHICK1;
IF(BETWEEN(支撑线2,MMA,MMB),支撑线2,DRAWNULL),COLORGREEN,LINETHICK1;
IF(BETWEEN(支撑线3,MMA,MMB),支撑线3,DRAWNULL),COLORWHITE,LINETHICK1;
DRAWICON(DD1,分时线,2);
DRAWICON(DD2,分时线,1);
HHH:=CONST(HHV(H,160));
LLL:=CONST(LLV(L,160));
MM0:=CONST((HHH+LLL)/2);
HL:=CONST(IF(MM0<CONST(REF(C,160)),LLL+(HHH-LLL)*0.20,HHH-(HHH-LLL)*0.20));
HH1:=IF(MM0>CONST(REF(C,160)),HHH-(HHH-LLL)*0.1,HL);
LL1:=IF(MM0<CONST(REF(C,160)),LLL+(HHH-LLL)*0.1,HL);
HLMAX:=MAX(HH1,LL1);
HLMIN:=MIN(HH1,LL1);
HLMN1:=(HLMAX+HLMIN)/2;
HLMN2:=HLMAX-HLMIN;
HLMN3:=1;
HLMN4:=2;
DRAWTEXT(CURRBARSCOUNT=55,(MMB+(MMA-MMB)/10),'手:'COLOR00FFFF;
DRAWNUMBER(CURRBARSCOUNT=40,(MMB+(MMA-MMB)/10),CONST(DYNAINFO(37))*100)COLOR00FFFF;
DRAWTEXT(CURRBARSCOUNT=55,(MMB+(MMA-MMB)/10*2),'幅:';
DRAWNUMBER(CURRBARSCOUNT=40,(MMB+(MMA-MMB)/10*2),CONST(DYNAINFO(14))*100)COLORFF00FF;
变色用:DRAWNUMBER(CURRBARSCOUNT=40,(MMB+(MMA-MMB)/10*2),IF(CONST(DYNAINFO(14)*100)<=0,CONST(DYNAINFO(14)*100),DRAWNULL))COLOR00DD00;
DRAWTEXT(CURRBARSCOUNT=55,(MMB+(MMA-MMB)/10*3),'比:'COLORFF00FF;
DRAWNUMBER(CURRBARSCOUNT=40,(MMB+(MMA-MMB)/10*3),CONST(DYNAINFO(17)))COLORFF00FF;
-
网友回复:
N1:=5;
N2:=10;
{STICKLINE(C>0,0,10,15,0),COLOR781816;
}
LC:=REF(CLOSE,1);
RSI5:SMA(MAX(CLOSE-LC,0),N1,1)/SMA(ABS(CLOSE-LC),N1,1)*10,COLORFF00FF,LINETHICK1;
RSI10:SMA(MAX(CLOSE-LC,0),N2,1)/SMA(ABS(CLOSE-LC),N2,1)*10,COLOR00FFFF;
VAR1:=C-REF(C,1);
VAR2:=100*EMA(EMA(VAR1,6),6)/EMA(EMA(ABS(VAR1),6),6);
MA5:=EMA(C,5);
MA13:=EMA(C,13);
UP:=DRAWLINE(L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),0),COLOR0000FF;
DOWN:=DRAWLINE(H=HHV(H,BARSLAST(CROSS(MA5,MA13))+1),HHV(H,BARSLAST(CROSS
(MA5,MA13))+1),L=LLV(L,BARSLAST(CROSS(MA13,MA5))+1),LLV(L,BARSLAST(CROSS
(MA13,MA5))+1),0),COLOR00FF00;
BT:(LLV(VAR2,2)=LLV(VAR2,7) AND COUNT(VAR2<0,2) AND CROSS(VAR2,MA(VAR2,2))) AND
REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1);
0,COLORFF00FF;
10,COLORFF0000;
STICKLINE(UP,0,0.2,3,0),COLOR0000FF;
STICKLINE(DOWN,0,0.2,3,0),COLOR00FF00;
STICKLINE(BT,0,3,2,0),COLOR000088;
STICKLINE(BT,0,3,1,0),COLOR0000CC;
STICKLINE(BT,0,3,0.22,0),COLOR0000FF;
DRAWTEXT(BT,3,'牛',COLOR0000FF;
TJ1:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HHV(H,21)*0.82;
STICKLINE(TJ1,0,2,3,0),COLOR880088;
STICKLINE(TJ1,0,2,1.5,0),COLORAA00AA;
STICKLINE(TJ1,0,2,0.8,0),COLORCC00CC;
STICKLINE(TJ1,0,2,0.2,0),COLORFF00FF;
DRAWTEXT(TJ1,2,'牛 ',COLORFF00FF;
HR:=HHV(HIGH,55);
HRY:=LLV(LOW,55);
HRY11:=HR*HRY;
HRY33:=SQRT(HRY11);
TJ2:=REF(DOWN,1)<REF(DOWN,2) AND UP>REF(DOWN,1) AND C<HRY33;
STICKLINE(TJ2,0,1,5,0),COLOR008888;
STICKLINE(TJ2,0,1,2,0),COLOR00AAAA;
STICKLINE(TJ2,0,1,1,0),COLOR00CCCC;
STICKLINE(TJ2,0,1,0.2,0),COLOR00FFFF;
DRAWTEXT(TJ2,1,'牛 ',COLOR00FFFF;
ST:=REF(UP,1)>REF(UP,2) AND DOWN<REF(UP,1);
STICKLINE(ST,10,9,5,0),COLOR008800;
STICKLINE(ST,10,9,2,0),COLOR00AA00;
STICKLINE(ST,10,9,1,0),COLOR00CC00;
STICKLINE(ST,10,9,0.2,0),COLOR00FF00;
DRAWTEXT(ST,9,'',COLOR00FF00;
DRAWTEXT(CURRBARSCOUNT=49,9.5,' 本指标适合抄底及波段特征明显个股,暴跌途中慎用!!',COLOR0000FF;
DRAWTEXT(CURRBARSCOUNT=49,8.7,' 大牛:长线大牛股,目标翻倍;
中短牛:15天目标10%-20%!!',COLOR0078FF;
DRAWTEXT(CURRBARSCOUNT=49,8.0,' 以上信号结合RSI低位时用更加可靠,盘整市中信号偏多!!',COLOR00FF00;
DRAWTEXT(CURRBARSCOUNT=49,7.3,'当大牛\中牛\短牛同一天出现时, 果断买入!!',COLOR00FFFF;
DRAWTEXT(ISLASTBAR,RSI5,'RSI5',COLORMAGENTA;
DRAWTEXT(ISLASTBAR,RSI10,'RSI10',COLOR00FFFF;
涨家数:INDEXADV,NODRAW,COLORMAGENTA; 跌家数:INDEXDEC,NODRAW,COLORGREEN; -
网友回复:
您楼上指标都含有未来函数,wh8量化软件不支持未来函数。
未来函数需要在wh6软件使用。
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容