【资料图】
一、题文
请问怎么修改公式VAR1:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))×100慢线1:=SMA(VAR1,10,1),LINETHICK2,COLORFFFF66STICKLINE(慢线1>=REF(慢线1,1),慢线1,REF(慢线1,1),0,1 ),COLORREDSTICKLINE(慢线1>=REF(慢线1,1),慢线1,REF(慢线1,1),3.1,0),COLOR0055FFSTICKLINE(慢线1>=REF(慢线1,1),慢线1,REF(慢线1,1),2.6,0),COLOR0077FFSTICKLINE(慢线1>=REF(慢线1,1),慢线1,REF(慢线1,1),2.1,0),COLOR0099FFSTICKLINE(慢线1>=REF(慢线1,1),慢线1,REF(慢线1,1),1.5,0),COLOR00BBFFSTICKLINE(慢线1>=REF(慢线1,1),慢线1,REF(慢线1,1),0.9,0),COLOR00DDFFSTICKLINE(慢线1>=REF(慢线1,1),慢线1,REF(慢线1,1),0.3,0),COLOR00FFFFSTICKLINE(慢线1STICKLINE(慢线1STICKLINE(慢线1STICKLINE(慢线1STICKLINE(慢线1STICKLINE(慢线1STICKLINE(慢线1RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))×100K1:SMA(RSV,3,1)COLORGREEND1:SMA(K1,3,1)COLORRED买进:IF( 慢线11.5×MA(VOL,5) AND CROSS(D1,慢线1),50,0),STICK,COLORYELLOW卖出:IF(慢线1>76 AND CROSS(慢线1,K1),60,0),COLORGREEN,STICKVAR2:=(HIGH+LOW+OPEN+2×CLOSE)/5VAR3:=REF(VAR2,1)VAR4:=SMA(MAX(VAR2-VAR3,0),10,1)/SMA(ABS(VAR2-VAR3),10,1)×100段底:IF(COUNT(VAR4<20,5)>=1 AND COUNT(VAR2=LLV(VAR2,5),10)>=1 ANDCLOSE>OPEN AND CLOSE>REF(OPEN,1) AND VOL>1.5×MA(VOL,5),60,0),STICK,COLORREDMAV:=(2×C+H+L)/4VAR5:=LLV(LOW,34)VAR6:=HHV(HIGH,34)SK1:=EMA((MAV-VAR5)/(VAR6-VAR5)×100,13),STICK,COLOR00FFFF LINETHICK2SD1:=EMA(0.667×REF(SK1,1)+0.333×SK1,2)持仓:STICKLINE(SK1>SD1,2,-1,10,1),LINETHICK1,COLORRED空仓:STICKLINE(SK1DRAWICON(段底 OR 买进,55,1)COLORREDDRAWICON(卖出,50,12)VAR7:=SMA(MAX(CLOSE-REF(CLOSE,1),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)×100五天百分五:IF(REF(VAR7,1)<20 AND (C/REF(C,1)-1)×100>9 AND C=H,85,0),COLORWHITEAA:=DRAWICON(五天百分五,50,1)DRAWTEXT(五天百分五,75,12),COLORREDVAR11:=(HIGH+LOW+OPEN+2×CLOSE)/5VAR12:=REF(VAR11,1)VAR13:=SMA(MAX(VAR11-VAR12,0),10,1)/SMA(ABS(VAR11-VAR12),10,1)×100,LINETHICK1VAR14:REVERSE(VAR13)+100,COLORMAGENTA,LINETHICK1底部不远:IF(COUNT(VAR13<=14,2),30,0),COLORMAGENTA,LINETHICK2买进1:IF(CROSS(VAR13,底部不远) AND VOL>1.5×MA(VOL,5),60,0),STICK,LINETHICK3这个通达信最后提示错误句买进:IF( 慢线11.5×MA(VOL,5) AND CROSS(D1,慢线1),50,0),STICK,COLORYELLOW:对不起,公式我是输出不能超过16个!请问怎么修改能通过呢?N1 1 50 30Q 1 50 1520>20>
二、解答
VAR1:=(CLOSE-LLV(LOW,N1))/(HHV(HIGH,N1)-LLV(LOW,N1))×100慢线1:=SMA(VAR1,10,1),LINETHICK2,COLORFFFF66RSV:=(CLOSE-LLV(LOW,15))/(HHV(HIGH,15)-LLV(LOW,15))×100K1:SMA(RSV,3,1)COLORGREEND1:SMA(K1,3,1)COLORRED买进:IF( 慢线11.5×MA(VOL,5) AND CROSS(D1,慢线1),50,0),STICK,COLORYELLOW卖出:IF(慢线1>76 AND CROSS(慢线1,K1),60,0),COLORGREEN,STICKVAR2:=(HIGH+LOW+OPEN+2×CLOSE)/5VAR3:=REF(VAR2,1)VAR4:=SMA(MAX(VAR2-VAR3,0),10,1)/SMA(ABS(VAR2-VAR3),10,1)×100段底:IF(COUNT(VAR4<20,5)>=1 AND COUNT(VAR2=LLV(VAR2,5),10)>=1 ANDCLOSE>OPEN AND CLOSE>REF(OPEN,1) AND VOL>1.5×MA(VOL,5),60,0),STICK,COLORREDMAV:=(2×C+H+L)/4VAR5:=LLV(LOW,34)VAR6:=HHV(HIGH,34)SK1:=EMA((MAV-VAR5)/(VAR6-VAR5)×100,13),STICK,COLOR00FFFF LINETHICK2SD1:=EMA(0.667×REF(SK1,1)+0.333×SK1,2)持仓:STICKLINE(SK1>SD1,2,-1,10,1),LINETHICK1,COLORRED空仓:STICKLINE(SK1DRAWICON(段底 OR 买进,55,1)COLORREDDRAWICON(卖出,50,12)VAR7:=SMA(MAX(CLOSE-REF(CLOSE,1),0),7,1)/SMA(ABS(CLOSE-REF(CLOSE,1)),7,1)×100五天百分五:IF(REF(VAR7,1)<20 AND (C/REF(C,1)-1)×100>9 AND C=H,85,0),COLORWHITEAA:=DRAWICON(五天百分五,50,1)DRAWTEXT(五天百分五,75,12),COLORREDVAR11:=(HIGH+LOW+OPEN+2×CLOSE)/5VAR12:=REF(VAR11,1)VAR13:=SMA(MAX(VAR11-VAR12,0),10,1)/SMA(ABS(VAR11-VAR12),10,1)×100,LINETHICK1VAR14:REVERSE(VAR13)+100,COLORMAGENTA,LINETHICK1底部不远:IF(COUNT(VAR13<=14,2),30,0),COLORMAGENTA,LINETHICK2买进1:IF(CROSS(VAR13,底部不远) AND VOL>1.5×MA(VOL,5),60,0),STICK,LINETHICK320>20>
本文到此结束,希望对大家有所帮助。