Errores, fallos, preguntas - página 1806
![MQL5 - Lenguaje de estrategias comerciales para el terminal de cliente MetaTrader 5](https://c.mql5.com/i/registerlandings/logo-2.png)
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
¿Qué hacer en caso de que se produzca este error al cargar el programa MQL en un gráfico?
Servicio de atención al cliente: #1673705
Tenga en cuenta que todos los indicadores del mismo símbolo se leen consecutivamente en el mismo hilo. Si un indicador se ralentiza, todo el hilo de procesamiento de símbolos se ralentiza también
En Metaquotes-Demo los limitadores pueden tener deslizamiento negativo - no es correcto.
Establecer manualmente BuyLimit por encima de Ask...
Error [No hay precios] en el lugar
¿Cómo es que no hay precio, incluso hay un precio en el registro?
Consulta
2017.02.14 23:18:41.442 Request.magic = 0
2017.02.14 23:18:41.442 Request.order = 0
2017.02.14 23:18:41.442 Request.symbol = EURPLN
2017.02.14 23:18:41.442 Request.volume = 1.0
2017.02.14 23:18:41.442 Request.price = 4.30632
2017.02.14 23:18:41.442 Request.stoplimit = 0.0
2017.02.14 23:18:41.442 Request.sl = 0.0
2017.02.14 23:18:41.442 Request.tp = 0.0
2017.02.14 23:18:41.442 Request.deviation = 100
2017.02.14 23:18:41.442 Request.type = ORDER_TYPE_BUY (0)
2017.02.14 23:18:41.442 Request.type_filling = ORDER_FILLING_RETURN (2)
2017.02.14 23:18:41.442 Request.type_time = ORDER_TIME_GTC (0)
2017.02.14 23:18:41.442 Request.expiration = 1970.01.01 00:00:00
2017.02.14 23:18:41.442 Request.comment = My Position
2017.02.14 23:18:41.442 Request.position = 0
2017.02.14 23:18:41.442 Request.position_by = 0
2017.02.14 23:18:41.442 Result.retcode = 10021
2017.02.14 23:18:41.442 Result.deal = 0
2017.02.14 23:18:41.442 Result.order = 0
2017.02.14 23:18:41.442 Result.volume = 0.0
2017.02.14 23:18:41.442 Result.price = 0.0
2017.02.14 23:18:41.442 Result.bid = 0.0
2017.02.14 23:18:41.442 Result.ask = 0.0
2017.02.14 23:18:41.442 Result.comment = No prices 0.028 + 0.000 ms
2017.02.14 23:18:41.442 Result.request_id = 0
2017.02.14 23:18:41.442 Result.retcode_external = 0
2017.02.14 23:18:41.442
2017.02.14 23:18:41.442 SymbolInfoDouble(Symb,::SYMBOL_BID) = 4.30151
2017.02.14 23:18:41.442 SymbolInfoDouble(Symb,::SYMBOL_ASK) = 4.30632
Acabo de encontrarme con el mismo error en el servidor de Metacvots. Después de 5 intentos el pedido fue realizado.
En Metaquotes-Demo los limitadores pueden tener deslizamiento negativo - no es correcto.
Establecer manualmente BuyLimit por encima de Ask...
#define TOSTRING2(A) #A + " = " + EnumToString(A) + " (" + (string)(A) + ")\n"
string ToString( const MqlTradeRequest &Request )
{
return(TOSTRING2(Request.action) + TOSTRING(Request.magic) + TOSTRING(Request.order) +
TOSTRING(Request.symbol) + TOSTRING(Request.volume) + TOSTRING(Request.price) +
TOSTRING(Request.stoplimit) + TOSTRING(Request.sl) + TOSTRING(Request.tp) +
TOSTRING(Request.deviation) + TOSTRING2(Request.type) + TOSTRING2(Request.type_filling) +
TOSTRING2(Request.type_time) + TOSTRING(Request.expiration) + TOSTRING(Request.comment) +
TOSTRING(Request.position) + TOSTRING(Request.position_by));
}
string ToString( const MqlTradeResult &Result )
{
return(TOSTRING(Result.retcode) + TOSTRING(Result.deal) + TOSTRING(Result.order) +
TOSTRING(Result.volume) + TOSTRING(Result.price) + TOSTRING(Result.bid) +
TOSTRING(Result.ask) + TOSTRING(Result.comment) + TOSTRING(Result.request_id) +
TOSTRING(Result.retcode_external));
}
#define Bid (::SymbolInfoDouble(Symb, ::SYMBOL_BID))
#define Ask (::SymbolInfoDouble(Symb, ::SYMBOL_ASK))
#include <MT4Orders.mqh>
#define PRINT(A) A; \
Print(#A + "\n" + ToString(MT4ORDERS::LastTradeRequest) + ToString(MT4ORDERS::LastTradeResult)); \
Print(TOSTRING(Bid)); \
Print(TOSTRING(Ask)); \
Print(TOSTRING(SymbolInfoDouble(Symb, SYMBOL_SESSION_PRICE_LIMIT_MIN)));
void OpenBuyLimits( const string Symb )
{
PRINT(OrderSend(Symb, OP_BUYLIMIT, 1, SymbolInfoDouble(Symb, SYMBOL_SESSION_PRICE_LIMIT_MIN), 100, 0, 0))
PRINT(OrderSend(Symb, OP_BUYLIMIT, 1, Ask, 100, 0, 0))
}
void OnStart()
{
OpenBuyLimits("DIG-20170330");
}
OrderSend recibió/recibió datos así
2017.02.15 14:47:19.295 Request.action = TRADE_ACTION_PENDING (5)
2017.02.15 14:47:19.295 Request.magic = 0
2017.02.15 14:47:19.295 Request.order = 0
2017.02.15 14:47:19.295 Request.symbol = DIG-20170330
2017.02.15 14:47:19.295 Request.volume = 1.0
2017.02.15 14:47:19.295 Request.price = 29528.0
2017.02.15 14:47:19.295 Request.stoplimit = 0.0
2017.02.15 14:47:19.295 Request.sl = 0.0
2017.02.15 14:47:19.295 Request.tp = 0.0
2017.02.15 14:47:19.295 Request.deviation = 100
2017.02.15 14:47:19.295 Request.type = ORDER_TYPE_BUY_LIMIT (2)
2017.02.15 14:47:19.295 Request.type_filling = ORDER_FILLING_RETURN (2)
2017.02.15 14:47:19.295 Request.type_time = ORDER_TIME_GTC (0)
2017.02.15 14:47:19.295 Request.expiration = 1970.01.01 00:00:00
2017.02.15 14:47:19.295 Request.comment =
2017.02.15 14:47:19.295 Request.position = 0
2017.02.15 14:47:19.295 Request.position_by = 0
2017.02.15 14:47:19.295 Result.retcode = 10009
2017.02.15 14:47:19.295 Result.deal = 0
2017.02.15 14:47:19.295 Result.order = 134117077
2017.02.15 14:47:19.295 Result.volume = 1.0
2017.02.15 14:47:19.295 Result.price = 0.0
2017.02.15 14:47:19.295 Result.bid = 0.0
2017.02.15 14:47:19.295 Result.ask = 0.0
2017.02.15 14:47:19.295 Result.comment = Request executed 61.066 + 0.004 ms
2017.02.15 14:47:19.295 Result.request_id = 9
2017.02.15 14:47:19.295 Result.retcode_external = 0
2017.02.15 14:47:19.295
2017.02.15 14:47:19.295 Bid = 29031.0
2017.02.15 14:47:19.295
2017.02.15 14:47:19.295 Ask = 29038.0
2017.02.15 14:47:19.295
2017.02.15 14:47:19.295 SymbolInfoDouble(Symb,SYMBOL_SESSION_PRICE_LIMIT_MIN) = 29528.0
2017.02.15 14:47:19.295
2017.02.15 14:47:19.295 OrderSend(Symb,OP_BUYLIMIT,1,Ask,100,0,0)
2017.02.15 14:47:19.295 Request.action = TRADE_ACTION_PENDING (5)
2017.02.15 14:47:19.295 Request.magic = 0
2017.02.15 14:47:19.295 Request.order = 0
2017.02.15 14:47:19.295 Request.symbol = DIG-20170330
2017.02.15 14:47:19.295 Request.volume = 1.0
2017.02.15 14:47:19.295 Request.price = 29038.0
2017.02.15 14:47:19.295 Request.stoplimit = 0.0
2017.02.15 14:47:19.295 Request.sl = 0.0
2017.02.15 14:47:19.295 Request.tp = 0.0
2017.02.15 14:47:19.295 Request.deviation = 100
2017.02.15 14:47:19.295 Request.type = ORDER_TYPE_BUY_LIMIT (2)
2017.02.15 14:47:19.295 Request.type_filling = ORDER_FILLING_RETURN (2)
2017.02.15 14:47:19.295 Request.type_time = ORDER_TIME_GTC (0)
2017.02.15 14:47:19.295 Request.expiration = 1970.01.01 00:00:00
2017.02.15 14:47:19.295 Request.comment =
2017.02.15 14:47:19.295 Request.position = 0
2017.02.15 14:47:19.295 Request.position_by = 0
2017.02.15 14:47:19.297 Result.retcode = 10015
2017.02.15 14:47:19.297 Result.deal = 0
2017.02.15 14:47:19.297 Result.order = 0
2017.02.15 14:47:19.297 Result.volume = 0.0
2017.02.15 14:47:19.297 Result.price = 0.0
2017.02.15 14:47:19.297 Result.bid = 0.0
2017.02.15 14:47:19.297 Result.ask = 0.0
2017.02.15 14:47:19.297 Result.comment = Invalid price 0.015 + 0.000 ms
2017.02.15 14:47:19.297 Result.request_id = 0
2017.02.15 14:47:19.297 Result.retcode_external = 0
2017.02.15 14:47:19.297
2017.02.15 14:47:19.297 Bid = 29031.0
2017.02.15 14:47:19.297
2017.02.15 14:47:19.297 Ask = 29038.0
2017.02.15 14:47:19.297
2017.02.15 14:47:19.297 SymbolInfoDouble(Symb,SYMBOL_SESSION_PRICE_LIMIT_MIN) = 29528.0
Registro
2017.02.15 14:47:19.235 '5122740': buy limit 1.00 DIG-20170330 at 29528
2017.02.15 14:47:19.295 '5122740': accepted buy limit 1.00 DIG-20170330 at 29528
2017.02.15 14:47:19.295 '5122740': order #134117077 buy limit 1.00 / 1.00 DIG-20170330 at market done in 60.996 ms (0.341 ms on server)
2017.02.15 14:47:19.295 '5122740': failed buy limit 1.00 DIG-20170330 at 29038 [Invalid price]
2017.02.15 14:47:19.297 script Test2 (AUDUSD,H1) removed
2017.02.15 14:47:46.586 '5122740': deal #117726626 buy 1.00 DIG-20170330 at 29528 done (based on order #134117077)
Explicación
Al principio intentamos poner BuyLimit al precio más bajo posible 29528. Este precio es mucho más alto que el precio Ask (29038). En el 99,99% de los casos, BuyLimit no se fija por encima de Ask. Sin embargo, no está prohibido, por lo que hacer un pedido tuvo éxito. Y luego (en púrpura) pasó casi medio minuto antes de que BuyLimit se convirtiera en una posición. Aunque debería haber ocurrido al instante. Pero para empeorar las cosas, BuyLimit se ejecuta a su precio y no al de Ask. Es decir, la orden de Límite recibió un deslizamiento negativo cuando se ejecutó, ¡lo cual es un error!
El segundo OrderSend fue un intento de establecer BuyLimit como normal - no más alto que Ask. Y, por supuesto, no funcionó (en rojo). Porque SYMBOL_SESSION_PRICE_LIMIT_MIN no debe ser mayor que Ask.
Por favor, envíenme los registros. Lo copiaré en la aplicación SD.
2017.02.15 15:12:09.979 Exp - v7 (EURCHF,M1) Result ERROR= 10021 symbol EURUSD volume 1.0 action 1 tp 0.0 sl 0.0 type 0 price 1.05523 There are no quotes to process the request
2017.02.15 15:12:10.980 Exp - v7 (EURCHF,M1) OPEN DEAL sy=EURUSD op=0 ll=1.0 sl=0 tp=0 coomment=134120593 mn=9998745 SYMBOL_FILLING_MODE=1 SYMBOL_TRADE_EXEMODE=1 SYMBOL_EXPIRATION_MODE=15 SYMBOL_TRADE_MODE=4 SYMBOL_TRADE_STOPS_LEVEL=0 SYMBOL_TRADE_FREEZE_LEVEL=0 SYMBOL_ORDER_MODE=63 SYMBOL_START_TIME=0 SYMBOL_EXPIRATION_TIME=0 SYMBOL_SPREAD=10 SYMBOL_SESSION_DEALS=0
2017.02.15 15:12:11.102 Exp - v7 (EURCHF,M1) Result = 10009 symbol EURUSD volume 1.0 action 1 tp 0.0 sl 0.0 type 0 price 1.05526 Request completed
y esto solo me ha pasado ahora, el código para abrir operaciones no ha cambiado.
algo genial
En Market Watch - presiono Mostrar Todos los Símbolos.
Demostración de MetaQuotes
y esto solo me ha pasado ahora, el código para abrir operaciones no ha cambiado.
Necesita el registro de la pestaña Log, no el Experto.
Espere un minuto que estaba recibiendo un mensaje en 2017.02.15 15:13:32.414 Símbolos no más de 1000 símbolos pueden ser seleccionados
en busca de
2017.02.15 15:15:25.610 Trades '5246495': accepted instant buy 1.00 EURUSD at 1.05575
2017.02.15 15:15:25.610 Trades '5246495': deal #117730392 buy 1.00 EURUSD at 1.05575 done (based on order #134121023)
2017.02.15 15:15:25.611 Trades '5246495': order #134121023 buy 1.00 / 1.00 EURUSD at 1.05575 done in 94.543 ms
2017.02.15 15:15:25.674 Trades '5246495': failed instant buy 1.00 EURUSD at 1.05574 (deviation: 14) [No prices]
2017.02.15 15:15:26.687 Trades '5246495': failed instant buy 1.00 EURUSD at 1.05574 (deviation: 14) [No prices]
2017.02.15 15:15:27.701 Trades '5246495': failed instant buy 1.00 EURUSD at 1.05574 (deviation: 14) [No prices]
2017.02.15 15:15:28.713 Trades '5246495': failed instant buy 1.00 EURUSD at 1.05578 (deviation: 16) [No prices]
2017.02.15 15:15:29.728 Trades '5246495': instant buy 1.00 EURUSD at 1.05577 (deviation: 16)
2017.02.15 15:15:29.808 Trades '5246495': accepted instant buy 1.00 EURUSD at 1.05577 (deviation: 16)
2017.02.15 15:15:29.808 Trades '5246495': deal #117730398 buy 1.00 EURUSD at 1.05577 done (based on order #134121030)
2017.02.15 15:15:29.808 Trades '5246495': order #134121030 buy 1.00 / 1.00 EURUSD at 1.05577 done in 80.447 ms