我已經設法讓變量通過並用這個非常接近地模擬以前的結果......插入代碼 int counted_bars=Bars-MathMax(MathMax(IntInd1S2,IntInd2S2),MathMax(IntInd1S1,IntInd2S1)); for(int i=Bars-counted_bars-1;igt;0;i--) { PerH1 = High#91;iHighest(SymbolToManage,IntIndTF1,MODE_HIGH,IntInd1S2,i IntInd1S1)#93;; PerL1 = Low#91;iLowest(SymbolToManage,IntIndTF1,MODE_LOW,IntInd1S2,i IntInd1S1)#93;; PerM1 = NormalizeDouble((PerH1 PerL1)/2,Digits); PerH2 = 高#91;iHighest(SymbolToManage,IntIndTF2,MODE_HIGH,IntInd2S2,i IntInd2S1)#93;; PerL2 = Low#91;iLowest(SymbolToManage,IntIndTF2,MODE_LOW,IntInd2S2,i IntInd2S1)#93;; PerM2 = NormalizeDouble((PerH2 PerL2)/2,Digits); IntInd1S2,i IntInd1S1 之前設置為 2 和 14,現在在 1 和 13 工作,這是有道理的。儘管如此,仍然出現數組超出範圍錯誤。