- This topic has 0 replies, 1 voice, and was last updated 1 year ago by .
Viewing 1 post (of 1 total)
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.
Optuma Forums › Optuma Scripting › Mansfield Relative Strength
The Mansfield Relative Strength indicator comes from Stan Weinstein’s book ‘Secrets For Profiting in Bull and Bear Markets.’ It takes the relative price of a stock against a benchmark, and compares it to the 200 day moving average.
Here’s the formula in Optuma using the RIC() function, which can be used in a Show View and saved as an indicator:
1 2 3 4 5 6 7 8 9 10 11 |
// Set Lookback period; #$LB=200; //Calc Relative Price vs SPX; RP = RIC(DATESEL=None, ZEROBASED=True, INDEX=SPX:WI); //Calc SMA of RP; SMA = MA(RP, BARS=$LB, CALC=Close); //Calc Mansfield RS; MRS = ((RP / SMA)-1)*100; MRS |
Here’s the Mansfield RS displayed at the bottom of the chart of $XLE, showing green when the relative price is above its 200MA and red when below:
Scans / tests could be set up for when the indicator crosses above or below zero by changing the last line of the script as follows:
1 2 3 |
MRS Crosses 0 |
The signals can then be placed on a chart using the formula in a Show Bar:
Clients can save and open the attached workbook in their copy of Optuma for examples.
Cookie | Duration | Description |
---|---|---|
cname | 14 days | This cookie is set by Optuma. The cookies is used to store the users campaign selection for selecting the correct version of Optuma to trial and is "Necessary". |
cookielawinfo-checbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |