Moving Average of an Index

A forum for all EdgeRater users

Moderator: Chris White

Post Reply
Chris White
Posts: 201
Joined: Mon Nov 29, 2010 9:21 pm

Moving Average of an Index

Post by Chris White »

I am trying to use the moving average of an index in a custom indicator I am writing. I tried MA(Sym2,50) where Sym2 is defined as $IUX under the parameters tab. It does not seem to work, but does compile. Is it possible to calculate the moving average of a data array other than "c"?
The way to get the indicator value for a different symbol (to the one currently selected) is to use the FML function. You can use the form FML(Sym, Indi) where symbol is the symbol you want to use and Indi is the indicator that you want to calculate for that symbol.

So, for your example you could use:

Code: Select all

FML(Sym2, 'MA(C, 50)');
Where the first parameter is Sym2 which is defined as a parameter of type Symbol and the second parameter is a string representing the indicator that you want to calculate for the symbol. this parameter could either be a parameter of type indicator or a hardcoded value such as in this example enclosed in single quotes.
Post Reply