AA:=MA((2*CLOSE+HIGH+LOW)/4,5); 通道1:AA*N/100; 通道2:AA*(200-N)/100; CC:=ABS((2*CLOSE+HIGH+LOW)/4-MA(CLOSE,20))/MA(CLOSE,20); DD:=DMA(CLOSE,CC); 通道3:(1+M/100)*DD; 通道4:(1-M/100)*DD; 通道32:INTPART((1+M/100)*DD)+0.5; 通道42:INTPART((1-M/100)*DD); DRAWTEXT(通道32>REF(通道32,1),通道32*1.1,'1')COLORRED; DRAWTEXT(REF(通道32,1)>通道32,通道32*1.1,'2')COLORCYAN; QT:=IF(REF(通道32,1)!=通道32,10,0); 天数:=IF(REF(通道32,1)!=通道32,BARSLAST(QT=10),DRAWNULL); DRAWTEXT(REF(通道32,1)!=通道32,通道32*1.2,CON2STR(天数,0))COLORRED; 请教高手,为什么天数会是个天文数值:-40398103346332700000000000000000000 有些又是0
爱约股解答:
最后两行改成
天数:=if(ref(通道32,1)!=通道32 and ref(通道32,1),ref(barslast(qt=10),1)+1,drawnull);
drawtext(ref(通道32,1)!=通道32 and ref(通道32,1),通道32*1.2,con2str(天数,0))colorred;