在系統自帶的macd指標里面添加下面的代碼
runmode:0;
nn1:=barslast(macd1<0 and ref(macd1>0,1));
nn2:=barslast(macd1>0 and ref(macd1<0,1));
ll1:=llv(macd1,nn1);
hh1:=hhv(macd1,nn2);
if macd1<0 then ll:=ll1;
if macd1>0 then hh:=hh1;
drawtext(macd1>0 and macd1=hh1,macd1,numtostr(macd1,2));
drawtext(macd1<0 and macd1=ll1,macd1,numtostr(macd1,2));
顯示不對噢, 只顯示了一邊, 并不是顯示的最大值.
我本地測試是沒問題的,顯示了最高值