I Have Two New EA's I need Help Tweaking/Fixing

[B]UPDATE (April 5, 2011): This project has been completed. Thank you for your help.
[/B]

I have a CCI Divergence EA that uses a custom CCI Divergence Indicator in the Indicators folder in MT4 to determine when to place a trade.

What I want to do is use a custom Stochastics Divergence Indicator (which I have) instead.

I don’t know how to change the EA code to direct it to the Stochastics Divergence Indicator in the indicators folder.

In the EA inputs I think I need to replace:

[B]extern int CCI_Period = 10;[/B]

with

[B]extern int Stoch_K = 5;
extern int Stoch_D = 3;
extern int Stoch_Slowing = 3;
[/B]

In the main portion of the code I found the area that points to the custom CCI Divergence Indicator in the Indicators folder:

[B]dUp = iCustom(Symbol(), 0, “CCI_Divergence_Indicator”, “”, CCI_Period, 9, “”, false, false, false, 0, 2);
dDn = iCustom(Symbol(), 0, “CCI_Divergence_Indicator”, “”, CCI_Period, 9, “”, false, false, false, 1, 2);
[/B]

I know I have to change “CCI_Divergence_Indicator” to “Stochastics_Divergence_Indicator” which is the name of the custom stochastics divergence indicator in the Indicators folder. And I have to remove the CCI_Period and 9.

But I don’t know how to add the Stoch_K, Stoch_D, and Stoch_Slowing to this portion of the code.

I tried changing it on my own, but then the EA won’t open.

Does anyone know how to code this portion of the code so the stochastics divergence indicator can replace the cci divergence indicator?

The CCI Divergence Indicator has way too many false signals. The Stochastics Divergence Indicator is much better. That is why I want to do the switch.

Thanks in advance.
[B]UPDATE (April 5, 2011): This project has been completed. Thank you for your help.
[/B]

K, D and slow are just the parameters of the same function.

Something like
Sto0 = iCustom(Symbol(), 0, “Stochastics_Divergence_Indicator”,Stoch_K, Stoch_D, Stoch_Slowing , 1,1);

Thank you Javier. I sent you an email. Did you receive it?

Hi,

Yes. I’ll take a look and answer asap.

send it over and I will see if I can help you

Thank you Mike. Someone already did the switch for me. I just updated the post.