Quote Originally Posted by ;
我將 -1 添加到限制條數中,它似乎可以在不影響結果的任何更改的情況下工作,所以這很好。為了確保 iLowest/iHigheset 不返回 -1 我這樣做了,很確定這不是正確的方式 b/c 結果很糟糕... int BarsCounted1 = TFBars1-MathMax(IntInd1S2,IntInd1S1 1); if (BarsCounted1 lt; 0) {return;} int LimitBars1 = TFBars1-BarsCounted1; for (BarCount1 = LimitBars1-1; BarCount1 gt;= 0; BarCount1--) { if ((iHighest(SymbolToManage,IntIndTF1,MODE_HIGH,IntInd1S2,BarCount1 IntInd1S1) lt; 0) || (iLowest(SymbolToManage,IntIndTF1,MODE_LOW ,IntInd1S2,BarCount1 IntInd1S1)...
我在想這樣的插入代碼 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;}