FORTS looking for MT5 trader

 

Good afternoon!

Looking for someone who trades on FORTS with MT5 robot NOT in the Open.

I'm looking for someone who trades on FORTS using an MT5 robot, not an Opener.

Please let me know if you have a serious problem to solve.

https://www.mql5.com/ru/forum/38456

ФОРТС. Вопросы по исполнению
ФОРТС. Вопросы по исполнению
  • www.mql5.com
С большими проблемами удалось это сделать (начальник отдела по работе с профессиональными клиентами ДЦ Открытие Евгений Сергеевич,. - - Категория: автоматические торговые системы
 
Is everyone trading at the Open House?
 
Михаил:
Is everyone trading at the Open?
It could also be that they don't trade at all.
 
I have an account at BCS, but have not traded robots there yet. I can run a spreader to spam the limits to measure the execution time (if I understand correctly what you need).
 
Adept:
I have an account at BCS, but have not traded robots there yet. I can run a spreader to spam the limits to measure the execution time (if I understand correctly what you need).

Good afternoon!

Of course you got it right.

You just need to place and delete pending orders, but only for a long time (preferably the whole day) and very preferably for more than one symbol.

And then attach the log file here.

Many thanks in advance!

Don't forget that for free, you can do 2000 transactions.

P/S As I recall, the spreader puts orders very close to the market.

You have to put orders at the MAX and MIN price so they don't trigger.

If you don't have such an EA, I'll write a quick one.

 

Stitched early this morning, haven't tested it (better to test it on a demo first)

//+------------------------------------------------------------------+
//|                                                     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();
    }  
  } 
}
 
Михаил:

Stitched early this morning, haven't tested it (better to test it on a demo first)

Ok, I will be at the terminal from midday tomorrow and will attach the file in the evening.
 
Adept:
Ok, tomorrow I will be at the terminal in the middle of the day and I will attach the file in the evening.

Checked it on the demo - it works correctly!

Tweaked the Expert Advisor a bit (see attachment)

Files:
BKS_Test.mq5  7 kb
 
Михаил:

Checked it on the demo - it works correctly!

Tweaked the Expert Advisor a little (see attachment)

On what instrument from BCS should I test the demo?

I have a demo on the real - not filled in. I am thinking where to fill it...

Forts - access from BCS is open on the real.

There is a demo of MT 5 on forex-bcs.ru.

There are instruments:


 
Roman Shiredchenko:

On which instrument from BCS should the demo be tested?

I have on a real - not filled up DEP. I am thinking where to fill...

Forts - access from BCS is open on the real.

There is an MT 5 demo on forex-bcs.ru.

There are instruments:

Good day!

On any instrument FORTS (eg) Si-9.15

 
Михаил:

Good afternoon!

On any FORTS instrument (e.g.) Si-9.15

Ri U5 will this September fit?

I was looking at the time. Beats the clock from either Otkritie or BCS... I mean trading time...

Kamp works all the time...

Poured the picture in the pre-post.

Reason: