I'm puzzled - either my eyes are lying, or I'm missing something
Here's the formula of calculation (you don't have to go into everything, pay attention to print output conditions and calculation inside return() - code on yellow background)
ukrop1203: Hello, I get an error about unsuccessful objects after completing an ekspert test, and I create absolutely all of the objects in the stack, i.e. without new as far as I understand it. Please explain this question.
Miracles don't happen, if it says it's leaked, it means you've left it out somewhere in the pile and forgotten about it. Search for it. Alternatively, in the constructor insert
if (CheckPointer(&this)==POINTER_DYNAMIC) DebugBreak();
bool CloseByBu(OpenModel& open_model) {
bool closed_by_bu = False;
if (OrderSelect(open_model.bu_ticket, SELECT_BY_TICKET, MODE_TRADES) && OrderType() <= 1) {
closed_by_bu = OrderCloseBy(open_model.bu_ticket, open_model.ticket);
if (!closed_by_bu) {
PrintMessageInLog(StringFormat("DIDN'T CLOSE order by opposite order first ticket=%i, second ticket=%i, error=%i",
open_model.ticket, open_model.bu_ticket, GetLastError()));
PrintMessageInLog(StringFormat("First order selected=%s, order type=%i, order price=%f",
string(OrderSelect(open_model.ticket, SELECT_BY_TICKET, MODE_TRADES)), OrderType(), OrderOpenPrice()));
PrintMessageInLog(StringFormat("Second order selected=%s, order type=%i, order price=%f",
string(OrderSelect(open_model.bu_ticket, SELECT_BY_TICKET, MODE_TRADES)), OrderType(), OrderOpenPrice()));
}
}
return closed_by_bu;
}
2018.01.02 08:01:30 DIDN'T CLOSE order by opposite order first ticket=2, second ticket=3, error=3
2018.01.02 08:01:30 First order selected=true, order type=1, order price=1.351920
2018.01.02 08:01:30 Second order selected=true, order type=0, order price=1.351590
Why 2 overloaded functions of vertical line drawing are approved by the compiler (first function - colour selection, second - colour and window) and you can use both, but when I add third one, with colour, window and style selection - it swears and forces all functions to be of third type?
При создании графического объекта функцией ObjectCreate() необходимо указать тип создаваемого объекта, который может принимать одно из значений перечисления ENUM_OBJECT. Дальнейшие уточнения свойств созданного объекта возможно с помощью функций по работе с графическими объектами.
Why 2 overloaded functions of vertical line drawing are approved by the compiler (first function - colour selection, second - colour and window) and you can use both, but when I add third one, with colour, window and style selection - it swears and forces all functions to be of third type?
The default values negate the presence of the input parameter. Consider that it does not exist. And see if the compiler can select the correct function.
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.
Mashka's standard code
I'm not pasting all the code, since the next step is calculations, the question is related to initialization
How to make the"InpMAPeriod" value change when the timeframe changes.
For example: at M15 -"InpMAPeriod"
At M30 -"InpMAPeriod2".
I'm not a programmer, please help.
I'm puzzled - either my eyes are lying, or I'm missing something
Here's the formula of calculation (you don't have to go into everything, pay attention to print output conditions and calculation inside return() - code on yellow background)
... At this step, all values are correctly returned in the range of 1 to -1
But when these values are printed from the buffer - the range is broken (in the buffer the range is already 100 to -100)
Here is the cycle itself
Inside the retarder, there is no addition, only multiplication by 100
What's the problem?
I'm puzzled - either my eyes are lying or I'm missing something
What's the problem?
I didn't understand the code at all.
*100try changing to 100.0Not at all familiar with the code.
try replacing with 100.0Tried it, didn't work.
Hello, I get an error about unsuccessful objects after completing an ekspert test, and I create absolutely all of the objects in the stack, i.e. without new as far as I understand it. Please explain this question.
Attempt number 2, please answer the question.
Attempt number 2, please answer the question.
Miracles don't happen, if it says it's leaked, it means you've left it out somewhere in the pile and forgotten about it. Search for it. Alternatively, in the constructor insert
and underneath the debugger, catch a spot.
2018.01.02 08:01:30 DIDN'T CLOSE order by opposite order first ticket=2, second ticket=3, error=3
2018.01.02 08:01:30 First order selected=true, order type=1, order price=1.351920
2018.01.02 08:01:30 Second order selected=true, order type=0, order price=1.351590
Not closing two counter orders, please explain.
Why 2 overloaded functions of vertical line drawing are approved by the compiler (first function - colour selection, second - colour and window) and you can use both, but when I add third one, with colour, window and style selection - it swears and forces all functions to be of third type?
Why 2 overloaded functions of vertical line drawing are approved by the compiler (first function - colour selection, second - colour and window) and you can use both, but when I add third one, with colour, window and style selection - it swears and forces all functions to be of third type?
The default values negate the presence of the input parameter. Consider that it does not exist. And see if the compiler can select the correct function.
It does not close two counter orders, please explain.
In theory your code should work, I could be wrong, but not all brokers allow to do this, try Metakvotes-demo to check, it definitely worked there