type_filling aynı ORDER_TYPE_SELL_STOP için ayarlanmalıdır. Komut dosyası ORDER_FILLING_FOK'u belirtir, yani bir durdurma emri kabul edilirken ORDER_FILLING_FOK türünde (ya hep ya hiç) bir piyasa talebi oluşturulmalıdır. Bunun olmamasının sebebi nedir?
Pending Order
Bekleyen bir sipariş vermek için işlem talebi. 11 alan zorunludur :
Стандартные константы, перечисления и структуры / Структуры данных / Структура торгового запроса - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
Windows'u temizle, Casper'ı temizle, terminali koyuyorum, Casper kesiyor.
İstisnalar eklemek yardımcı olmuyor ...
Biz çoğalamayız. ServiceDesk'e istek yazıp detaylı anlatabilirsiniz. Windows sürümü, terminal sürümü, antivirüs sürümü.
DrWeb hiçbir şey bulamıyor.
if ( true ) \
{ \
Print ( "" ); \
// Print(""); \
}
void OnStart ()
{
MACRO
}
DrWeb hiçbir şey bulamıyor.
ama asla bir şey bulamıyor.
evet hayır, genellikle virüs bulur, ancak mt'de hiçbir şey bulamaz
Konunun devamında . Bekleyen siparişler için bir istek oluştururken Request.type_filling alanı neden artık önemli değildi?
Şimdi, nasıl doldurursanız doldurun, OrderGetInteger(ORDER_TYPE_FILLING) == ORDER_FILLING_RETURN .
Senaryo
{
MqlTradeRequest Request = { 0 };
Request.action = TRADE_ACTION_PENDING ;
Request.symbol = _Symbol ;
Request.volume = 1 ;
Request.price = SymbolInfoDouble ( _Symbol , SYMBOL_BID ) - 100 * _Point ;
Request.deviation = 10 ;
Request.type = ORDER_TYPE_SELL_STOP ;
Request.type_filling = ORDER_FILLING_FOK ;
MqlTradeResult Result = { 0 };
if ( OrderSend (Request, Result))
{
Sleep ( 100 );
if ( OrderSelect (Result.order))
Print ( EnumToString (( ENUM_ORDER_TYPE_FILLING ):: OrderGetInteger ( ORDER_TYPE_FILLING ) ));
}
}
Sonuç
type_filling aynı ORDER_TYPE_SELL_STOP için ayarlanmalıdır. Komut dosyası ORDER_FILLING_FOK'u belirtir, yani bir durdurma emri kabul edilirken ORDER_FILLING_FOK türünde (ya hep ya hiç) bir piyasa talebi oluşturulmalıdır. Bunun olmamasının sebebi nedir?
Pending Order
Bekleyen bir sipariş vermek için işlem talebi. 11 alan zorunludur :
Derleme Hatası
if ( true ) \
{ \
Print ( "" ); \
/* Print(""); */ \
}
if ( true ) \
{ \
Print ( "" ); \
/* Print(""); */ \
}
Request.action = TRADE_ACTION_PENDING ( 5 )
Request.magic = 0
Request.order = 0
Request.symbol = CHFRUB_TOM
Request.volume = 1.0
Request.price = 57.9
Request.stoplimit = 0.0
Request.sl = 0.0
Request.tp = 0.0
Request.deviation = 100
Request.type = ORDER_TYPE_BUY_LIMIT ( 2 )
Request.type_filling = ORDER_FILLING_RETURN ( 2 )
Request.type_time = ORDER_TIME_DAY ( 1 )
Request.expiration = 1970.01 . 01 00 : 00 : 00
Request.comment = My Order
Request.position = 0
Request.position_by = 0
Result.retcode = 10018
Result.deal = 0
Result.order = 0
Result.volume = 0.0
Result.price = 0.0
Result.bid = 0.0
Result.ask = 0.0
Result.comment = Market closed 53.327 + 0.000 ms
Result.request_id = 334
Result.retcode_external = 0