if macd1>0 and ref(macd1,1)<0 then a1:=barpos; r1:=hhv(macd1,barpos-a1+1); if macd1=r1 then a3:=barpos; if macd1<0 and ref(macd1,1)>0 then a2:=barpos; r2:=llv(macd1,barpos-a2+1); if macd1=r2 then a4:=barpos; r3:=a4-a3; |
谁能帮我解决呢,先谢谢了。
请编写一个程序,首先求出前一MACD红柱子对应的最高价A(当然是后面出了第一根绿柱才能确定前面的最高价A,后面类推,不再说明),与接下来的绿柱子的最低价B,接着求出A-B之间的K线的数量。当最高价有几根K线同高时,取最后面的那根K。而最低价几根同低时,也取最后那根K。