Please optimize this indicator

 

Hi there...

I want to optimize my custom indicator, any suggestion how to do it?

It's consist of 2 indicators: Envelopes and EMA, and some labels.


Thanks in advance

Files:
custindi.mq4  36 kb
 
Make an EA from your indicator. Then you can optimize the indicator. 
 

Indicators just indicate — there is no optimize. EAs trade, optimize that.

Andres Sigala: Make an EA from your indicator. Then you can optimize the indicator. 
Don't try to do that. There are no buffers, no IndicatorCounted() or prev_calculated. No way to know if older bars have changed or been added (history update.)
Just get the value(s) of the indicator(s) into the EA (using iCustom) and do what you want with it.
You should encapsulate your iCustom calls to make your code self-documenting.
          Detailed explanation of iCustom - MQL4 programming forum
 
William Roeder:

Indicators just indicate — there is no optimize. EAs trade, optimize that.

Don't try to do that. There are no buffers, no IndicatorCounted() or prev_calculated. No way to know if older bars have changed or been added (history update.)
Just get the value(s) of the indicator(s) into the EA (using iCustom) and do what you want with it.
You should encapsulate your iCustom calls to make your code self-documenting.
          Detailed explanation of iCustom - MQL4 programming forum

Thanks for reply... I'll study it first

Reason: