Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 777

 

I call the same indicator via iCustom from the indicator, it works fine without parameters

buf[i] = iCustom(NULL,timeFrame,IndicatorFileName,0,y);

But the terminal hangs completely with parameters,

buf[i] = iCustom(NULL,timeFrame,IndicatorFileName,Per,Pr,OP,0,y);

And in general, is it possible to call from the indicator itself?

 
ClanVi:

I call the same indicator via iCustom from the indicator, it works fine without parameters

But the terminal hangs completely with parameters,

And in general, is it possible to call the indicator itself?

You can, if it is planned in the indicator. Otherwise, an infinite loop will occur.

I have seen such indicators.

 
Vinin:

Yes, but with the parameters the terminal hangs up...

 
ClanVi:

I call the same indicator via iCustom from the indicator, it works fine without parameters

But the terminal hangs completely with parameters,

And in general, is it possible to call from the indicator itself?

And what is the practical sense in such recursion? Let's leave it, otherwise there will be a black hole and we'll all fail )))
 
ClanVi:

Of course it will. It is necessary to control the depth of calls. For example, at the first call one parameter is 5, at the call from the indicator it needs 4. And so on. When the indicator is called at 0, the indicator will not be called.

What for?

 
Vinin:

Of course it will. It is necessary to control the depth of calls. For example, at the first call one parameter is 5, at the call from the indicator it needs 4. And so on. When the indicator is called at 0, the indicator will not be called.

What for?

Parameters do not change, I just wonder why it happens)

 
ClanVi:

Do a simple factorial calculation with recursion and see what the maximum value you can get.

It's easier with the indicator. It requires much more resources.

 

Good afternoon.


Can you please tell me what to change in the indicator code from 5 digits to 4?


Thank you in advance

 
Ale-xander:

Good afternoon.


Could you please tell me what to change in the indicator code from 5 digits to 4?


Thank you in advance

code
 
Ale-xander:

Good afternoon.

Can you please tell me what to change in the indicator code from 5 digits to 4?

Thank you in advance

IndicatorDigits will help you. Just do not forget that if you put this indicator on Jap chart, you will need only 2 digits instead of 4. So, you will need to put the definition of the digits of the quotes.
Reason: