RightEdge Forums
Main     Home          Members     Calendar     Who's On

Welcome Guest
        



MoCS Expand / Collapse
Message
Posted 9/30/2009 06:44:49 Post #9635
 

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being
What/how would be the best way to calculate this indicator? Would be in a system or as an indicator?

If I do it in a system I have the problem of calculating the EMA of the Close/ Index as EMA only takes ISeries so once I have the value in a user series can I get an EMA of it? Unless I write my own EMA function.

If I do it as an indicator can I get the underlying index data into the indicator as well as the symbol data to do the calcs?


The momentum of comparative strength (MoCS) formula:

The MoCS is essentially the traditional comparative strength formula run through a MACD formula.

“Data Series” is the close/last of the stock or ETF being analyzed.

MoCS = (12-period exponential moving average of ( data series / S&P 500 )) minus (26-period exponential moving average of ?( Data Series / S&P 500 )).

A 9-period moving average is then placed on the MoCS to act as the signal line.


Thanks.




Posted 9/30/2009 10:29:45 Post #9640
 

Lead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead DeveloperLead Developer
I don't think you can do this as an indicator unless you handle retrieving underlying index data on your own. Indicators are data independent, so there's no mechanism for guaranteeing that you're getting the index data that you need. I'd go with a UserSeries if possible.
Posted 10/1/2009 11:54:04 Post #9651
 

DeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloperDeveloper
You should be able to do this all with indicators which you set up in your startup method (without using user series), I think. You will need to have the S&P 500 as one of the symbols you use in your system, and you'll need a way to access it from the other symbol scripts. Once you have this set up you can just do:

ratioSeries = new DivideSeries();
ratioSeries.SetInputs(Bars.Close, SP500.Bars.Close);

Then you can set up the other indicators to be based on the ratioSeries.

Daniel
« Prev Topic | Next Topic »


Reading This Topic Expand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: billb, young, dplaisted

Permissions Expand / Collapse

All times are GMT -5:00, Time now is 6:19pm

2005-2007 © RightEdge Systems