首先嘗試修復您的 for 循環,在第二個代碼塊中,循環永遠不會運行,因此不會發生錯誤:i=0 但檢查 igt;Bars。隨著 i 遞減應該是: for(int i=Bars-IndicatorCounted()-1;igt;0;i#8212;)Quote:
Originally Posted by ;
Printable View
首先嘗試修復您的 for 循環,在第二個代碼塊中,循環永遠不會運行,因此不會發生錯誤:i=0 但檢查 igt;Bars。隨著 i 遞減應該是: for(int i=Bars-IndicatorCounted()-1;igt;0;i#8212;)Quote:
Originally Posted by ;
代碼僅在 ea 內,不是指標,IndicatorCounted() 是否仍可在 ea 內工作?Quote:
Originally Posted by ;
我在想這樣的插入代碼 for(int i=(IndicatorCounted()==0)?Bars(symbol,tf)-1-MathMax(IntInd1S2,IntInd1S1 1):1;igt;0;i#8212; ){ int hi=iHighest(symbol,tf,mode,IntInd1S2,i); if(hi!=-1)PerH1=High#91;hi#93;;否則 PerH1=-1; int lo=iLowest(...); if(lo!=-1)PerL1=Low#91;lo#93;;否則 PerL1=-1;}Quote:
Originally Posted by ;