有没有未来函数 [文华财经]
-
咨询内容:
上轨:(REFX1(MA(REFX1(MA(H,25),25/2),25),25/2)-REFX1(MA(REFX1(MA(L,25),25/2),25),25/2))*1+REFX1(MA(REFX1(MA(H,25),25/2),25),25/2),DOT,COLORYELLOW;
方向:REFX1(MA(REFX1(MA(L,25),25/2),25),25/2)-(REFX1(MA(REFX1(MA(H,25),25/2),25),25/2)-REFX1(MA(REFX1(MA(L,25),25/2),25),25/2))*1,LINETHICK2,COLORRED;
下轨:EMA(方向,25),COLORCYAN,LINETHICK2;
CURRBARSCOUNT:=DATACOUNT-BARPOS+1;
FROMOPEN:=IF(HOUR<12,60*(HOUR-9)-30+MINUTE,120+60*(HOUR-13)+MINUTE);
FILLRGN(方向>上轨,方向,上轨,RGB(55,0,0));
FILLRGN(方向<上轨,方向,上轨,RGB(0,91,0));
BUY1:=ZIGZAG(C,10,1);
SELL1:=MA(BUY1,2);
FILLRGN(BUY1>SELL1 AND O>=C,方向,上轨,RGB(0,0,0));
DRAWKLINE1(H,O,L,C); STICKLINE1(方向>LOW AND 方向<HIGH,方向,MIN(MIN(OPEN,CLOSE),方向),3,0),COLORYELLOW; STICKLINE1(方向>MIN(C,O) AND 方向<MAX(C,O),方向,MIN(OPEN,CLOSE),3,0),COLORYELLOW; STICKLINE1(方向>HIGH,OPEN,CLOSE,3,0),COLORYELLOW; STICKLINE1(方向>HIGH,HIGH,LOW,0,0),COLORYELLOW; VAR23:=100*REFX1(MA((C-REF(C,1)),6),6/2)/REFX1(MA(ABS((C-REF(C,1))),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; QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW); CAPITAL:=GETPRICE1('流通股本'); JJ:=(HIGH+LOW+CLOSE)/3; 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))); 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 AND L<方向,L,'↖↖加仓'),COLORMAGENTA; DRAWTEXT(CROSS(REF(ZIGZAG(C,10,1),1),ZIGZAG(C,10,1)),HIGH*1.009,'↓←卖') , COLORGREEN,LINETHICK1;
VAR3:=LLV(HIGH,240); VAR4:=100*(CLOSE-VAR3); VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100; 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-REF(CLOSE,1)),7,1)*100; VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100; VAR10:=IF(TROUGHBARS(C,16,1,1)=0 AND HIGH>LOW+0.04,4,0); VAR11:=ZIGZAG(C,6,1)>REF(ZIGZAG(C,6,1),1) AND REF(ZIGZAG(C,6,1),1)<=REF(ZIGZAG(C,6,1),2) AND REF(ZIGZAG(C,6,1),2)<=REF(ZIGZAG(C,6,1),3); VAR12:=ZIGZAG(C,6,1)<REF(ZIGZAG(C,6,1),1) AND REF(ZIGZAG(C,6,1),1)>=REF(ZIGZAG(C,6,1),2) AND REF(ZIGZAG(C,6,1),2)>=REF(ZIGZAG(C,6,1),3); VAR13:=ZIGZAG(C,22,1)>REF(ZIGZAG(C,22,1),1) AND REF(ZIGZAG(C,22,1),1)<=REF(ZIGZAG(C,22,1),2) AND REF(ZIGZAG(C,22,1),2)<=REF(ZIGZAG(C,22,1),3); VAR14:=ZIGZAG(C,22,1)<REF(ZIGZAG(C,22,1),1) AND REF(ZIGZAG(C,22,1),1)>=REF(ZIGZAG(C,22,1),2) AND REF(ZIGZAG(C,22,1),2)>=REF(ZIGZAG(C,22,1),3); VAR15:=ZIGZAG(C,51,1)>REF(ZIGZAG(C,51,1),1) AND REF(ZIGZAG(C,51,1),1)<=REF(ZIGZAG(C,51,1),2) AND REF(ZIGZAG(C,51,1),2)<=REF(ZIGZAG(C,51,1),3); VAR16:=ZIGZAG(C,51,1)<REF(ZIGZAG(C,51,1),1) AND REF(ZIGZAG(C,51,1),1)>=REF(ZIGZAG(C,51,1),2) AND REF(ZIGZAG(C,51,1),2)>=REF(ZIGZAG(C,51,1),3); VAR17:=ZIGZAG(C,72,1)>REF(ZIGZAG(C,72,1),1) AND REF(ZIGZAG(C,72,1),1)<=REF(ZIGZAG(C,72,1),2) AND REF(ZIGZAG(C,72,1),2)<=REF(ZIGZAG(C,72,1),3); VAR18:=ZIGZAG(C,72,1)<REF(ZIGZAG(C,72,1),1) AND REF(ZIGZAG(C,72,1),1)>=REF(ZIGZAG(C,72,1),2) AND REF(ZIGZAG(C,72,1),2)>=REF(ZIGZAG(C,72,1),3); VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150); 买1:=VAR10; 买2:=(VAR11+VAR13+VAR15+VAR17); 卖1:=(VAR12+VAR14+VAR16+VAR18);
S:IF(卖1>0,HIGH*1.01,NULL),CROSSDOT,LINETHICK3,COLORGREEN; DRAWTEXT(卖1>0,HIGH*1.02,'TT卖点'),COLORGREEN; DRAWICON((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)),LOW*0.98,1) ; DRAWICON((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)),HIGH*1.01,2); ZB:=EMA(EMA(VAR3,5),5)*3, COLORSTICK; VARA:=IF(VAR9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
HS:=VOL/CAPITAL*100, COLORGREEN; 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); DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,LOW*0.95,'资金进场'),LINETHICK1,COLORFF00FF; VAR1A:=IF(VARE>0,VARE,0); VAR1B:=IF(VAR14>=200 AND VAR13>=150,15,IF(VAR14<=-200 AND VAR13<=-150,-15,VAR16))+60; VAR1C:=VAR1A>48 AND VAR1B>60 AND VAR19<100;
量能突破:=SUM(IF(C=REF(C,1),0,IF(C>REF(C,1),VOL,-VOL)),0); 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(H,N,1,1)+1); A2:=A1>REF(A1,1); B1:=BACKSET(ISLASTBAR,PEAKBARS(H,N,2,1)+1); B2:=B1>REF(B1,1); C1:=BACKSET(ISLASTBAR,PEAKBARS(H,N,3,1)+1); C2:=C1>REF(C1,1); A11:=BACKSET(ISLASTBAR,TROUGHBARS(L,N,1,1)+1); A21:=A11>REF(A11,1); B11:=BACKSET(ISLASTBAR,TROUGHBARS(L,N,2,1)+1); B21:=B11>REF(B11,1); C11:=BACKSET(ISLASTBAR,TROUGHBARS(L,N,3,1)+1); C21:=C11>REF(C11,1); DRAWLINE1(B2,H,A2,H,1),COLORBLUE; DRAWLINE1(B21,L,A21,L,1),COLOR0000FF; K:=EMA(VAR7,5)*2, COLORFF00FF; D:=EMA(K,5), COLORWHITE; J:=K*3-D*2, COLORYELLOW;
D1:=REF(H,N); D2:=D1=HHV(H,2*N+1); D3:=FILTER(D2,N); D4:=BACKSET(D3,N+1); HD:=FILTER(D4,N); D5:=REF(L,N); D6:=D5=LLV(L,2*N+1); D7:=FILTER(D6,N); D8:=BACKSET(D7,N+1); LD:=FILTER(D8,N);
E:=D>REF(D,1); F:=BACKSET(E,REF(BARSLAST(HD),1)+2); G:=F>REF(F,1); DRAWLINE(G,H,E,H,1),POINTDOT,LINETHICK1,COLORYELLOW; I:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
M:=K>REF(K,1); DRAWLINE(M,L,J,L,1),POINTDOT,LINETHICK1,COLORFFB97A; M1:=BARSLAST(E); M2:=BARSLAST(G); M3:=REF(H,M1); M4:=REF(H,M2); M5:=M4-M2*(M4-M3)/(M2-M1); DRAWICON(REF(C,1)<=REF(M5,1) AND C>M5,M5,4);
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; STICKLINE(ISLASTBAR AND (红色持股 OR REF(红色持股,1)=1),今离场价,今离场价,30,1),COLOR0000FF; STICKLINE(ISLASTBAR AND (青色观望 OR REF(青色观望,1)=1),今进场价,今进场价,30,1),COLOR00FF00; QLIFE:=(EMA(CLOSE,60)+EMA(CLOSE,90))/2,POINTDOT,COLORGREEN,LINETHICK4; J12:=(HIGH - ((HIGH - LOW) / 3)); J23:=(LOW + ((HIGH - LOW) / 3)); AAA:=REFX1(HHV(H,90),100000); BBB:=REFX1(LLV(L,100),100000);
PL5:=ZIGZAG(C,5,1); EN1:=PL5>REF(PL5,1) AND REF(PL5,1)<=REF(PL5,2) AND REF(PL5,2)<=REF(PL5,3); EX1:=PL5<REF(PL5,1) AND REF(PL5,1)>=REF(PL5,2) AND REF(PL5,2)>=REF(PL5,3); PL10:=ZIGZAG(C,10,1); EN2:=PL10>REF(PL10,1) AND REF(PL10,1)<=REF(PL10,2) AND REF(PL10,2)<=REF(PL10,3); EX2:=PL10<REF(PL10,1) AND REF(PL10,1)>=REF(PL10,2) AND REF(PL10,2)>=REF(PL10,3); PL20:=ZIGZAG(C,20,1); EN3:=PL20>REF(PL20,1) AND REF(PL20,1)<=REF(PL20,2) AND REF(PL20,2)<=REF(PL20,3); EX3:=PL20<REF(PL20,1) AND REF(PL20,1)>=REF(PL20,2) AND REF(PL20,2)>=REF(PL20,3); 走强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.98,'---------A㈠'),COLORFFFFFF; DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'------B㈡'),COLORGREEN; DRAWTEXT(EN2 AND ZTJZ5=1,L*0.98,' ---C㈢全多'),COLORFFFFFF; DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,H*1.02,'------------⑴空'),COLORFFFFFF; DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,L*0.98,'-----------⑵补'),COLOR00FFFF; DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,H*1.02,'------------⑶空'),COLORFFFF00; DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,L*0.98,'------------⑷在补'),COLOR00FFFF; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.02,'-----------⑸顶空'),COLORGREEN; DRAWTEXT(EN2 AND DTJZ10=1,L*0.95,'-----Ⅰ'),COLORFFFFFF; DRAWTEXT(EX2 AND DTJD10=2,H,'-----Ⅱ'),COLORGREEN; DRAWTEXT(EN3 AND ZTJZ10=1,L*0.95,'-----Ⅲ'),COLORFF00FF; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.06,'-----①空'),COLORFFFF00; DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.94,'-----②多'),COLORFF00FF; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.06,'-----③空'),COLORGREEN; DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,L*0.94,'-----④在补'),COLORFF00FF; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.02,'⑸顶'),COLOR0000FF; DRAWTEXT(EN2 AND DTJZ10=1,LOW*0.94,'----【A】多'),COLOR00FF00; DRAWTEXT(EX2 AND DTJD10=2,HIGH*1.05,'----【B】空'),COLOR00FF00; DRAWTEXT(EN3 AND ZTJZ10=1,LOW*0.94,'----【C】全仓多'),COLOR00FF00; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.04,'----①空进'),COLOR00FFFF; DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,LOW*0.96,'----②多全仓'),COLOR00FFFF; DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,HIGH*1.04,'----③空'),COLOR00FFFF; DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,LOW*0.96,'----④多补'),COLOR00FFFF;
DRAWICON(CROSS(BUY1,SELL1),L-0.3,7); DRAWICON(CROSS(SELL1,BUY1),H+0.2,8); STICKLINE(BUY1>SELL1 AND O>=C,C,O,-1,0),COLORRED; STICKLINE(BUY1>SELL1 AND O>=C,L,H,0,0),COLORRED; STICKLINE(BUY1<SELL1 AND O<=C,O,C,-1,1),COLORCYAN; STICKLINE(BUY1<SELL1 AND O<=C,O,L,0,1),COLORCYAN; STICKLINE(BUY1<SELL1 AND O<=C,C,H,0,1),COLORCYAN;老师,你好。这个指标里面有没有未来函数。为什么加到文化上面,显示有个地方变量不合适,能不能给我修改修改来源:程序化99
-
文华技术人员:
公式中包含大量未来函数。
改写参考: 上轨:(REFX1(MA(REFX1(MA(H,25),25/2),25),25/2)-REFX1(MA(REFX1(MA(L,25),25/2),25),25/2))*1+REFX1(MA(REFX1(MA(H,25),25/2),25),25/2),DOT,COLORYELLOW;方向:REFX1(MA(REFX1(MA(L,25),25/2),25),25/2)-(REFX1(MA(REFX1(MA(H,25),25/2),25),25/2)-REFX1(MA(REFX1(MA(L,25),25/2),25),25/2))*1,LINETHICK2,COLORRED;下轨:EMA(方向,25),COLORCYAN,LINETHICK2;CURRBARSCOUNT:=DATACOUNT-BARPOS+1;FROMOPEN:=IF(HOUR<12,60*(HOUR-9)-30+MINUTE,120+60*(HOUR-13)+MINUTE);FILLRGN(方向>上轨,方向,上轨,RGB(55,0,0));FILLRGN(方向<上轨,方向,上轨,RGB(0,91,0));BUY1:=ZIGZAG(C,10,1);SELL1:=MA(BUY1,2);FILLRGN(BUY1>SELL1 AND O>=C,方向,上轨,RGB(0,0,0));
DRAWKLINE1(H,O,L,C);STICKLINE1(方向>LOW AND 方向<HIGH,方向,MIN(MIN(OPEN,CLOSE),方向),3,0),COLORYELLOW;STICKLINE1(方向>MIN(C,O) AND 方向<MAX(C,O),方向,MIN(OPEN,CLOSE),3,0),COLORYELLOW;STICKLINE1(方向>HIGH,OPEN,CLOSE,3,0),COLORYELLOW;STICKLINE1(方向>HIGH,HIGH,LOW,0,0),COLORYELLOW;VAR23:=100*REFX1(MA((C-REF(C,1)),6),6/2)/REFX1(MA(ABS((C-REF(C,1))),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;QJ0:=VOL/IF(HIGH=LOW,4,HIGH-LOW);CAPITAL:=GETPRICE1('流通股本');JJ:=(HIGH+LOW+CLOSE)/3;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)));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 AND L<方向,L,'↖↖加仓'),COLORMAGENTA;DRAWTEXT(CROSS(REF(ZIGZAG(C,10,1),1),ZIGZAG(C,10,1)),HIGH*1.009,'↓←卖') , COLORGREEN,LINETHICK1;
VAR3:=LLV(HIGH,240);VAR4:=100*(CLOSE-VAR3);VAR5:=(CLOSE-LLV(LOW,528))/(HHV(HIGH,528)-LLV(LOW,528))*100;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-REF(CLOSE,1)),7,1)*100;VAR9:=SMA(MAX(CLOSE-REF(CLOSE,1),0),13,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),13,1)*100;VAR10:=IF(TROUGHBARS(C,16,1,1)=0 AND HIGH>LOW+0.04,4,0);VAR11:=ZIGZAG(C,6,1)>REF(ZIGZAG(C,6,1),1) AND REF(ZIGZAG(C,6,1),1)<=REF(ZIGZAG(C,6,1),2) AND REF(ZIGZAG(C,6,1),2)<=REF(ZIGZAG(C,6,1),3);VAR12:=ZIGZAG(C,6,1)<REF(ZIGZAG(C,6,1),1) AND REF(ZIGZAG(C,6,1),1)>=REF(ZIGZAG(C,6,1),2) AND REF(ZIGZAG(C,6,1),2)>=REF(ZIGZAG(C,6,1),3);VAR13:=ZIGZAG(C,22,1)>REF(ZIGZAG(C,22,1),1) AND REF(ZIGZAG(C,22,1),1)<=REF(ZIGZAG(C,22,1),2) AND REF(ZIGZAG(C,22,1),2)<=REF(ZIGZAG(C,22,1),3);VAR14:=ZIGZAG(C,22,1)<REF(ZIGZAG(C,22,1),1) AND REF(ZIGZAG(C,22,1),1)>=REF(ZIGZAG(C,22,1),2) AND REF(ZIGZAG(C,22,1),2)>=REF(ZIGZAG(C,22,1),3);VAR15:=ZIGZAG(C,51,1)>REF(ZIGZAG(C,51,1),1) AND REF(ZIGZAG(C,51,1),1)<=REF(ZIGZAG(C,51,1),2) AND REF(ZIGZAG(C,51,1),2)<=REF(ZIGZAG(C,51,1),3);VAR16:=ZIGZAG(C,51,1)<REF(ZIGZAG(C,51,1),1) AND REF(ZIGZAG(C,51,1),1)>=REF(ZIGZAG(C,51,1),2) AND REF(ZIGZAG(C,51,1),2)>=REF(ZIGZAG(C,51,1),3);VAR17:=ZIGZAG(C,72,1)>REF(ZIGZAG(C,72,1),1) AND REF(ZIGZAG(C,72,1),1)<=REF(ZIGZAG(C,72,1),2) AND REF(ZIGZAG(C,72,1),2)<=REF(ZIGZAG(C,72,1),3);VAR18:=ZIGZAG(C,72,1)<REF(ZIGZAG(C,72,1),1) AND REF(ZIGZAG(C,72,1),1)>=REF(ZIGZAG(C,72,1),2) AND REF(ZIGZAG(C,72,1),2)>=REF(ZIGZAG(C,72,1),3);VAR19:=EMA(CLOSE,2)-EMA(CLOSE,150);买1:=VAR10;买2:=(VAR11+VAR13+VAR15+VAR17);卖1:=(VAR12+VAR14+VAR16+VAR18);
S:IF(卖1>0,HIGH*1.01,NULL),CROSSDOT,LINETHICK3,COLORGREEN;DRAWTEXT(卖1>0,HIGH*1.02,'TT卖点'),COLORGREEN;DRAWICON((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)),LOW*0.98,1) ;DRAWICON((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)),HIGH*1.01,2);ZB:=EMA(EMA(VAR3,5),5)*3, COLORSTICK;VARA:=IF(VAR9 AND CROSS(MA(CLOSE,3),MA(CLOSE,5)),20,0);
HS:=VOL/CAPITAL*100, COLORGREEN;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);DRAWTEXT(VAR11 AND COUNT(VAR11,30)=1,LOW*0.95,'资金进场'),LINETHICK1,COLORFF00FF;VAR1A:=IF(VARE>0,VARE,0);VAR1B:=IF(VAR14>=200 AND VAR13>=150,15,IF(VAR14<=-200 AND VAR13<=-150,-15,VAR16))+60;VAR1C:=VAR1A>48 AND VAR1B>60 AND VAR19<100;
量能突破:=SUM(IF(C=REF(C,1),0,IF(C>REF(C,1),VOL,-VOL)),0);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(H,N,1,1)+1);A2:=A1>REF(A1,1);B1:=BACKSET(ISLASTBAR,PEAKBARS(H,N,2,1)+1);B2:=B1>REF(B1,1);C1:=BACKSET(ISLASTBAR,PEAKBARS(H,N,3,1)+1);C2:=C1>REF(C1,1);A11:=BACKSET(ISLASTBAR,TROUGHBARS(L,N,1,1)+1);A21:=A11>REF(A11,1);B11:=BACKSET(ISLASTBAR,TROUGHBARS(L,N,2,1)+1);B21:=B11>REF(B11,1);C11:=BACKSET(ISLASTBAR,TROUGHBARS(L,N,3,1)+1);C21:=C11>REF(C11,1);DRAWLINE1(B2,H,A2,H,1),COLORBLUE;DRAWLINE1(B21,L,A21,L,1),COLOR0000FF;K:=EMA(VAR7,5)*2, COLORFF00FF;D:=EMA(K,5), COLORWHITE;J:=K*3-D*2, COLORYELLOW;
D1:=REF(H,N);D2:=D1=HHV(H,2*N+1);D3:=FILTER(D2,N);D4:=BACKSET(D3,N+1);HD:=FILTER(D4,N);D5:=REF(L,N);D6:=D5=LLV(L,2*N+1);D7:=FILTER(D6,N);D8:=BACKSET(D7,N+1);LD:=FILTER(D8,N);
E:=D>REF(D,1);F:=BACKSET(E,REF(BARSLAST(HD),1)+2);G:=F>REF(F,1);DRAWLINE(G,H,E,H,1),POINTDOT,LINETHICK1,COLORYELLOW;I:=BACKSET(ISLASTBAR,BARSLAST(LD)+1);
M:=K>REF(K,1);DRAWLINE(M,L,J,L,1),POINTDOT,LINETHICK1,COLORFFB97A;M1:=BARSLAST(E);M2:=BARSLAST(G);M3:=REF(H,M1);M4:=REF(H,M2);M5:=M4-M2*(M4-M3)/(M2-M1);DRAWICON(REF(C,1)<=REF(M5,1) AND C>M5,M5,4);
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;J12:=(HIGH - ((HIGH - LOW) / 3));J23:=(LOW + ((HIGH - LOW) / 3));AAA:=REFX1(HHV(H,90),100000);BBB:=REFX1(LLV(L,100),100000);
PL5:=ZIGZAG(C,5,1);EN1:=PL5>REF(PL5,1) AND REF(PL5,1)<=REF(PL5,2) AND REF(PL5,2)<=REF(PL5,3);EX1:=PL5<REF(PL5,1) AND REF(PL5,1)>=REF(PL5,2) AND REF(PL5,2)>=REF(PL5,3);PL10:=ZIGZAG(C,10,1);EN2:=PL10>REF(PL10,1) AND REF(PL10,1)<=REF(PL10,2) AND REF(PL10,2)<=REF(PL10,3);EX2:=PL10<REF(PL10,1) AND REF(PL10,1)>=REF(PL10,2) AND REF(PL10,2)>=REF(PL10,3);PL20:=ZIGZAG(C,20,1);EN3:=PL20>REF(PL20,1) AND REF(PL20,1)<=REF(PL20,2) AND REF(PL20,2)<=REF(PL20,3);EX3:=PL20<REF(PL20,1) AND REF(PL20,1)>=REF(PL20,2) AND REF(PL20,2)>=REF(PL20,3);走强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.98,'---------A㈠'),COLORFFFFFF;DRAWTEXT(EX1 AND DTJD5=2,H*1.02,'------B㈡'),COLORGREEN;DRAWTEXT(EN2 AND ZTJZ5=1,L*0.98,' ---C㈢全多'),COLORFFFFFF;DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJD5=1,H*1.02,'------------⑴空'),COLORFFFFFF;DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=2,L*0.98,'-----------⑵补'),COLOR00FFFF;DRAWTEXT(EX1 AND PL10>REF(PL10,1) AND ZTJZ5=2,H*1.02,'------------⑶空'),COLORFFFF00;DRAWTEXT(EN1 AND PL10>REF(PL10,1) AND ZTJZ5=3,L*0.98,'------------⑷在补'),COLOR00FFFF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.02,'-----------⑸顶空'),COLORGREEN;DRAWTEXT(EN2 AND DTJZ10=1,L*0.95,'-----Ⅰ'),COLORFFFFFF;DRAWTEXT(EX2 AND DTJD10=2,H,'-----Ⅱ'),COLORGREEN;DRAWTEXT(EN3 AND ZTJZ10=1,L*0.95,'-----Ⅲ'),COLORFF00FF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,H*1.06,'-----①空'),COLORFFFF00;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,L*0.94,'-----②多'),COLORFF00FF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,H*1.06,'-----③空'),COLORGREEN;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,L*0.94,'-----④在补'),COLORFF00FF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.02,'⑸顶'),COLOR0000FF;DRAWTEXT(EN2 AND DTJZ10=1,LOW*0.94,'----【A】多'),COLOR00FF00;DRAWTEXT(EX2 AND DTJD10=2,HIGH*1.05,'----【B】空'),COLOR00FF00;DRAWTEXT(EN3 AND ZTJZ10=1,LOW*0.94,'----【C】全仓多'),COLOR00FF00;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=1,HIGH*1.04,'----①空进'),COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=2,LOW*0.96,'----②多全仓'),COLOR00FFFF;DRAWTEXT(EX2 AND PL20>REF(PL20,1) AND ZTJD10=2 OR (ZTJD10=0 OR ZTJD10=2) AND EX2,HIGH*1.04,'----③空'),COLOR00FFFF;DRAWTEXT(EN2 AND PL20>REF(PL20,1) AND ZTJZ10=3,LOW*0.96,'----④多补'),COLOR00FFFF;
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;
有思路,想编写各种指标公式,交易模型,选股公式,还原公式的朋友
可联系技术人员 QQ: 262069696 或微信号:cxh99cxh99 进行 有偿收费 编写!
(注:由于人数限制,QQ或微信请选择方便的一个联系我们就行,加好友时请简单备注下您的需求,否则无法通过。谢谢您!)
相关文章
-
没有相关内容