#twitter-follow { border: 0;position: fixed; top: 240px; left:0;} #live-support { border: 0;position: fixed; top: 370px; left:0;} #knowledge-base { border: 0;position: fixed; top: 170px; left:0;}

 Difficulty All Easy Intermediate Advanced Section All Application Charting Indicators Watchlist Screener Downloader Composite Analysis Simulator Portfolio Pivot Table Artificial Intelligence
How to create a moving average of an indicator

Updated on 2012-02-17 03:56:37

You can create a moving average of an indicator using the "Add a Function" control or directly by typing some code. Both solutions are presented here.

Steps:

- Open a chart, add a new pane then click on "Add Indicator" icon (How to add a trading indicator to a chart)
- Select "All Indicators" tab then type "SMA" in search input box
- Select the second "Simple Moving Average". This version allows you to specify the time-series you would like to apply; otherwise, the close time-series is used.
- In "Param" table, click on the "+" icon in the "Close" row to open a new "Add a Function" control.
- Select another indicator in the new control (Example: Relative strength index - RSI) then click on "OK". The "close" parameter is now replaced by the RSI formula.

You have just added a smoothed version of the relative strength index (Moving average applied to RSI)

To display the formula that has just been created, right click on your pane then select "Edit Formula". (Select "Sma" formula in case you have many formulas added to your pane)

a = Sma(Rsi(14),14);
Plot(a, "Sma", colorBlack, chartLine, StyleSymbolNone);

You could have just typed the above lines instead of performing the steps described above.

 Other how-to articles