Hice un EA usando el siguiente...
externo int IntIndTF1 = 4;
externo int IntInd1S1 = dos;
externo int IntInd1S2 = 14;
externo int IntIndTF2 = 1;
externo int IntInd2S1 = 3;
externo int IntInd2S2 = 9;
Código insertado PerH1 = High#91;iHighest(SymbolToManage,IntIndTF1,MODE_HIG H,IntInd1S2,IntInd1S1)Número 93;; PerL1 = Reducido #91;iLowest(SymbolToManage,IntIndTF1,MODE_LOW,IntI nd1S2,IntInd1S1)Número 93;; PerM1 = NormalizeDouble((PerH1 PerL1)/2,Digits); PerH2 = High#91;iHighest(SymbolToManage,IntIndTF2,MODE_HIG H,IntInd2S2,IntInd2S1)Número 93;; PerL2 = Reducido #91;iLowest(SymbolToManage,IntIndTF2,MODE_LOW,IntI nd2S2,IntInd2S1)Número 93;; PorM2 = NormalizeDouble((PerH2 PerL2)/2,Digits);
Funcionó muy bien hasta que comencé a analizar otros símbolos con él, luego apareció el temido error Array out of range, así que lo cambié a...
Código insertado int BarCount = Bars; cuando (BarCount lt; 1) BarCount = 1; for (int I=0; igt;Bars; I--) PerH1 = High#91;iHighest(SymbolToManage,IntIndTF1,MODE_HIG H,IntInd1S2,I IntInd1S1)#93;; PerL1 = Reducido #91;iLowest(SymbolToManage,IntIndTF1,MODE_LOW,IntI nd1S2,I IntInd1S1)#93;; PerM1 = NormalizeDouble((PerH1 PerL1)/2,Digits); PerH2 = High#91;iHighest(SymbolToManage,IntIndTF2,MODE_HIG H,IntInd2S2,I IntInd2S1)#93;; PerL2 = Reducido #91;iLowest(SymbolToManage,IntIndTF2,MODE_LOW,IntI nd2S2,I IntInd2S1)#93;; PorM2 = NormalizeDouble((PerH2 PerL2)/2,Digits); Los errores de rango fuera de rango parecen haber disminuido. SIN EMBARGO, hoy no puedo hacer que simule las configuraciones anteriores que funcionaban bien...
externo int IntIndTF1 = 4;
externo int IntInd1S1 = dos;
externo int IntInd1S2 = 14;
externo int IntIndTF2 = 1;
externo int IntInd2S1 = 3;
externo int IntInd2S2 = 9;
He analizado los rangos de 1 y -1, pero el EA ahora no regresa exactamente a los mismos valores calculados para las mismas barras. ¿Cómo modifico el código para deshacerme de los errores? Mantenga los resultados y los valores probados.
Esto es en realidad en un EA que no usa un indicador. Los valores para los HHLL han estado en el EA. Necesito que tenga la capacidad de leer y recibir exactamente los mismos efectos para la variable.