Experiments with MetaTrader 5 at Discovery - page 74

 
Dmitriy Skub:

For someone who collects - available.

There are big problems with the big minute story in Quicksilver)) And this is not hyperbole))

It turns out to be a crutch and the terminal must be constantly running. Reminds me of another crutch - how I once took the rishka story from finam and put it in place of the nickname in 4 to test manual strategy ))


There are problems with the minutes. The full history of futures in Quicksilver is only available from the hours. I thought that in MT everything will be all right, and from the endless search of errors with nil in LUA my eyes are already full, but it turns out that it is not without problems here as well.

 
SeriousRacoon:
It turns out to be a crutch and the terminal must be constantly running. Reminds me of another crutch - how I once took the rishka story from finam and put it in place of the nickname in 4 to test manual strategy ))


There are problems with the minutes. The full history of futures in Quicksilver is only available from the minutes. I thought it would be OK in MT, and the endless search for nil errors in LUA makes my eyes water, but it's not without problems, either.

It's just to make life easier. "If you want it done well, do it yourself")

 
Dmitriy Skub:

It's to make life worth living. "If you want it done well, do it yourself")

+++

We should do "SamTerminal" )))

Shall we do "SamTerminal"?

 
Sergey Chalyshev:

+++

We should do "SamTerminal" )))

Shall we do "SamTerminal"?

You won't believe it - it's been three years since I did it))
 
Dmitriy Skub:
Can you believe it - it's been three years since I did it)))

Cool!!!

I've only got scattered pieces, can't bring myself to put it all together ))

p.s. could we have a look at your terminal in general terms, very interesting
 
Sergey Chalyshev:

Cool!!!

I've only got scattered pieces, can't bring myself to put it all together ))

p.s. Could i have a look at your terminal in general, very interesting
I have a good feeling about it. There are no indicators (the usual ones).
 

Got a message from user that on futures glue (provided by broker) in tester the code below cannot delete orders - gets Invalid request error.

void CloseAllOrders()
{
  int n = OrdersTotal();
  for(int i = n - 1; i >= 0; i--)
  {
    ulong t = OrderGetTicket(i);
    if(t > 0)
    {
      _OrderDelete(t);
    }
  }
}

bool _OrderDelete(long ticket)
{
  MqlTradeRequest request = {0};
  MqlTradeResult  result;

  if(!OrderSelect(ticket)) return(false);
  
  request.action = TRADE_ACTION_REMOVE;
  request.order  = ticket;
  
  return OrderSend(request, result);
}

Any idea what could be the reason?

 
Stanislav Korotky:

Got a message from user that on futures glue (provided by broker) in tester the code below cannot delete orders - gets Invalid request error.

Any idea what could be the reason?

The code is correct, only I am still doing

MqlTradeResult  result  = {0};

Added

Also, the order ticket is of type ulong

bool _OrderDelete(long ticket)
Документация по MQL5: Основы языка / Типы данных / Целые типы / Типы char, short, int и long
Документация по MQL5: Основы языка / Типы данных / Целые типы / Типы char, short, int и long
  • www.mql5.com
Целый тип char занимает в памяти 1 байт (8 бит) и позволяет выразить в двоичной системе счисления 2^8 значений=256. Тип char может содержать как положительные, так и отрицательные значения. Диапазон изменения значений составляет от -128 до 127. uchar # Целый тип uchar также занимает в памяти 1 байт, как и тип char, но в отличие от него, uchar...
 

Good afternoon. Can you advise. After a long break I tried again to use glue testing on Si splice futures. But now the trades are executed, but the profit is not counted. I am testing on Si-12.19 futures and everything is OK. Any tips?

.

 
Zmey56:

Good afternoon. Can you advise. After a long break again tried to use glue testing on Si splice futures. But now the trades are executed, but the profit is not counted. I am testing on Si-12.19 futures and everything is OK. Any tips?

.

Maybe you are looking in the wrong place?