Use custom indicator to be a data source for another custom indicator?

 
Hello.
I am not a developer but do need  help and will highly appreciate somebody guiding me in a correct direction. 
I have two indicators installed(with source codes) and i want one indicator outputs to serve as inputs data for other. 
Both indicators are custom. Indicator that should provide data has two plotting buffers while the indicator that i want to calculate on
first indicators data has only one. 
If this should be a problem i can saftly delete unnecessary buffer from first one. 
My questions:
How this "data transfer" between two indicators can be done? 
Can icustom function be used? 
How? Different solution? 
P. S. I am learning to code so, at basic level, will try to understand whatever solution can somebody provide. 
Please be gentile. I  am awere of the  egsistance of Freelance service. Will try it as last resource. 
Just have an impression that solution may be simple enough to be able to apply it by myself. With a litle assistance. 
fourier_extrapolator_of price=data source
Hull average 2= data receiver
Thanks in advance. 

 

You can use iCustom() and CopyBuffer() to use the data from an indicator in another MQL5 program, be it another Indicator, EA, Script or Service.

For two indicators, you can also consider merging them into one to improve efficiency.

Documentation on MQL5: Technical Indicators / iCustom
Documentation on MQL5: Technical Indicators / iCustom
  • www.mql5.com
The function returns the handle of a specified custom indicator. Parameters symbol [in] The symbol name of the security, the data of which should...
 
Robert72: i want one indicator outputs to serve as inputs data for other. 
I don't know exactly what your indicators are, but just know that a chart window indicator can't be applied to the output values of a separate window indicator. For example, applying a chart window moving average to an oscillator is not possible. My simple solution is to simply edit the moving average indicator property into separate window in that moving average indicator source code.
 
@Ryan L Johnson #: I don't know exactly what your indicators are, but just know that a chart window indicator can't be applied to the output values of a separate window indicator. For example, applying a chart window moving average to an oscillator is not possible. My simple solution is to simply edit the moving average indicator property into separate window in that moving average indicator source code.

That is not what the OP is asking! It is not about applying the indicators on the chart, and in this case both indicators are "chart" indicators anyway.

It's about using the data programmatically in another indicator and the user wishes to apply a Hull average to the Fourier approximation of the price.

 
Ryan L Johnson #: For example, applying a chart window moving average to an oscillator is not possible.

Yes, it is possible for many of the internal indicators as well as custom indicators that make use of the "price" version of the OnCalculate() event handler.

Please note that this post is off-topic and not relevant to the OP's question.
 
Fernando Carreiro #:

Also, even if this was about presentation, you can still apply a "chart" indicator to a "subwindow" indicator if using the "price" version of the OnCalculate() event handler.

Whoa.😳

I honestly can't recall ever having a use for the price version of OnCalculate. Now I do. Thanks.

 

If you ask "how to" questions, you'll be directed off to the freelance section sooner or later. You should look in the indicator codebase for examples 

https://www.mql5.com/en/code/12648

iCustom is very easy to use

If you're learning programming, you might want to first learn:

  • Different types of variables (for decimal numbers, fixed integers, strings and so on)
  • How to compare values with conditions
  • How to create boolean flags and make use of them
  • Class variables vs. global variables  

The list goes on...it takes doing some work and learning, and if you're going to ask here what to do, it's not going to work out at all as people don't like to spoon feed

Fractal ZigZag
Fractal ZigZag
  • www.mql5.com
This indicator is MQL5 version of FractalZigZagNoRepaint, it displays swing highs and lows.
 
Ryan L Johnson #:
I don't know exactly what your indicators are, but just know that a chart window indicator can't be applied to the output values of a separate window indicator. For example, applying a chart window moving average to an oscillator is not possible. My simple solution is to simply edit the moving average indicator property into separate window in that moving average indicator source code.
I can easily change this indicator property so that they match. But what next?

 
Fernando Carreiro #:

That is not what the OP is asking! It is not about applying the indicators on the chart, and in this case both indicators are "chart" indicators anyway.

It's about using the data programmatically in another indicator and the user wishes to apply a Hull average to the Fourier approximation of the price.

Thank you Fernando. This is exactly what i try to do. Can you provide some further guidance please. Thanks. 
Suppose i manage to retrieve data from fourier indicator using iCustom. How can i supstitute price array input data in hull indicator with retreived data. Because this is essentially what need to be done. At least as i understand it. 
 
Fernando Carreiro #:

Yes, it is possible for many of the internal indicators as well as custom indicators that make use of the "price" version of the OnCalculate() event handler.

Please note that this post is off-topic and not relevant to the OP's question.
This "price" version is also so called "short 
version of OnCalculate" ? Correct? 
What can be done if this is not a case? I am quite sure my indicators both use the other detailed/long one.
 
Robert72 #: This "price" version is also so called "short version of OnCalculate" ? Correct? What can be done if this is not a case? I am quite sure my indicators both use the other detailed/long one. 

You don't have to use the "price"/"short" version. That was an answer for the points raised by @Ryan L Johnson

That is why I specifically stated ... "Please note that this post is off-topic and not relevant to the OP's question"

For your case, you can use either method, but since both indicators are already "detailed"/"long" version you can keep that way too.

There are multiples ways to solve it, and it really depends on your needs and coding ability. Personally I would merge the two and make it a single indicator, but do it in which ever way is easiest for you to understand.