Developing an EA that wants to use values that are created by another indicator how should I proceed.

 
I am starting to work on an EA, which wants to use values that are identified with an Indicator. I have a good idea of how the logic will work to trade but I am unsure of what I should do for the indicator. Should I re implement the indicator to generate the values in my EA (this is not what I want to do ideally the indicator is over 2000 lines). Or is there another method that is commonly used to do this.
 
Ayivi Svenn Auguste Emmanuel O Mivedor:
I am starting to work on an EA, which wants to use values that are identified with an Indicator. I have a good idea of how the logic will work to trade but I am unsure of what I should do for the indicator. Should I re implement the indicator to generate the values in my EA (this is not what I want to do ideally the indicator is over 2000 lines). Or is there another method that is commonly used to do this.

Your indicator size is impressive, hope it doesn't redraw.

In regards to EA, step-1 put indicator signals into buffers.

 
Oleksandr Medviediev #:

Your indicator size is impressive, hope it doesn't redraw.

In regards to EA, step-1 put indicator signals into buffers.

So the indicator does indeed redraw every tick. And Infact for my strategy the indicator is called twice once to be deployed on the intraday time and once to be deployed on the weekly time frame you refer to indicator signals are you referring to the price levels which it would generate 3( lines about) for each time frame yes?
 
Ayivi Svenn Auguste Emmanuel O Mivedor: Should I re implement 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 EA/indicator (using iCustom) and do what you want with it.
          (MT4) Detailed explanation of iCustom - MQL4 programming forum (2017)

 

Hi

If your indicator is coded properly and return values as buffers for candles – you can easily get the values using iCustom function, just like you use normal indicators from the platform. But if the indicator redraws it might be difficult to get the good results in the EA. Remember that when EA call the indicator, it force whole calculation of the values – from this very moment, but while the indicator is on the chart the calculations might follow their old course and do not recalculate at the same moment as used in the EA – which might end up in different signals within the EA. Be careful while using such indicators.

Best Regards