Errori, bug, domande - pagina 1806
Ti stai perdendo delle opportunità di trading:
- App di trading gratuite
- Oltre 8.000 segnali per il copy trading
- Notizie economiche per esplorare i mercati finanziari
Registrazione
Accedi
Accetti la politica del sito e le condizioni d’uso
Se non hai un account, registrati
Cosa fare in caso di questo errore quando si carica un programma MQL su un grafico?
Service Desk: #1673705
Si noti che tutti gli indicatori per lo stesso simbolo sono letti consecutivamente nello stesso thread. Se un indicatore rallenta, allora rallenta anche l'intero thread di elaborazione dei simboli
Su Metaquotes-Demo i limitatori possono avere uno slippage negativo - non è corretto.
Imposta manualmente BuyLimit sopra Ask...
Errore [Nessun prezzo] sul posto
Com'è possibile che non ci sia un prezzo, c'è persino un prezzo nel registro!
Query
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
Ho appena incontrato lo stesso errore sul server di Metacvots. Dopo 5 tentativi l'ordine è stato effettuato.
Su Metaquotes-Demo i limitatori possono avere uno slippage negativo - non è corretto.
Imposta manualmente BuyLimit sopra 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 ha ricevuto/ricevuto dati come questo
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
Log
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)
Spiegazione
All'inizio abbiamo cercato di impostare BuyLimit al prezzo più basso possibile 29528. Questo prezzo è molto più alto del prezzo Ask (29038). Nel 99,99% dei casi, BuyLimit non è impostato più in alto di Ask. Tuttavia, non è proibito, quindi fare un ordine è riuscito. E poi (in viola) ci è voluto quasi mezzo minuto prima che BuyLimit diventasse una posizione. Anche se sarebbe dovuto accadere all'istante. Ma per peggiorare le cose, BuyLimit è stato eseguito al suo prezzo e non a Ask. Cioè, l'ordine Limit ha ricevuto uno slippage negativo quando è stato eseguito, il che è solo un errore!
Il secondo OrderSend era un tentativo di impostare BuyLimit come normale - non più alto di Ask. E, naturalmente, non ha funzionato (in rosso). Perché SYMBOL_SESSION_PRICE_LIMIT_MIN non deve essere superiore a Ask.
Per favore, inviatemi i registri. Lo copierò nell'applicazione 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
e questo mi è successo solo ora, il codice di apertura dei trade non è cambiato.
cosa fresca
In Market Watch - premo Mostra tutti i simboli.
Demo di MetaQuotes
e questo mi è successo solo ora, il codice di apertura dei trade non è cambiato.
Serve il registro della scheda Log, non l'Expert.
aspetta un attimo che stavo ricevendo un messaggio su 2017.02.15 15:13:32.414 Symbols non possono essere selezionati più di 1000 simboli
alla ricerca di
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