How do I apply a custom indicator to a an array?

 
Suppose I want to use a custom indicator-like a certain type of moving average- on RSI values. Then I need to set the RSI values in an array, and apply the moving average on that right? How do I do that? iCustom doesnt allow me to apply indicators on arrays.
 
1mathboy1:
Suppose I want to use a custom indicator-like a certain type of moving average- on RSI values. Then I need to set the RSI values in an array, and apply the moving average on that right? How do I do that? iCustom doesnt allow me to apply indicators on arrays.
You use iMAOnArray()  search the Forum there have been posts about iMAOnArray in the last couple of months.
 
1mathboy1: iCustom doesnt allow me to apply indicators on arrays.
#define nVALUES 20
double arr[nValues];
for(int iArr = 0; iArr < nValues; iArr++) arr[iArr] = iCustom(..., iArr);
Was that so hard?
 

@WHRoeder: sorry, I dont understand your comment. (I'm not very experienced with programming) isnt the last parameter of iCustom how many bars to shift? 

@RaptorUK, no i meant any indicator that I can find on code base, and i mentioned moving averages as an example. Like, lets say I want to apply PEMA (pentuple exponential moving average) to RSI in an EA, so I can get trading signals from whenever they intersect. 

 
1mathboy1:


@RaptorUK, no i meant any indicator that I can find on code base, and i mentioned moving averages as an example. Like, lets say I want to apply PEMA (pentuple exponential moving average) to RSI in an EA, so I can get trading signals from whenever they intersect. 

You have to code this yourself . . .
 
1mathboy1: @WHRoeder: sorry, I dont understand your comment. (I'm not very experienced with programming) isnt the last parameter of iCustom how many bars to shift?
Yes. Why would you want to fill an array with the same value?