大家都在开放日进行交易吗?
Михаил:
每个人都在公开赛上交易吗?
也可能是他们根本就不交易。
每个人都在公开赛上交易吗?
今天清晨缝制的,还没有测试 (最好先在演示上测试一下)。
//+------------------------------------------------------------------+ //| BKS_Test.mq5 | //| Copyright 2015, Mikalas | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2015, Mikalas" #property link "https://www.mql5.com" #property version "1.00" // double sell_price; double buy_price; ulong buy_ticket; ulong sell_ticket; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { sell_price = 0; buy_price = 0; buy_ticket = 0; sell_ticket = 0; //--- if ( !GlobalVariableCheck( "trans_count" ) ) { datetime a_time = GlobalVariableSet( "trans_count", 0 ); if ( ulong( a_time ) == 0 ) { MessageBox( "Глобальная переменная терминала 'Счётчик транзакций' не создана!", "Ошибка", MB_OK | MB_ICONHAND ); return( INIT_FAILED ); } } //--- if ( !MarketBookAdd( _Symbol ) ) { MessageBox( "Не добавлен стакан по символу " + _Symbol, "Ошибка", MB_OK | MB_ICONHAND ); return( INIT_FAILED ); } return( INIT_SUCCEEDED ); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { MarketBookRelease( _Symbol ); } //+------------------------------------------------------------------+ //| Expert Set transaction count function | //+------------------------------------------------------------------+ void SetTransCount( const bool up_down ) { double tr_count; uint i = 0; do { i++; if ( GlobalVariableGet( "trans_count", tr_count ) ) { if ( up_down ) { if ( GlobalVariableSetOnCondition( "trans_count", tr_count + 1, tr_count ) ) { i = 100; } } else { if ( GlobalVariableSetOnCondition( "trans_count", tr_count - 1, tr_count ) ) { i = 100; } } } } while( i < 100 ); } //+------------------------------------------------------------------+ //| Remove order function | //+------------------------------------------------------------------+ void RemoveOrder( ulong &ticket ) { MqlTradeRequest request = {0}; MqlTradeResult result = {0}; request.action = TRADE_ACTION_REMOVE; request.order = ticket; if ( OrderSend( request, result ) ) { if ( result.retcode == TRADE_RETCODE_PLACED ) { ticket = 0; SetTransCount( true ); } } else { Print( "Ордер не удалён. Билет = ", ticket ); } } //+------------------------------------------------------------------+ //| Set order function | //+------------------------------------------------------------------+ void SetOrder( ulong &ticket, const double price, const bool buy_sell ) { ticket = 0; MqlTradeRequest request = {0}; MqlTradeResult result = {0}; //--- Fill structure request.action = TRADE_ACTION_PENDING; request.magic = 987654321; request.symbol = _Symbol; request.volume = 1; request.price = price; if ( buy_sell ) { request.type = ORDER_TYPE_BUY_LIMIT; } else { request.type = ORDER_TYPE_SELL_LIMIT; } request.comment = "Отложенный ордер..."; request.type_filling = ORDER_FILLING_RETURN; request.type_time = ORDER_TIME_DAY; //--- Send order if ( OrderSend( request, result ) ) { if ( result.retcode == TRADE_RETCODE_PLACED ) { ticket = result.order; SetTransCount( true ); } } else { Print( "Ордер не установлен! ", _Symbol, ", Цена = ", price, "; Код возврата = ", result.retcode ); } } //+------------------------------------------------------------------+ // Expert Check orders timer function | //+------------------------------------------------------------------+ bool CheckOrdersTimer( const uint start_value, const uint per_value ) { uint end_value = GetTickCount(); if ( end_value < start_value ) { if ( ( start_value - end_value ) >= per_value ) return( true ); } else { if ( ( end_value - start_value ) >= per_value ) return( true ); } return( false ); } //+------------------------------------------------------------------+ //| BookEvent function | //+------------------------------------------------------------------+ void OnBookEvent(const string &symbol) { if ( symbol == _Symbol ) { double trc_value = GlobalVariableGet( "trans_count" ); //--- if ( long( trc_value ) < 2000 ) { uint st_val = GetTickCount(); int tick_cnt = 1; sell_price = SymbolInfoDouble( _Symbol, SYMBOL_SESSION_PRICE_LIMIT_MAX ); buy_price = SymbolInfoDouble( _Symbol, SYMBOL_SESSION_PRICE_LIMIT_MIN ); //--- while ( !CheckOrdersTimer( st_val, 2000 ) ) //Используем вместо sleep 2 сек { tick_cnt--; tick_cnt++; } //--- if ( ( sell_ticket > 0 ) && ( OrderSelect( sell_ticket ) ) ) { RemoveOrder( sell_ticket ); } else { SetOrder( sell_ticket, sell_price, false); } //--- if ( ( buy_ticket > 0 ) && ( OrderSelect( buy_ticket ) ) ) { RemoveOrder( buy_ticket ); } else { SetOrder( buy_ticket, buy_price, true ); } } else { if ( ( sell_ticket > 0 ) && ( OrderSelect( sell_ticket ) ) ) { RemoveOrder( sell_ticket ); } if ( ( buy_ticket > 0 ) && ( OrderSelect( buy_ticket ) ) ) { RemoveOrder( buy_ticket ); } ExpertRemove(); } } }
Михаил:
好的,我从明天中午开始在终点站,晚上会附上文件。
今天清晨缝制的,还没有测试 (最好先在演示上测试一下)。
Roman Shiredchenko:
该演示应该在BCS的哪种仪器上测试?
我有一个真正的--没有填满的DEP。 我正在考虑在哪里填...
堡垒--从BCS进入的通道是真实开放的。
forex-bcs.ru上有一个MT 5演示。
有仪器。
日安!
在任何仪器上FORTS(例如)Si-9.15
Михаил:
下午好!
在任何FORTS仪器上(如)Si-9.15
日U5将在今年9月适用?
我在看时间。胜过Otkritie或BCS的时钟......。我是说交易时间...
坎普一直在工作...
浇灌了前期的图片。
下午好!
寻找在FORTS上用MT5机器人交易的人,而不是在公开场合。
我在寻找一个使用MT5机器人在FORTS上交易的人,而不是一个开放者。
如果你有一个严重的问题需要解决,请让我知道。
https://www.mql5.com/ru/forum/38456