No. In such constructions, the only solution is to convert the indicator into a class and add it to the Expert Advisor as an instance of the class, then you can build the sequence of calculations
The point is that the indicator itself is a separate class that works with any basic indicators of the same type. This is very bad, unless there is some tricky solution.
#define VALUE 10#define MACROS
#ifdef MACROS
// Нужно VALUE увеличить в два раза.#define TMP VALUE
#undef VALUE
#define VALUE (TMP*2) // Если заменить на (10*2) - компилируется!
#endif
intOnInit(void)
{
Print( "VALUE = ", VALUE ); //'VALUE' - undeclared identifierreturn(INIT_FAILED);
}
No. In such constructions, the only solution is to convert the indicator into a class and add it to the Expert Advisor as an instance of the class, then you can build the sequence of calculations
The point is that the indicator itself is a separate class that works with any basic indicators of the same type. This is very bad, unless there is some tricky solution.
I have a puzzle question.
Compare the two pictures and tell me what the trick is?
1. The Expert Advisor is running on the chart.
2. The second one is the same Expert Advisor. The chart after a single test.
Can you tell me if this is possible?
or
or
I don't have access to the original VALUE definition. Otherwise, of course, I would make the same option.
Can you tell me if this is possible?
For some reason it's not working:
For some reason it's not working:
It's probably the only way
Unfortunately, the challenge is not being met.
That's probably the only way.
So why isn't it working?
@Ilyas@Slava?