Click here to Login

How to create a moving average of an indicator

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

Share |

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.


- 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.
- Click on "OK" to add your new trading indicator

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.

no reviews (Log in)

Other how-to articles

How to create a volatility-based Stop - Dynamic stop based on the Average True Range

How to create a custom trading indicator

How to create histogram charts

How to dynamically update the settings of an indicator

How to create a hatched area in a chart

How to add a trading indicator to a chart

How to create a screen

How to optimize an indicator in your trading system

How to create a composite index/indicator

Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2024
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Follow us on Google+
RSS Trading Items

Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.