Errors, bugs, questions - page 943

 
When testing, MQL5 Cloud Network is not activated, no tick in the context menu "use /MQL5 Cloud Network", there is 1 credit on the balance. Yesterday everything was working.
Распределенные вычисления в сети MQL5 Cloud Network
Распределенные вычисления в сети MQL5 Cloud Network
  • cloud.mql5.com
Заработать деньги, продавая мощности своего компьютера для сети распределенных вычислений MQL5 Cloud Network
 
nasdaq:
When testing, MQL5 Cloud Network is not activated, no tick in the context menu "use /MQL5 Cloud Network", there is 1 credit on the balance. Yesterday everything was working.
Not enough credits.
 
nasdaq:
When testing, the MQL5 Cloud Network is not activated, the "use /MQL5 Cloud Network" context menu has no check mark and the balance is 1 credit. Yesterday everything was working.

What does it say in the logbook?

What is your balance?

 
alexvd:
There is a suspicion that the transfer from 4 may have been done without taking into account the features of 5. And CPU load and candlestick rendering is just a consequence of too heavy calculations or waiting cycles etc. in OnCalculate.

It worked fine with next build, seems that the problem was in MT5, and not in my indicators.

However, terminal.exe still starts to load CPU when price changes sharply

 
nasdaq:
When testing, MQL5 Cloud Network is not activated, no tick in the context menu "use /MQL5 Cloud Network", there is 1 credit on the balance. Yesterday everything was working.
Refill your account - you must have more than 1 credit to use cloud agents
 

There is a simple application consisting of an input field containing a price and a horizontal line:

class CMyApp : public CAppDialog {
private:
   CEdit             m_edit;
   CChartObjectHLine m_line;
...
};

It is supposed to do two things: 1) when a new price value is entered in the field, the line should shift by that price, 2) when the line is shifted or the line price is edited, the new price (lines) should be displayed in the input field. There is no problem with the first part. The question on the second: is it possible to use event map to catch price change event (or any other event of non-controlling object)? I thought that for this purpose I should use ON_EXTERNAL_EVENT(event,handler), but no matter how I turned around, it does not work. Consequently, here are a couple more questions:

  • what is ON_EXTERNAL_EVENT(event,handler) for, and is there some simple example of how to use it?
  • If you can't catch line events with a map, you need to check the line in OnChartEvent():
void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
{
//---
   app.ChartEvent(id, lparam, dparam, sparam);
   app.OnChangeLine(id, lparam, dparam, sparam);
}

Or is there any other solution?

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

Discovered a strange behaviour on the signal subscriber terminal.

1. When closing a position (whether using stops or handles) in the Subscriber terminal log appears:

2013.03.20 20:58:39 Signal '5002359': cannot copy deal #5652339 sell 0.60 CHFJPY at 101.448, probably position is already closed

However, the position is present and is not closed. After reloading the terem, this position will be closed normally. The situation is repeated almost constantly, especially if the position is corrected by a provider.

2. The problem with stops. An entry appears in the log of the subscriber terminal:

2013.03.21 07:05:54 Signal '5002359': synchronization is postponed, processing of trade actions disabled

2013.03.21 07:05:54 Signal '5002359': synchronization terminated, cannot correct position [sell 0.10 AUDCHFL 0.9813 sl: 0.9867 tp: 0.9766]

2013.03.21 07:05:54 Trades '5002359': failed modify sell 0.10 AUDCHFL sl: 0.9867, tp: 0.9766 -> sl: 0.9867, tp: 0.9766 [Invalid stops]

Stops are set correctly at the Provider, the distance from the position is correct (at this symbol the level of stops is 15 pips, very roughly the lower bound of SL is 0.9842). At the same time the stops themselves are set! The saddest thing is that synchronization stops(processing of trade actions disabled) for ALL symbols. Rebooting the terem does not help, I have to disable copying stops to continue synchronization.

/// Added: vendor was deliberately spreading stops to obscene distances - error persisted!

3. Subscriber has no reaction to vendor's stop changes (moves). None at all! Rebooting the terminal doesn't help.

------------------------

Subscriber has Windows Server 2003 R2 Standart Edition SP2.

Terminal version 778.

A copy went to servisdesk.

 
Rone:

Or is there any other solution?

When an object is changed, the CHARTEVENT_OBJECT_CHANGE event is received. The sparam parameter contains the name of the object. I.e. it should be written like this:

if(id==CHARTEVENT_OBJECT_CHANGE && sparam==m_line.Name())
  {
   m_edit.Text("значение которое нужно отобразить");
  }

Where you put it (in separate method or in handler body) is your decision.


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

Hello, everyone!

Guys who knows. I wrote an EA in mq5 (my first EA) and I am running it. I am trying to open orders (instant execution) but stop loss is not set (although it is in code). I didn't see any error in order execution, but I didn't see any stop loss. I have looked in the FAQ and tried different methods to set orders. I have also tried using the library connection. Everything opens without errors, but no stop loss.

I think it may be the mq5 itself. I am using Alpari. I have a test account. It would be a pity if I did not succeed.

Sincerely,

Sergey

 

Sergey5347:  Написал советник в mq5 (мой первый советник), запускаю его. Ордера (мгновенного исполнения) открываются, а стоп лоссы по факту не проставляются (хотя в коде есть). По отработке ордеров никаких ошибок нет, а стоп лоссов по факту нет. Я тогда залез в хелпы и попробовал разными способами задавать ордера. Пробовал и с подключением библиотеки. Все без ошибок открывается а стоп лоссов нет.

You need to check which execution mode the broker has. And see how trade requests differ between modes.
Документация по MQL5: Стандартные константы, перечисления и структуры / Структуры данных / Структура торгового запроса
Документация по MQL5: Стандартные константы, перечисления и структуры / Структуры данных / Структура торгового запроса
  • www.mql5.com
Стандартные константы, перечисления и структуры / Структуры данных / Структура торгового запроса - Документация по MQL5