Divergence Indicators - page 28

 

Hi Jetro,

Changing the variable names again...and removing the Objects and Comments...were very confusing to me and required more extra time and work to figure things out.

Bottom line for me...

I don't see any problems with the EA...or the indicator...

With the "{" change I suggested...placed after the if statement...I get all the past values I want...

See my screen shot below.

Hope this helps and good luck to you.

Take care,

Robert

 

Hi everyone!

I have 2 divergence indicators downloaded from our forum - Wpr_mtf_alerts+divergence and Momentum Divergence2_mtf+alerts.

Indicators show divergence they are one and the same principle. During the formation of the candle if the price goes in the direction of an estimated divergence, the arrow appears (for example, the candle is bullish at the moment), if the price has changed direction and the candle is bearish at the moment, the arrow disappears. So arrow can appear and disappear several times during the formation of the candle.

I also have CCI_Divergence_v1 indicator. Indicator CCI_Divergence_v1 works on a different principle. He draws divergence as soon as calculates it. Line divergence does not disappear regardless, bullish or bearish candle was formed after (see screenshot). If the candle closed in the direction of an estimated divergence, the arrow is drawn in addition to the line. If the candle closed in the other direction, the arrow is not drawn, but the line remains.

Can anyone help me to modify the indicators Wpr_mtf_alerts+divergence and Momentum Divergence2_mtf+alerts that they work on the same principle as the indicator CCI_Divergence_v1.

You can also add arrows to all lines. Thank you in advance.

I am sorry for my English, it is not my first language.

Thank you in advance.

cci_divergence_v1.mq4

 
jetro1971:
Hi Robert,

Thank you for your help and effort.

I think the indicator works fine however as you mentioned I could not get the right values from expert. I have included a simple ea that calls the Wildhog indicator. I'm trying to get for index 1 and print the values using alert to see it in the journal. I also add label print for the screen. Indicator prints the index 0 and ea prints index 1, I'm aware of this however when I check the bar time and output of the indicator, I cannot get meaningful results. Please see the picture.

And when I looked at your comment values, divergence variables are not inline with the indexbuffers of indicator. When you call the indicator it gets the value from indexbuffers. Do you think that there is a problem here as well?

Please try to check my ea in the attachment if you have time. You need to put the right filename. I'm using the standard inputs of the indicator does not change the inputs.

Thanks again

Hello jetro1971,

why dont you do on thing .you want to get value for Bar[1].so instead of changing Ea code ,chage the code for indicator

instead of for(i=limit; i>=0; i--) for loop for barcount, use for(i=limit; i>0; i--) .that way the indicator will only count closed bar.I am also trying to devolope an EA using divergent.But it seems divergent need to confermed by a second filter,SMA,fibo,Support,trendline etc.I also like one idea first get confermation of divergence on higher timeframe say H4,then wait for same type of divergent(Bullish hidden etc) in shorter timeframe 30M.Do you have any ideas on that. {

 
jetro1971:
Hi Robert,

Thank you for your help and effort.

I think the indicator works fine however as you mentioned I could not get the right values from expert. I have included a simple ea that calls the Wildhog indicator. I'm trying to get for index 1 and print the values using alert to see it in the journal. I also add label print for the screen. Indicator prints the index 0 and ea prints index 1, I'm aware of this however when I check the bar time and output of the indicator, I cannot get meaningful results. Please see the picture.

And when I looked at your comment values, divergence variables are not inline with the indexbuffers of indicator. When you call the indicator it gets the value from indexbuffers. Do you think that there is a problem here as well?

Please try to check my ea in the attachment if you have time. You need to put the right filename. I'm using the standard inputs of the indicator does not change the inputs.

Thanks again

hello jetro1971,

you want the value for closed candle.you can change code for indicator .instead of for(i=limit; i>=0; i--) { for loop for counted bars} you

can use for(i=limit; i>0; i--), that way the indicator will only use closed bar.

i am also trying to devolope an ea using divergent.but it seems that divergent signal needs to be confermed by another filter/filters support,fibo,trendline etc.

i also like another idea ,get confermation of divergence in higher timeframe say H4,then wait for same type of divergence(hidden bullish,etc) in lower timeframe

may be 30m.

do you have any idea on these?

 
poster:
Wildhog divergence wildhog-nrp-divergence.mq4

Sorry to botter anyone, but this indi doesn`t work, I`ve been searching for an indi with such a way of finding divergences, but i think this indi is made for older vertion of mt4. I`ll be really thankfull in anyone repost it suitable with new mt4. Also have anyone ever made divergence indi for zero lag MACD ?

 
Yasen:
Sorry to botter anyone, but this indi doesn`t work, I`ve been searching for an indi with such a way of finding divergences, but i think this indi is made for older vertion of mt4. I`ll be really thankfull in anyone repost it suitable with new mt4. Also have anyone ever made divergence indi for zero lag MACD ?

Yasen, it's working on build 765 for me.

Files:
wildhog.png  51 kb
 

Nothing desplayed, while no errors in the Metaeditor. I have no idea what`s happoning

Files:
capture.png  55 kb
 
Yasen:
Nothing desplayed, while no errors in the Metaeditor. I have no idea what`s happoning

All works OK for me too (example without any change of the code - default parameters used)

Check your experts and journal tab of terminal - if something is written out there

Files:
wildhog.gif  77 kb
 

Can someone correct this divergence stochastics indicator please so that it shows the arrows when the fulcrums of the stochastic is in divergence with the price?

Thanks

TEAMTRADER

 
TEAMTRADER:
Can someone correct this divergence stochastics indicator please so that it shows the arrows when the fulcrums of the stochastic is in divergence with the price?

Thanks

TEAMTRADER

The indi is correct. It shows divergences as it should. Attached is the version that shows the divergence lines. Divergences are turning points (local extrema) of the oscillator compared how high then the price is (must not be a local extremum), not reversa.

stochastic_divergence.mq4

Files:
Reason: