# Moving Average 1 Line Indicator - Calculation

Questions about MultiCharts .NET and user contributed studies.
Hubace789
Posts: 25
Joined: 19 Nov 2012
Has thanked: 12 times

### Moving Average 1 Line Indicator - Calculation

Hi,

When comparing the RSI indicator on MC.Net to the Wilder's RSI indicator on http://www.freestockcharts.com, the calculations appear to be equal. However, when adding a 1 line SMA for 14 periods to MC.Net I get a much different avg than when using freestockcharts.com (which I have become very accustomed to).

I've calculated and verified how freestockcharts calculates their average. Can you provide the formula for the indicator MC uses? It just seems very lagged, and even with no displacement/offset, I can't help but believe it actually is being displaced to a negative value purely based on it's lagged curve.

Thanks for any help,
Eric

Henry MultiСharts
Posts: 8664
Joined: 25 Aug 2011
Has thanked: 1218 times
Been thanked: 2790 times

### Re: Moving Average 1 Line Indicator - Calculation

Hello Eric,

In our environment the results are the same. Please check the attached picture.
You can open the source code of the study if you go to MultiCharts File->New->PowerLanguage editor-> File->Open-> RSI.

Please attach the workspace you are using and screenshot demonstrating the results difference.
Attachments
11768.png (187.07 KiB) Viewed 586 times

Hubace789
Posts: 25
Joined: 19 Nov 2012
Has thanked: 12 times

### Re: Moving Average 1 Line Indicator - Calculation

Hi Henry,

As per my original statement, the RSI is confirmed to be correct.

However, Please add a SMA for 14 periods and 0 offset to sub-chart #2.
Simultaneously, edit the SMA for the RSI in freestockcharts from the default 5,0 to 14,0

You should see the difference in the Averages here.

Thanks again,

Eric

Hubace789
Posts: 25
Joined: 19 Nov 2012
Has thanked: 12 times

### Re: Moving Average 1 Line Indicator - Calculation

Hi Henry, any luck?

Henry MultiСharts
Posts: 8664
Joined: 25 Aug 2011
Has thanked: 1218 times
Been thanked: 2790 times

### Re: Moving Average 1 Line Indicator - Calculation

Hello Hubace789,

On freestockcharts you have an indicator applied to the other indicator.
In MultiCharts an indicator cannot be applied to the indicator directly.

If you want to apply an indicator to the another indicator you need to place both indicators into one study in order to perform the calculation based on original indicator values. You can also create the function that will do the calculation you need and then reference it from your code.
These users thanked the author Henry MultiСharts for the post:
Hubace789

Hubace789
Posts: 25
Joined: 19 Nov 2012
Has thanked: 12 times

### Re: Moving Average 1 Line Indicator - Calculation

Could this be a request for the project management wish list? (Adding an indicator to another indicator directly?)

I am a beginner with the .NET framework and just learning C#, I will give it a shot, but will likely mess it up... Should be an easy enough task eventually though.

Thanks for the help I appreciate it,

Eric

Henry MultiСharts
Posts: 8664
Joined: 25 Aug 2011
Has thanked: 1218 times
Been thanked: 2790 times

### Re: Moving Average 1 Line Indicator - Calculation

Eric, please vote for the corresponding feature request Indicator on indicator