Errors, bugs, questions - page 1059

 

Explain why when declaring an instance of CCanvas class globally, the compiler swears - unresolved static variable 'CCanvas::m_default_colors'.

If declared locally in any function, all is well.

#include <Canvas\Canvas.mqh>
//CCanvas canvas; если объявлять на глобальном уровне то - unresolved static variable 'CCanvas::m_default_colors'
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   CCanvas canvas; // тут компилируется
  }
//+------------------------------------------------------------------+

The latest build of the terminal is 842.


 
kPVT:

Explain why when declaring an instance of CCanvas class globally, the compiler swears - unresolved static variable 'CCanvas::m_default_colors'.

If declared locally in any function, all is well.

The latest build of the terminal is 842.


The requirement to place static class members has changed.
This standard library error was fixed.
Документация по MQL5: Стандартная библиотека
Документация по MQL5: Стандартная библиотека
  • www.mql5.com
Стандартная библиотека - Документация по MQL5
Files:
Canvas.mqh  83 kb
 

Good afternoon,

I am usingNormalizeDouble to round the lot.

However, not all figures are rounded to two digits after the decimal point.

What is the problem?

NormalizeDouble(0.07000000000000001,2); //does the same thing0.07000000000000001 instead of the expected 0.07

thanks in advance.

 
ArtiFex:

Good afternoon,

I am usingNormalizeDouble to round the lot.

However, not all figures are rounded to two digits after the decimal point.

What is the problem?

NormalizeDouble(0.07000000000000001,2); //does the same thing0.07000000000000001 instead of the expected 0.07

thanks in advance.

DoubleToString()
 

Can't run mt5 in /portable mode on Win2008 server x64 R2

the log appears

DO      2       14:25:17        Accounts        accounts base corrupted, file H:\MT5_Nord_0\config\accounts.dat deleted
EH      0       14:25:17        Terminal        stopped
IO      2       14:25:32        Accounts        accounts base corrupted, file H:\MT5_Nord_0\config\accounts.dat deleted
HH      0       14:25:32        Terminal        stopped
OO      2       14:26:08        Accounts        accounts base corrupted, file H:\MT5_Nord_0\config\accounts.dat deleted
QH      0       14:26:09        Terminal        stopped
RO      2       14:28:27        Accounts        accounts base corrupted, file H:\MT5_Nord_0\config\accounts.dat deleted
FH      0       14:28:28        Terminal        stopped
QO      2       14:39:26        Accounts        accounts base corrupted, file H:\MT5_Nord_0\config\accounts.dat deleted

File on specified path helped delete file manually

doesn't say any more and only

OH      0       14:39:27        Terminal        stopped
ML      0       14:40:58        Terminal        stopped
EP      0       14:41:37        Terminal        stopped
CD      0       14:42:36        Terminal        stopped
KH      0       14:42:58        Terminal        stopped
NL      0       14:46:39        Terminal        stopped
HP      0       14:47:14        Terminal        stopped
LD      0       14:49:07        Terminal        stopped

got it from ....Roaming....

put it on the specified file - the trick didn't work

remove /portable from shortcut and terminal will run

 
Portable does not guarantee a local launch, it just means "spit it all out and try running locally, maybe you'll get lucky".
 
Can you suggest a software, online resource or MQL5 script for viewing markets on timeframes over MN. Need an analogy to MT5: Japanese candlesticks and the ability to adjust bar thickness.
 
2013.09.07 02:39:36 iTester-SL (GBPUSD,M1) 1 object of type CTestStat left
2013.09.07 02:39:36 iTester-SL (GBPUSD,M1) 1 undeleted objects left

Memory leak // Or compiler glitch.

The object has been declared as a static global variable. (!) That is, it is not dynamic at all.

The problem occurred after the part of the code which uses this variable was moved to an .mqh file and declared in this file as extern (no leakage was detected before):

extern CTestStat      Stat;

The program works fine.

// I avoided the problem by declaring the object dynamic. Now I create it in OnInit(), delete it in OnDeinit(). Leakage (leakage messages) stopped.

 
ARTIFEX:

Good afternoon,

I am using for NormalizeDouble lots.

However, not all numbers are rounded to two decimal places.

What is the problem? / Solution?

NormalizeDouble (0.07000000000000001,2) / / still outputs +0.07000000000000001 instead of the expected 0.07

Thanks in advance.

It comes from a floating number representation.
Число с плавающей запятой — Википедия
  • ru.wikipedia.org
Число с плавающей запятой (или число с плавающей точкой) — форма представления действительных чисел, в которой число хранится в форме мантиссы и показателя степени. При этом число с плавающей запятой имеет фиксированную относительную точность и изменяющуюся абсолютную. Используемое наиболее часто представление утверждено в стандарте IEEE 754...
 
x100intraday:
Can you suggest a software, online resource or MQL5 script for viewing markets on timeframes over MN. Need an analogy to MT5: Japanese candlesticks and the ability to adjust bar thickness.
You see. The lack of higher timeframes in my mind involuntarily equates to a suspicious"the developers are not telling me something... "Isn't it like that for someone else?
Reason: