Errors, bugs, questions - page 398

 

In several recent builds (including 458), two tester problems have been consistently observed on one of the two machines:

1) Agent startup error:

EM 0 Core 1 11:44:11 agent process started
QN 0 Core 1 11:44:11 connecting to 127.0.0.1:3000
KI 0 Core 1 11:44:15 connected
HO 2 Core 1 11:44:17 tester agent synchronization error
GM 2 Core 1 11:44:17 disconnected
LK 0 Core 1 11:44:17 connection closed

CQ 0 Tester 11:44:14 MetaTester 5 build 450 (16 May 2011)
MP 0 Server 11:44:14:14 MetaTester 5 started on 127.0.0.1:3000
LI 0 Startup 11:44:14 initialization finished
MR 2 127.0.0.1 11:44:18 close socket
EI 0 127.0.0.1 11:44:18 login (build 450)
EJ 0 Tester 11:44:19 tester agent shutdown

2) The terminal is unresponsive (hourglass) for about 30 seconds when accessing the agents tab.

There is an assumption that the problems are related to the single core processor or the lack of remote (remote) agents.

 
stringo:
Actually the 458 build has already been released.

so yes... But the problem remains:

2011.05.27 19:19:57 Core 2 slow agent failed
2011.05.27 19:19:57 Core 2 connection closed
2011.05.27 19:19:57 Core 2 too slow agent. busy time is 3703 ms. avg time is 915 ms
2011.05.27 19:19:55 Core 1 slow agent failed
2011.05.27 19:19:55 Core 1 connection closed
2011.05.27 19:19:55 Core 2 common synchronization completed
2011.05.27 19:19:54 Core 1 too slow agent. busy time is 3672 ms. avg time is 915 ms
2011.05.27 19:19:53 iRU1 slow agent failed
2011.05.27 19:19:53 iRU1 connection closed
2011.05.27 19:19:53 Core 2 authorized (agent build 458)
2011.05.27 19:19:53 Core 2 connected
2011.05.27 19:19:53 iRU1 too slow agent. busy time is 3672 ms. avg time is 915 ms

 
MONTEGRO:

so yes... But the problem remains:

Let's keep thinking.
 

Please clarify the following nuances:

1. checking/processing algorithm for SL/TP when sending an additional transaction. Clarification by example.

Note: all trade requests have the ORDER_FILLING_AON parameter; there is already a long position.

Scenario #1. I want to buy more (of course, for the same symbol). I send a trade with additional volume and adjusted SL/TP. If the request is executed successfully, the result will be: additional lot + updated SL/TP?

Scenario #2. I want to sell. I submit a trade with a smaller lot without specifying SL/TP (SL/TP = 0). The remaining position will have its lot reduced + SL/TP removed?

Scenario #3. Same as scenario #2, only trying to set SL/TP limits (knowingly impossible for a long position). Result?

2. Algorithm to check the volume of a trade. clarify it with an example.

Will there be any changes in the "minimal lot/minimal lot step" combination?

Notes: All trade requests have the ORDER_FILLING_CANCEL orORDER_FILLING_RETURN parameter; there is already one long position of 1.0; min.lot = 0.1; min.step = 0.01;

Scenario 1. I am trying to exit the market (close an existing position with a reverse trade of the same size). The market is a news one, so I try to withdraw at least a little bit (ORDER_FILLING_CANCEL or ORDER_FILLING_RETURN), as the entire amount has requotes. The deal is partially at 0.99 lots. Accordingly, to close the position completely, I need to send a deal with 0.01 lot, while I cannot - the min.lot is 0.1. I.e., should I first add 0.09 lot to get 0.1 and then try to close it (already with ORDER_FILLING_AON)?

Scenario #2. When a trade has been partially closed and the remaining position volume is less than the minimum step (partial completion at 0.999 lot, and 0.001 lot remains "hanging"). Will there be such a situation?

P.S. Ideally, I would like to see some unified order setting logic that would "close" all theoretically possible cases. I couldn't find it in the documentation, maybe I missed it...

Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров - Документация по MQL5
 
uncleVic:

There is no error in the library. There are two subtleties of working with indicator data using the class (which may not be fully described in the help).

1. In order to make indicator data available through the class, the class should copy this data from the indicator. To do it, call the Refresh(int) method if you have a slightest suspicion that the data has changed. In your case:

2. In order to make indicator data available through the class at a sufficient "depth", you need to set the buffers sizes (by default the buffers sizes are 256). To do this, after creating the object, call BufferResize(int) method. In your case:

Sorry if it's confusing. I'll answer additional questions.

Can you give me at least a simple code of indicator using standard library, because of lack of documentation and examples I can't understand how it works. For example it draws green arrows under each bar when tenkan sen>kijun sen and are above the cloud and red when tenkan sen<kijun sen and are below the cloud.
Как использовать торговые классы Стандартной библиотеки при написании советника
Как использовать торговые классы Стандартной библиотеки при написании советника
  • 2010.11.10
  • Samuel
  • www.mql5.com
В статье рассказывается о том, как использовать основной функционал торговых классов Стандартной библиотеки при написании советников, в которых применяется открытие, закрытие и модификация позиции, проверка свободной маржи перед размещением торговых ордеров, размещение и удаление отложенных ордеров. Показано, как использовать торговые классы для получения свойств ордеров и сделок.
 

Flexibility of interface settings - there is a suggestion to make mt5 more flexible for the user, in terms of settings for displaying symbol names, more specifically - the ability to rename any i.e. not - not gbpusd - but ... - For example - not gbpusd but ... pound," as well as dividing bars such as - currency and down arrow, metals, stocks, what would not have been all in one pile, in the bar-dividing can even add mini icons, such as currency, the sign of a quid or a small green paper, metals - well gold small bars, etc. Approx. such flexibility settings colours, slates and panes available in the platform "Pro Trader", I hope not to sound like advertising, because yours at the text of course easier and better... :)
It would also be nice if you could change the background, under the symbol in the list of symbols, as well as the colour shifft, for example a major highlight a black background and white font, medium, blue and white and totally unimportant, as there are black on white ...

 
Graff:
Can you give me at least the simplest code of indicator using standard library, because of the lack of documentation and examples I can't understand how it works. For example it draws green arrows under each bar when tenkan sen>kijun sen and are above the cloud and red when tenkan sen<kijun sen and are below the cloud.
Attach your "fish" and, briefly, wishes. If possible (I can't promise quickly) I'll take a look.
 

papaklass:

Algorithm 2:

1. close positions in multiples of the minimum allowed volume. Your example of 0.99 lots is not possible, as the minimum lot is 0.1 lot. Other market participants set their orders as multiples of 0.1 lot. So your example is not possible.

2. see point 1.

So you want to say that if after the order execution the position volume becomes less than the minimum, then this order will be rejected.

On MQ servers, the step=minimum lot=0.01. Are there other examples where the step<minimum lot? To check the terminal's behavior.

You cannot expect any answer from the developers.

Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров - Документация по MQL5
 
Graff:
Can you give me at least the simplest code of indicator using standard library, because of the lack of documentation and examples I can't understand how it works. For example, it draws green arrows under each bar when tenkan sen>kijun sen and are above the cloud and red when tenkan sen<kijun sen and are below the cloud.

this example of working with bibla - just build the tenkan line
From here it will be easier for you to add 4 more buffers by analogy and analyse them (for the arrows).

Note: there are at least two other ways to take indicator buffer values besides the one shown above. The one shown is not the only one possible

#property indicator_chart_window
#property indicator_buffers  1
#property indicator_plots    1
#property indicator_color1   clrRed
#property indicator_type1    DRAW_LINE

#include <Indicators\Trend.mqh>  // подключили библу

input int tenkan=9;
input int kijun=26;
input int senkou=52;

CiIchimoku ichi; // объект индюка
int h; // его хендл

double Tenkan[]; // буфер для тенкана
//------------------------------------------------------------------
int OnInit()
{
  SetIndexBuffer(0, Tenkan, INDICATOR_DATA);
  ArraySetAsSeries(Tenkan, true);

  ichi.Create(Symbol(), Period(), tenkan, kijun, senkou); // создали буфера
  h=ichi.Handle(); // получили хендл
  return(0);
}
//------------------------------------------------------------------
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
{
  ichi.Refresh(0); // обновили индюк

  if(BarsCalculated(h)<rates_total) return(0); // если расчет не нужен
        
  int to_copy; // определяем число баров для копирования
  if(prev_calculated>rates_total || prev_calculated<=0) to_copy=rates_total; 
  else { to_copy=rates_total-prev_calculated; to_copy++; }

  // Номера буферов: 0 - TENKANSEN_LINE, 1 - KIJUNSEN_LINE, 2 - SENKOUSPANA_LINE, 3 - SENKOUSPANB_LINE, 4 - CHINKOUSPAN_LINE.
  if (CopyBuffer(h,0, 0,to_copy, Tenkan)<=0) { Print("ошибка"); return(0); }

  return(rates_total);
}
 
uncleVic:

there is a flaw in the classes and help - the Refresh function flags are not described
Reason: