В MQL5 существует несколько вариантов вызова индикаторов, и осуществляются они в основном при помощи функций IndicatorCreate() и iCustom(). Причем эти функции лишь возвращают хендл индикатора, и дальнейшая работа с индикаторами ведется именно через него. Так что же такое хендл? Как работать с функциями IndicatorCreate() и iCustom()? И как...
There is some trick to getting the value of an element from a higher class
Code:
An element of class B is inside class A. How can I get the value of a (from class A) inside of B?
class A;
class B
{
public:
int x;
int GetA(A &reference) { return reference.a;} };
//+------------------------------------------------------------------+class A
{
public:
int a;
B b; };
//+------------------------------------------------------------------+
A obj;
voidOnStart()
{
obj.a = 10;
int result = obj.b.GetA(obj);
printf("result = %d",result);
}
//+------------------------------------------------------------------+
2020.01.20 20:30:05.534 tst (EURUSD,H1) result = 10
Wrong. You pass a pointer to an object in a method. My point is this:
That is, you may take a pointer to B from A and work with it, and B has access to A
I've seen your code
But this isn't the first time the questioner "handles a fig leaf" in no uncertain terms - I already answered this question nearly on OOP once ))))
he basically just needed a description of class A forward, but he's the only one who knows)))
HH: I'm passing a reference to an object; you can do whatever you want by that reference, but there's no sense in general in such code. Usually, as you've written in your example, you use a class pointer to yourself and then it's convenient to use it all
I've written a simple free indicator, but I can't add a description. I fill it out according to all the requirements, press "save" - everything is OK, no errors. But after the page loads, there is no description...
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.
I still get non-normalized values after normalization - MQL5
Most unfavourable 1e-05, What to do?
DoubleToString(....) will help you.
There is some trick to getting the value of an element from a higher class
Code:
An element of class B is inside class A. How can I get the value of a (from class A) from within B?
Is there any trick to getting the value of an element from a higher class
Code:
An element of class B is inside class A. How can you get the value of a (from class A) while inside B?
Is there any trick to getting the value of an element from a higher class
Code:
An element of class B is inside class A. How can I get the value of a (from class A) from within B?
Please advise:
Can you tell me how to solve the problem withcalling the indicator on MT5 windows 10 X64, I am doing this way:
#resource "\\Indicators\\\MyIndicator.ex5"
handle=iCustom(NULL,0,"::Indicators\\\\MyIndicator");
It used to work without #resource, then it only started working with #resource, now nothing works, error 4804 is generated
I still get non-normalized values after normalization - MQL5
Most unfavourable 1e-05, What to do?
Try this:
There is some trick to getting the value of an element from a higher class
Code:
An element of class B is inside class A. How can I get the value of a (from class A) inside of B?
2020.01.20 20:30:05.534 tst (EURUSD,H1) result = 10
2020.01.20 20:30:05.534 tst (EURUSD,H1) result = 10
Wrong. You pass a pointer to an object in a method. My point is as follows:
That is, you can get a pointer to B from A and work with it, while B has access to AWrong. You pass a pointer to an object in a method. My point is this:
That is, you may take a pointer to B from A and work with it, and B has access to AI've seen your code
But this isn't the first time the questioner "handles a fig leaf" in no uncertain terms - I already answered this question nearly on OOP once ))))
he basically just needed a description of class A forward, but he's the only one who knows)))
HH: I'm passing a reference to an object; you can do whatever you want by that reference, but there's no sense in general in such code. Usually, as you've written in your example, you use a class pointer to yourself and then it's convenient to use it all