Custom indicator in subwindow, oscillator type. How to hide the default zero line ? Coloring the zero line from the GUI, to match the background colour does not work.
setting properties in the indicator, does not work
The numbers are different, but the difference is 17 decimal places, and Print handles only 15 decimal places, so from Print's point of view they are the same
The numbers are different, but the difference is the 17th decimal place, while Print handles only 15 digits, so from the Print point of view they are the same.
Only not Print, but conversion of double to string.
Noticed this. If the forward test data are repeated (the same), when viewing the Backtest for all three variants, only variant (10384.88) will be shown first.
The data for variants with results = 10435 or 10843 are unknown (everything in the reports for variant = 10384)??
Can you tell me how to copy data from pointers correctly?
You need to copy data from one object to another. Then delete the initial object. When you delete the original object, the data in the copy object becomes inaccessible.
#include <Arrays\ArrayObj.mqh>
CArrayObj ArrCur; // массив с объектами, каждый объект содержит структуру с полями ордеров и его id
CArrayObj ArrPrev; // массив с объектами, каждый объект содержит структуру с полями ордеров и его idclass CID : public CObject
{
public: int id;
};
voidOnStart()
{
// -----------------------------------------------------------------
CID* pCur = new CID; // создаем объект для текущих параметров
pCur.id = 25; // вносим текущие данные
ArrCur.Add(pCur); // помещаем в массив объектовCID* pPrev = ArrCur.At(0); // копируем данные??? Указатель???
ArrPrev.Add(pPrev); // помещаем в массив объектов
ArrCur.Clear(); // чистим текущий массив// -----------------------------------------------------------------// --- для вывода в журналint sizeCur = ArrCur.Total(); // размер = 0int sizePrev = ArrPrev.Total(); // размер = 1ENUM_POINTER_TYPE pTypeCur = CheckPointer(ArrCur.At(0)); // POINTER_INVALIDENUM_POINTER_TYPE pTypePrev = CheckPointer(ArrPrev.At(0)); // POINTER_INVALIDPrint(__FUNCTION__, " sizeCur=", sizeCur, " pTypeCur=", EnumToString(pTypeCur));
Print(__FUNCTION__, " sizePrev=", sizePrev, " pTypePrev=", EnumToString(pTypePrev));
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Where did the link to "All messages" in the profile go?
Thank you!
Forum on trading, automated trading systems and trading strategy testing
Not normalized prices in MT4
fxsaber, 2021.04.30 10:42
Two different numbers converted to string the same way. Is it a bug?
The situation is similar to this one.
Custom indicator in subwindow, oscillator type.

How to hide the default zero line ?
Coloring the zero line from the GUI, to match the background colour does not work.
setting properties in the indicator, does not work
The numbers are different, but the difference is 17 decimal places, and Print handles only 15 decimal places, so from Print's point of view they are the same
The numbers are different, but the difference is the 17th decimal place, while Print handles only 15 digits, so from the Print point of view they are the same.
Only not Print, but conversion of double to string.
Noticed this. If the forward test data are repeated (the same), when viewing the Backtest for all three variants, only variant (10384.88) will be shown first.
The data for variants with results = 10435 or 10843 are unknown (everything in the reports for variant = 10384)??
Can you tell me how to copy data from pointers correctly?
You need to copy data from one object to another. Then delete the initial object. When you delete the original object, the data in the copy object becomes inaccessible.