Errors, bugs, questions - page 675

 

Can you give me a hint? Is it impossible to modify a pending order by volume? Do we have to delete the old order and set a new one?

The standard CTrade class does not allow modification of a pending order by volume, or maybe I am mistaken.

Взгляни на рынок через готовые классы
Взгляни на рынок через готовые классы
  • 2010.10.26
  • Dmitriy Skub
  • www.mql5.com
Не секрет, что большую часть информации об окружающем мире человек получает при помощи зрения. Справедливо это и в такой области как трейдинг. Новая платформа MetaTrader 5 и язык MQL5 открывают новые возможности для представления визуальной информации трейдеру. В данной статье предлагается универсальная и расширяемая система классов, которая берет на себя всю черновую работу по организации вывода произвольной текстовой информации.
 
ivandurak:

Can you give me a hint? Is it impossible to modify a pending order by volume? Do we have to delete the old order and set a new one?

The standard CTrade class does not allow modification of a pending order by volume, or maybe I am mistaken.

You must not. You should delete the old order and set a new one.
 

CLSetKernelArg

Sets the parameter for the OpenCL function.

CLSetKernelArg(
int kernel //handle to OpenCL program kernel
uint arg_index // OpenCL function argument number
void arg_value // source code value of the function argument
);

Parameters

kernel

[in] The handle to the OpenCL program kernel.

arg_index

[in] Function argument number, numbering starts with zero.

arg_value

[in] Value of the function argument.

Документация по MQL5: Основы языка / Функции / Вызов функции
Документация по MQL5: Основы языка / Функции / Вызов функции
  • www.mql5.com
Основы языка / Функции / Вызов функции - Документация по MQL5
 

How do I work correctly across multiple currencies?

I wrote the following test code:

#include <Trade\SymbolInfo.mqh>
CSymbolInfo       m_sym0;
CSymbolInfo       m_sym1;
CSymbolInfo       m_sym2;

int OnInit()
{
   m_sym0.Name("EURUSD");
   m_sym1.Name("EURAUD");
   m_sym2.Name("AUDUSD");
   return(0);
}

void OnTick()
{
   m_sym0.RefreshRates();
}

Running a test on EURUSD M1 all ticks

and I get a drop of 7-8 march 2011

in the log:

PS 3 MemoryException 17:24:34 3623813120 bytes not available
OK 3 Tester 17:24:37 stopped on 15% of testing interval

 
What about the problem with the inability to operate the "Reply" button on the forum? Are they going to fix it? Some sort of silence from support. At least a reassurance like "doing/not doing".
 
abolk:
What about the problem with the inability to operate the "Reply" button on the forum? Are they going to fix it? Some sort of silence from support. At least they were reassuring like "doing/not doing".
Problem has been referred to servicedesk. Appropriate people are already dealing with it.
 

ilunga2012.03.21 14:272012.03.21 14:27:17

How do I work correctly across multiple currencies?

One way to answer this question is to search for articles on the subject. There is hardly a universal way to handle multiple currencies - everyone chooses/conceives for themselves.

What is unclear in your code is this:

#include <Trade\SymbolInfo.mqh>
CSymbolInfo       m_sym0;

int OnInit()
{
   m_sym0.Name("EURUSD");
   return(0);
}

void OnTick()
{
   m_sym0.RefreshRates();
}

Why should I hang the program on EURUSD, get a tick for EURUSD and then ask for RefreshRates() for EURUSD?

 
Yedelkin:

Why hang the program on EURUSD, get a tick on EURUSD and then ask for RefreshRates() on EURUSD?

It's an artist's whim. :)

That's not the problem after all. Probably, something in the standard library is rotten in the Service Desk.

Документация по MQL5: Стандартная библиотека
Документация по MQL5: Стандартная библиотека
  • www.mql5.com
Стандартная библиотека - Документация по MQL5
 

 MetaDriver

An artist's whim. What's pathetic? :)

Of course it's pathetic. Pity the tester :)

Of course, I can't even say why, so I'm at least talking about the obvious "artist's caprice" in relation to the easel/tester :)

 

Can I ask you a question?

In the indicator.

int OnInit()
  {
   bool err=трали_вали_для_индикатора();
   Alert("init");
   if(err)
      return(-1);
   else
      return(0);
  }

if we return -1"non-zero return code means failed initialization and generates a Deinit event with theREASON_INITFAILEDdeinitialization reason code "

maybe we should try to reinitialize after deinitialization?

It appears to be a deadlock and we have to make our own init function called OnCalculate.

Was it supposed to be like this? (for what purpose).

Reason: