custom indicators using previous and first indicator data

 

Hello,

Is there an easy way to configure custom MT5 indicators so they can be applied on top of other indicators? (same as standards MT5 indicators using apply to " previous indicator's data" or "first indicator data" )?

 Br

Elie 

 
It is possible in some cases but I am sorry - in most of the cases - it should be programmed/coded especially for that (by coder). Because scales for some indicators are different ones (vertical scales).
 
lello1231:

Hello,

Is there an easy way to configure custom MT5 indicators so they can be applied on top of other indicators? (same as standards MT5 indicators using apply to " previous indicator's data" or "first indicator data" )?

 Br

Elie 

See this article https://www.mql5.com/en/articles/15
Applying One Indicator to Another
Applying One Indicator to Another
  • 2010.02.08
  • MetaQuotes Software Corp.
  • www.mql5.com
When writing an indicator that uses the short form of the OnCalculate() function call, you might miss the fact that an indicator can be calculated not only by price data, but also by data of some other indicator (no matter whether it is a built-in or custom one). Do you want to improve an indicator for its correct application to the other indicator's data? In this article we'll review all the steps required for such modification.
 
angevoyageur:
See this article https://www.mql5.com/en/articles/15
Thanks!
 

Hey Guys,

Ive got a question regarding applying indicators on other indicatos. I Wrote a simple indicator that calculates the slope of the input and displays it in a different chart window. It works when applied to the price. However i would like to apply it to a moving average (previous indicator) , which runs in the main chart window. is there a way to do this?   ( i can get it working in EA's by giving it the MA's handle in iCustom, but would like to also use it as a visual indicator on the chart)

Reason: