Read custom indicators levels

 
Hi guys so I have created 2 indicators; 1 that draws levels, the 2nd combines MACD, MA and the levels, MA is based off MACDs data "Previous Indicator Data" but now how I can check if the values are above the levels.

For instance if you drag the rsi, then the moving average to the same window as rsi and on apply to choose Close price the values will be different how do you know the ma value has crossed rsi level
 
  1. Derrick Mutange I have created 2 indicators; 1 that draws levels, the 2nd combines MACD, MA and the levels, but now how I can check if the values are above the levels.

    You read the indicator's buffers using iCustom.

  2. Derrick Mutange: For instance if you drag the rsi, then the moving average to the same window as rsi and on apply to choose Close price the values will be different how do you know the ma value has crossed rsi level

    Irrelevant to your question.

 
William Roeder #:
  1. You read the indicator's buffers using iCustom.

  2. Irrelevant to your question.

William kindly don't reply to my questions cause you take everyone as pro...the major I am asking this is because the ma buffer will read current chart price where ma would be on yhe contrary to rsi my question is when to know the level has been crossed
 
Derrick Mutange #: s because the ma buffer will read current chart price

The MA buffer is the MA buffer. It doesn't read anything.

Derrick Mutange # my question is when to know the level has been crossed

You read what you want and Look for a cross.

double aPrev = …(i+1), aCurr = …(i),
       bPrev = …(i+1), bCurr = …(i);
bool   wasUp = aPrev > bPrev,
        isUp = aCurr > bCurr,
     isCross = isUp != wasUp;
 
Your topic has been moved to the section: Technical Indicators
MQL5 forum: Expert Advisors and Automated Trading
MQL5 forum: Expert Advisors and Automated Trading
  • www.mql5.com
How to create an Expert Advisor (a trading robot) for Forex trading
Reason: