MACD divergence indicator with histogram

Forums ProRealTime English forum ProBuilder support MACD divergence indicator with histogram

Viewing 2 posts - 1 through 2 (of 2 total)
  • #149838

    Hello,

    Sorry for this basic question but I’m switching from manual to automatic trading recently.

    When I trade manually, I use for one of my strategies a divergence indicator on RSI (with a support or a resistance) and a MACD zero lag as a trigger (using the histogram to take the reversal).

    I try to code an indicator that combines these 2 functions.

    For this I used the MACD divergence indicator from Jose7674 (https://www.prorealcode.com/prorealtime-indicators/macd-divergences-on-price-and-indicator/).

    On line 11, I modified the variables of the Exponential Average (to make it a version close to zero lag), then I added directly on the graph of the indicator an exponential AVerage [5].

    I tried different codes to add a histogram as on the zero lag but I have the impression that it is not possible to return the discrepancies and a histogram.

    Note that the histogram should not indicate when there is a discrepancy, but when the MACD is higher than the EMA5 I added (as the MACD zero lag on the graph)
    Does anyone have the solution?

    #154939

    The standard histogram is:

    which is missing in your code, but you can easily add it at line 12, then return it at line 59.

     

Viewing 2 posts - 1 through 2 (of 2 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login