Page 1 of 1

Moving Average %

Posted: Apr 19 2006
by agentcdh
I have no idea how to use easy language and I'm trying to accomplish the following.

An indicator that will give me a moving average %. It is very simple calculation, I just don't know how to write it in easy language.

Moving Average %= Current close/average (whatever you choose, I use 23 day).

Can anyone help me with the code to write this or does anyone already have it written?

Thank you. Claire Hart

Posted: Apr 19 2006
by Alex Kramer
Please open PLEditor, create a new indicator, give it a name and paste the following source code:

input: price(close), lenght(23);
plot1(price/average(price,lenght));

Press F3 to compile and after that a study with the selected name will be available in the Insert Study list.

Thank you.

Posted: Apr 19 2006
by agentcdh
Thanks. Worked great.