Does anybody know how to do this?

To add comments, please log in or register
wolfe
1037
wolfe  

Here is what I'm trying to code:

I have a chart with an RSI attached to it. Then I drag and drop a MA into the RSI window and choose apply to "previous indicator's data". Now my moving average is using the RSI values for it's calculations.

I can't figure out how to code this into an EA. The Applied_Price values in mq4 don't have the option to choose "previous indicator's data" for the moving average.

Basically trying to get the current moving average of the current RSI.

If you know what I'm trying to do and may have a solution I would greatly appreciate any help.

Thanks,

Wolfe

joe
223
joe  

Hello Wolfe long time no see.

You have to use the iMAOnArray function for it to work.

wolfe
1037
wolfe  
elitecamper:
Hello Wolfe long time no see. You have to use the iMAOnArray function for it to work.

Thanks for response Elitecamper. I thought that's probably what had to be used. If you have time could you show an example? I can't seem to get this to work.

joe
223
joe  

here is an example i found in my indi folder.

Files:
wolfe
1037
wolfe  
elitecamper:
here is an example i found in my indi folder.

Thank you Elitecamper! That is just what I was looking for.

Now we'll see if my ideas are worth anything!

wolfe
1037
wolfe  

Speed up?

I took the indicator from post #4 and changed a few things for testing. I didn't change how the indicator functions. My question is does anybody know how to change this indicator so that it doesn't slow down the processor so much? Back testing takes forever!

Have a look.

Files:
2ma_rsi.mq4 3 kb
ralphronnquist
420
ralphronnquist  
wolfe:
I took the indicator from post #4 and changed a few things for testing. I didn't change how the indicator functions. My question is does anybody know how to change this indicator so that it doesn't slow down the processor so much? Back testing takes forever! Have a look.

Shouldn't the limit be set by:

int limit = Bars - IndicatorCounted() - 1;

because there's not really any need to recompute the past values, is there?

wolfe
1037
wolfe  
ralph.ronnquist:
Shouldn't the limit be set by:
int limit = Bars - IndicatorCounted() - 1;
because there's not really any need to recompute the past values, is there?

Thank you Ralph! That did the trick. Sometimes it stares you in the face and you just can't get it.

Thanks again,

Wolfe

To add comments, please log in or register