Está perdiendo oportunidades comerciales:
- Aplicaciones de trading gratuitas
- 8 000+ señales para copiar
- Noticias económicas para analizar los mercados financieros
Registro
Entrada
Usted acepta la política del sitio web y las condiciones de uso
Si no tiene cuenta de usuario, regístrese
¡Víctor, usted, Renat, en general señaló correctamente, Alexey mostró la última comprobación necesaria, y antes de comprobar todos los controles necesarios para cada parámetro con todos los matices para evitar la ambigüedad de significado y sin perder ninguna condición!
¿Para qué sirve? Porque reinicio _LastError en cada función. No es que esté constantemente colgado en la memoria...
todavía tiene que comprobar que si ninguno de los 3 parámetros ha cambiado, entonces OrderModify tampoco necesita ser tocado.
Te escucho. No sirvió de nada. Aquí hay un trozo de código de mi método de modificación:
Podemos ver claramente que el valor del error se restablece.Entonces obtiene la información del mercado. Si la modificación está en el probador... entonces... ...luego hago la prueba propuesta por Alexei, y... si la modificación no tiene éxito... escribir un registro y las impresiones en el registro...
En general, podemos ver que no hay errores entre ResetLastError()... No hay nada de malo en ello.
Registro:
Te escucho. No sirvió de nada. Aquí hay un trozo de código de mi método de modificación:
Se puede ver claramente que el valor del error se está restableciendo.Entonces obtiene la información del mercado. Si la modificación está en el probador... entonces... Hago la prueba propuesta por Alexei, y... si la modificación no tiene éxito, entonces... escribir un registro y las impresiones en el registro...
En general, podemos ver que no hay errores entre ResetLastError()... No hay nada de malo en ello.
Registro:
Así es...
En el Asesor Experto, llamo al método de la clase así:
Esta es la parte de la clase que nos interesa:
Aquí está el trozo de tronco que queremos:
Déjeme explicarle. La modificación tiene lugar en el método fOrderModify(). A la entrada de este método fOrderModify(), se imprimen al principio del cuerpo los valores actuales de los parámetros de la orden y los nuevos valores previstos. Puedes verlo:
Esta pieza está en el registro:
Puedes ver que los parámetros son todos diferentes. No debería haber ningún problema.Así es...
En el Asesor Experto, llamo al método de la clase así:
Esta es la parte de la clase que nos interesa:
Aquí está el trozo de tronco que queremos:
No entiendo qué tiene que ver la Oferta con la Oferta, si la orden está pendiente?
La Oferta siempre es menor que el Límite de Venta, por lo que la línea if(New_OOP < Oferta) nunca será verdadera... ...respectivamente, la modificación se lleva a cabo sin obstáculos.
¿Por qué no creas también una matriz de errores? Está escrito en blanco y negro en la documentación que la variable _LastError almacena el número del último error. Y se restablece mediante la función ResetLastError(). Si no hay más errores entre las llamadas de _LastError, _LastError almacena el valor del último error. No hubo más errores en mi código. Bueno, esa no es la cuestión.
Estás absolutamente equivocado. El último error está bien restablecido en muchas funciones importantes. También funciona en WinAPI.
Por eso debes guardar el código de error en una variable local justo después de que se produzca y no intentar utilizarlo después de borrar esta variable del sistema diez veces en muchas de tus funciones intermedias.
Lo siento, SellLimit requiere dist:
no si (Nuevo_OOP<Oferta) continuar; sinosi (Nuevo_OOP-dist*Punto < Oferta) continuar;
¿Cómo puedo deshacerme de este maldito error? Estoy harto. Estoy comprobando cada parámetro de entrada de la función. Para mí, en este momento, es así:
Es decir, si el parámetro no ha sido modificado, no es necesario cambiarlo. No lo he hecho antes, pero he decidido...
A continuación, los parámetros se pasan al método de modificación de la orden de la siguiente manera:
Nw salida en el registro:
Entonces, el diario nos notifica, como modificación: OK, pero luego un error. Ninguno de los parámetros ha cambiado.
La orden está pendiente. Así que podemos cambiar el precio de apertura, de parada y de toma. Y esto, según tengo entendido, no contradice la documentación.
¿Quién se ha encontrado con algo así? ¿Cómo solucionarlo?