请教老师一个问题 [文华财经]
-
咨询内容:
为什么有的指标在自定义K线周期加载时显示“该周期不支持” ?
这种问题如何解决?
谢谢老师。
例如,原油我经常用6小时的K线图
但是加载了某自编指标显示如图
文件名:666.png来源:程序化99
-
文华技术人员:
补充一下,该指标在文华的系统大部分K线周期能使用,季线级别不能显示。谢谢
来源: WWW.CXH99.COM
-
文华客服:
应该跟您自编指标中含有特殊编写有关系,您提供完整的源码我们帮您检查下
-
网友回复:
以下是引用林木在2018/1/28 16:42:00的发言:
应该跟您自编指标中含有特殊编写有关系,您提供完整的源码我们帮您检查下 太长了 分两个发吧
VAR2:=(3*CLOSE+LOW+OPEN+HIGH)/6; VAR3:=(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; VAR4:=MA(VAR3,13); VAR5:=EMA(MA(CLOSE,3),34); VAR6:=(MA(CLOSE,3)+MA(CLOSE,6)+MA(CLOSE,12)+MA(CLOSE,24))/4; VAR7:=MA(VAR6,5); VAR8:=MA(VAR6,10); VAR9:=1/WINNER(CLOSE); VARA:=MA(CLOSE,13); VARB:=100-ABS((CLOSE-VARA)/VARA*100); VARC:=LLV(LOW,75); VARD:=HHV(HIGH,75); VARE:=(VARD-VARA)/100; VARF:=SMA((CLOSE-VARC)/VARE,20,1); VAR10:=SMA((OPEN-VARC)/VARE,20,1); VAR11:=3*VARF-2*SMA(VARF,15,1); VAR12:=3*VAR10-2*SMA(VAR10,15,1); VAR13:=100-VAR12; VAR14:=100-VAR11; VAR15:=MA(WINNER(CLOSE*0.95)*100,3); VAR16:=100-IF(VAR9>5,IF(VAR9<100,VAR9,VARB-10),0); VAR17:=VAR15>VARB; VAR18:=REF(LOW,1)*0.9; VAR19:=LOW*0.9; CAPITAL:=GETPRICE1('LTGB'); VAR1A:=(VAR19*VOL+VAR8*(CAPITAL-VOL))/CAPITAL; VAR1B:=EMA(VAR1A,30); VAR1C:=CLOSE-REF(CLOSE,1); VAR1D:=MAX(VAR1C,0); VAR1E:=ABS(VAR1C); VAR1F:=SMA(VAR1D,7,1)/SMA(VAR1E,7,1)*100; VAR20:=SMA(VAR1D,13,1)/SMA(VAR1E,13,1)*100; VAR21:=BARSCOUNT(CLOSE); VAR22:=SMA(MAX(VAR1C,0),6,1)/SMA(ABS(VAR1C),6,1)*100; VAR23:=(-200)*(HHV(HIGH,60)-CLOSE)/(HHV(HIGH,60)-LLV(LOW,60))+100; VAR24:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))*100; VAR25:=SMA((SMA(VAR24,4,1)-50)*2,3,1); INDEXL:="6713$L"; INDEXC:="6713$C"; INDEXH:="6713$H"; VAR26:=(INDEXC-LLV(INDEXL,14))/(HHV(INDEXH,14)-LLV(INDEXL,14))*100; VAR27:=SMA(VAR26,4,1); VAR28:=SMA(VAR27,3,1); VAR29:=(HHV(HIGH,30)-CLOSE)/CLOSE*100; VAR2A:=VAR22<=25 AND VAR23<-95 AND VAR29>20 AND VAR25<-30 AND VAR28<30 AND VAR1B-CLOSE>=-0.25 AND VAR1F<22 AND VAR20<28 AND VAR21>50; VAR326:=IF(CLOSE>REF(CLOSE, 1),88,0); VAR327:=IF(CLOSE/REF(CLOSE, 1)>1.050 AND HIGH/CLOSE<1.010 AND VAR326>0, 91, 0); STICKLINE(VAR327>90,L*0.99,L*0.95,4,0),COLORYELLOW; DRAWTEXT(VAR327>90,LOW*0.95,'加油'),COLORYELLOW; DF:=(C-REF(C,1))/REF(C,1)*100<-5; AA:=BARSLAST(DF); TP:=CROSS(C,REF(C,AA)); ZS:TRENDLINES(DF,O,REF(DF,1),REF(O,1)),COLORMAGENTA ,LINETHICK2; XD:LLV(MIN(L,REF(L,AA)),AA),COLORCYAN,LINETHICK2; DRAWTEXT(ISLASTBAR,ZS,' ZS'); DISP:=2; P1:=PEAK(C,10,1,1); P2:=PEAK(C,10,2,1); WP1:=PEAKBARS(C,10,1,1); WP2:=PEAKBARS(C,10,2,1); T1:=TROUGH(C,10,1,1); T2:=TROUGH(C,10,2,1); WT1:=TROUGHBARS(C,10,1,1); WT2:=TROUGHBARS(C,10,2,1); TJ1:=P1>T1 AND P2>T2 ; ZD:=MAX(T1,T2); ZG:=MIN(P1,P2); LL:=MIN(T1,T2); HH:=MAX(P1,P2); TJ2:=FILTER(ZG>ZD,2); TJ3:=ZG=REF(ZG,BARSLAST(TJ2)) OR ZD=REF(ZD,BARSLAST(TJ2)); TJ4:=TJ1&&TJ2&&NOT(TJ3); TJ5:=BETWEEN(ZD,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1))); TJ6:=BETWEEN(ZG,REF(ZD,REF(BARSLAST(TJ4),1)),REF(ZG,REF(BARSLAST(TJ4),1))); TJ7:=ZG>REF(ZG,REF(BARSLAST(TJ4),1))&&ZD<REF(ZD,REF(BARSLAST(TJ4),1)); TJ8:=TJ4&&NOT(TJ5 OR TJ6 OR TJ7); ZSD:=IF(TJ8,ZD,NULL); ZSG:=IF(TJ8,ZG,NULL); ZSH:=IF(TJ8,HH,NULL); ZSL:=IF(TJ8,LL,NULL); STICKLINE(TJ8,ZSH,ZSL,0,-1),COLORMAGENTA; STICKLINE(TJ8,ZSD,ZSG,3,1),COLORMAGENTA; DRAWTEXT(DISP=2,ZSH,'TP'),COLORRED; POLYLINE1(DISP=2,REF(ZSD,BARSLAST(TJ8))),CROSSDOT,COLORRED; POLYLINE1(DISP=2,REF(ZSG,BARSLAST(TJ8))),CROSSDOT,COLORGREEN; POLYLINE1(DISP=2,REF(ZSH,BARSLAST(TJ8))),POINTDOT,COLORRED; POLYLINE1(DISP=2,REF(ZSL,BARSLAST(TJ8))),POINTDOT,COLORGREEN; POLYLINE1(DISP=3,ZIGZAG(C,10,1)),COLORBLUE; POLYLINE1(DISP=3,ZIGZAG(C,10,1)),COLORBLUE; JBDYXA:=BACKSET(LLV(L,5)<REF(LLV(L,4),1),4); JBDYXB:=BACKSET(JBDYXA=0 AND REF(JBDYXA,1)=1,2); JBDYXC:=IF(JBDYXB=1 AND REF(JBDYXB,1)=0,-1,0); JBGYXA:=BACKSET(HHV(H,5)>REF(HHV(H,4),1),4); JBGYXB:=BACKSET(JBGYXA=0 AND REF(JBGYXA,1)=1,2); JBGYXC:=IF(JBGYXB=1 AND REF(JBGYXB,1)=0,1,0); QKPD:=IF(L>REF(H,1),1,IF(H<REF(L,1),-1,0)); JQGT:=BARSLAST(JBGYXC=1); JQDT:=BARSLAST(JBDYXC=-1); XZQ:=LLVBARS(L,1); DZQ:=HHVBARS(H,1); DBAA:=IF(JBDYXC=-1 AND REF(JQGT,1)>REF(JQDT,1) AND LLV(L,JQGT+1)<REF(LLV(L,JQGT+1),1),-1,0); DBAB:=IF(JBDYXC=-1 AND REF(JQGT,1)<=REF(JQDT,1) AND (JQGT>=4 OR LLV(QKPD,JQGT)=-1 OR LLV(L,JQDT+2)<REF(LLV(L,JQDT+1),1)),-1,0); DBS:=IF((DBAA=-1 OR DBAB=-1) AND L<REF(H,JQGT+1),-1,0);
-
网友回复:
预判:=IF((JQDT<4 AND HHV(QKPD,JQDT)<>1) OR REF(DBS,JQDT)=0,1,0);
判断:=IF(JBGYXC=1 AND REF(JQDT,1)<=REF(JQGT,1) AND 预判=1 AND DZQ>REF(XZQ,JQDT+1) AND DZQ>REF(XZQ,JQDT) AND DZQ>REF(DZQ,JQGT),1,0);
GBA:=IF(JBGYXC=1 AND REF(JQDT,1)>REF(JQGT,1) AND HHV(H,JQDT+1)>REF(HHV(H,JQDT+1),1),1,0);
GBB:=IF(JBGYXC=1 AND REF(JQDT,1)<=REF(JQGT,1) AND REF(DBS,JQDT)=-1 AND (JQDT>=4 OR HHV(QKPD,JQDT)=1),1,0);
GB:=IF((GBA=1 OR GBB=1 OR 判断=1) AND H>REF(L,JQDT+1),1,0);
预判A:=IF((JQGT<4 AND HHV(QKPD,JQGT)<>1) OR REF(GB,JQGT)=0,1,0);
判断A:=IF(JBDYXC=-1 AND REF(JQGT,1)<=REF(JQDT,1) AND 预判A=1 AND XZQ>REF(DZQ,JQGT+1) AND XZQ>REF(DZQ,JQGT) AND XZQ>REF(XZQ,JQDT),-1,0);
DBA:=IF(JBDYXC=-1 AND REF(JQGT,1)>REF(JQDT,1) AND LLV(L,JQGT+1)<REF(LLV(L,JQGT+1),1),-1,0);
DBB:=IF(JBDYXC=-1 AND REF(JQGT,1)<=REF(JQDT,1) AND (JQGT>=4 OR LLV(QKPD,JQGT)=-1 OR 判断A=-1),-1,0);
DB:=IF((DBA=-1 OR DBB=-1) AND L<REF(H,JQGT+1),-1,0);
JQGTA:=BARSLAST(GB=1);
JQDTA:=BARSLAST(DB=-1);
预判X:=IF((JQDTA<4 AND HHV(QKPD,JQDTA)<>1) OR REF(DB,JQDTA)=0,1,0);
判断X:=IF(JBGYXC=1 AND REF(JQDTA,1)<=REF(JQGTA,1) AND 预判X=1 AND DZQ>REF(XZQ,JQDTA+1) AND DZQ>REF(XZQ,JQDTA) AND DZQ>REF(DZQ,JQGTA),1,0);
GBXA:=IF(JBGYXC=1 AND REF(JQDTA,1)>REF(JQGTA,1) AND HHV(H,JQDTA+1)>REF(HHV(H,JQDTA+1),1),1,0);
GBXB:=IF(JBGYXC=1 AND REF(JQDTA,1)<=REF(JQGTA,1) AND REF(DB,JQDTA)=-1 AND (JQDTA>=4 OR HHV(QKPD,JQDTA)=1),1,0);
GBX:=IF((GBXA=1 OR GBXB=1 OR 判断X=1) AND H>REF(L,JQDTA+1),1,0);
预判XA:=IF((JQGTA<4 AND HHV(QKPD,JQGTA)<>1) OR REF(GBXA,JQGTA)=0,1,0);
判断XA:=IF(JBDYXC=-1 AND REF(JQGTA,1)<=REF(JQDTA,1) AND 预判XA=1 AND XZQ>REF(DZQ,JQGTA+1) AND XZQ>REF(DZQ,JQGTA) AND XZQ>REF(XZQ,JQDTA),-1,0);
DBXA:=IF(JBDYXC=-1 AND REF(JQGTA,1)>REF(JQDTA,1) AND LLV(L,JQGTA+1)<REF(LLV(L,JQGTA+1),1),-1,0);
DBXB:=IF(JBDYXC=-1 AND REF(JQGTA,1)<=REF(JQDTA,1) AND (JQGTA>=4 OR LLV(QKPD,JQGTA)=-1 OR 判断XA=-1),-1,0);
DBX:=IF((DBXA=-1 OR DBXB=-1) AND L<REF(H,JQGTA+1),-1,0);
JQGTYA:=BARSLAST(GBX=1);
JQDTYA:=BARSLAST(DBX=-1);
预判YX:=IF((JQDTYA<4 AND HHV(QKPD,JQDTYA)<>1) OR REF(DBX,JQDTYA)=0,1,0);
判断YX:=IF(JBGYXC=1 AND REF(JQDTYA,1)<=REF(JQGTYA,1) AND 预判YX=1 AND DZQ>REF(XZQ,JQDTYA+1) AND DZQ>REF(XZQ,JQDTYA) AND DZQ>REF(DZQ,JQGTYA),1,0);
GBYXA:=IF(JBGYXC=1 AND REF(JQDTYA,1)>REF(JQGTYA,1) AND HHV(H,JQDTYA+1)>REF(HHV(H,JQDTYA+1),1),1,0);
GBYXB:=IF(JBGYXC=1 AND REF(JQDTYA,1)<=REF(JQGTYA,1) AND REF(DBX,JQDTYA)=-1 AND (JQDTYA>=4 OR HHV(QKPD,JQDTYA)=1),1,0);
GBYX:=IF((GBYXA=1 OR GBYXB=1 OR 判断YX=1) AND H>REF(L,JQDTYA+1),1,0);
预判YXA:=IF((JQGTYA<4 AND HHV(QKPD,JQGTYA)<>1) OR REF(GBYXA,JQGTYA)=0,1,0);
判断YXA:=IF(JBDYXC=-1 AND REF(JQGTYA,1)<=REF(JQDTYA,1) AND 预判YXA=1 AND XZQ>REF(DZQ,JQGTYA+1) AND XZQ>REF(DZQ,JQGTYA) AND XZQ>REF(XZQ,JQDTYA),-1,0);
DBYXA:=IF(JBDYXC=-1 AND REF(JQGTYA,1)
<
REF(JQDTYA,1) AND LLV(L,JQGTYA+1)<REF(LLV(L,JQGTYA+1),1),-1,0);
DBYXB:=IF(JBDYXC=-1 AND REF(JQGTYA,1)<=REF(JQDTYA,1) AND (JQGTYA>=4 OR LLV(QKPD,JQGTYA)=-1 OR 判断YXA=-1),-1,0);
DBYX:=IF((DBYXA=-1 OR DBYXB=-1) AND L<REF(H,JQGTYA+1),-1,0);
AAAD:=IF(GBYX=1 AND DBYX=-1 AND H>REF(H,REF(JQGTYA,1)+2),1,IF(GBYX=1 AND DBYX=-1 AND L<REF(L,REF(JQDTYA,1)+2),-1,0));
JDBL:=IF(AAAD=0,GBYX+DBYX,AAAD);
极点:IF(JDBL=-1,L,IF(JDBL=1,H,NULL)), CIRCLEDOT ,COLORYELLOW;
DRAWLINE(JDBL=-1,极点,JDBL=1,极点,0),COLORRED;
DRAWLINE(JDBL=1,极点,JDBL=-1,极点,0),COLORYELLOW;
DD1:=BARSLAST(ABS(JDBL)<>1);
DRAWTEXT(JDBL=1,极点+0.0,'空'),COLORGREEN;
DRAWTEXT(JDBL=-1,极点-0.0,'多'),COLORRED;
MA5:MA(CLOSE,5),COLORFF00FF,LINETHICK2;
判:IF(MA5<REF(MA5,1),MA5,NULL),COLORWHITE,LINETHICK2;
麻烦老师给看看了,谢谢
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 511411198 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容