MT4 EA에서 범위를 벗어난 어레이 오류 수정 - 페이지 2
페이지 2 중 912 먼저먼저 12
결과 11 - 13 / 13

실: MT4 EA에서 범위를 벗어난 어레이 오류 수정

  1. #11

    Quote 원래에 의해 게시 됨 ;
    다음으로 EA를 만들었습니다... extern int IntIndTF1 = 4; 외부 정수 IntInd1S1 = 2; 외부 정수 IntInd1S2 = 14; 외부 정수 IntIndTF2 = 1; 외부 int IntInd2S1 = 3; 외부 정수 IntInd2S2 = 9; PerH1 = 높음[iHighest(SymbolToManage,IntIndTF1,MODE_HIGH,IntInd 1S2,IntInd1S1)]; PerL1 = 낮음[iLowest(SymbolToManage,IntIndTF1,MODE_LOW,IntInd1S 2,IntInd1S1)]; PerM1 = NormalizeDouble((PerH1 PerL1)/2,자리수); PerH2 = 높음[iHighest(SymbolToManage,IntIndTF2,MODE_HIGH,IntInd 2S2,IntInd2S1)]; PerL2 = 낮음[iLowest(SymbolToManage,IntIndTF2,MODE_LOW,IntInd2S 2,IntInd2S1)];...
    먼저 for 루프를 수정해 보세요. 두 번째 코드 블록에서는 루프가 실행되지 않으므로 오류가 발생하지 않습니다. i=0이지만 igt;Bars를 확인합니다. 나는 감소해야합니다 : for(int i=Bars-IndicatorCounted()-1;igt;0;i#8212

  2. #12

    Quote 원래에 의해 게시 됨 ;
    {인용} 먼저 for 루프를 수정해 보세요. 두 번째 코드 블록에서는 루프가 실행되지 않으므로 오류가 발생하지 않습니다. i=0이지만 igt;Bars를 확인합니다. i 감소는 다음과 같아야 합니다. for(int i=Bars-IndicatorCounted()-1;igt;0;i—)
    코드는 ea 내부에만 있고 IndicatorCounted()는 여전히 ea 내부에서 작동합니까?

  3. #13

    Quote 원래에 의해 게시 됨 ;
    제한 막대 수에 -1을 추가했는데 결과 변경에 영향을 주지 않고 작동하는 것 같으므로 괜찮습니다. iLowest/iHighset이 -1을 반환하지 않는지 확인하기 위해 이 작업을 수행했습니다. 결과가 끔찍합니다. 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,IntI nd1S2,BarCount1 IntInd1S1) lt; 0) || ,IntInd1S2,BarCount1 IntInd1S1)...
    다음과 같은 삽입 코드 for(int i=(IndicatorCounted()==0)?Bars(symbol,tf)-1-MathMax(IntInd1S2,IntInd1S1 1):1;igt;0;i#8212; ){ int hi=iHighest(기호, tf, 모드, IntInd1S2, i); if(hi!=-1)PerH1=높음#91;hi#93;; 그렇지 않으면 PerH1=-1; int lo=i최저(...); if(lo!=-1)PerL1=낮음#91;lo#93;; 그렇지 않으면 PerL1=-1;}

게시 권한

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
쿠키 정책
쿠키 정책: koreaforex 웹사이트는 쿠키를 사용하며, 웹사이트를 사용자는 쿠키 사용에 동의하는 것입니다. 자세한 정보는 '쿠키 공개' 를 읽어주십시오.