Does anyone know how to code a MACD that is connected to the relative performance ratio instead of closing price? The relative performance ratio is a stock/ index = ratio and I want to make the MACD of the ratio. Can some one help I have not idea what I am doing coding? Thank you. If not one can help can someone recommend a programmer I can commission to do this?
Announcement
Collapse
No announcement yet.
Relative Performance Ratio MACD
Collapse
X
-
twbrogan
Assuming I am correctly understanding what you are asking you can do that in two ways neither of which would require you to code anything
First create a symbol of your ratio using the Composite Symbol Manager (see the eSignal KnowledgeBase for information on how to use that tool). You will use the result of this first step in either case.
For the first method insert that composite symbol as a secondary symbol on to your chart and apply the built-in MACD study to that inserted symbol (again refer to the eSignal KnowledgeBase on how to do all this)
The second method is to use the customMACD.efs which is in the Built-in Studies Formulas->Custom Formulas folder which is already set to use external symbols and/or intervals. Apply it to the chart and in the Symbol parameter insert the composite symbol you created
Alex
Originally posted by twbrogan View PostDoes anyone know how to code a MACD that is connected to the relative performance ratio instead of closing price? The relative performance ratio is a stock/ index = ratio and I want to make the MACD of the ratio. Can some one help I have not idea what I am doing coding? Thank you. If not one can help can someone recommend a programmer I can commission to do this?
-
Is what you are describing the same as making the MACD connected to the relative strength ratio( what I call relative performance ratio)? Because that is what I am trying to do. Below is the relative strength that Bollinger code and I want to connect a MACD to it.
/*********************************************
Relative Strength
10/29/2003 John Bollinger
Copyright 2003 Bollinger Capital Management
*********************************************/
var aFPArray = new Array();
function preMain() {
setPriceStudy(true);
setStudyTitle("Relative Strenth versus S&P 500");
setCursorLabelName("rs vs SPX");
setDefaultBarFgColor(Color.RGB(0x00,0x94,0xFF));
aFPArray[0] = new FunctionParameter( "Divisor", FunctionParameter.NUMBER);
with( aFPArray[0] ) {
setLowerLimit( 100 );
setUpperLimit( 2000 );
setDefault( 1000 );
}
}
function main(Divisor) {
if (Divisor == null) Divisor = 1000;
var vClose = getValue("Close", 0, 1);
var vSPX = getValue("Close", 0, 1, "$SPX");
if(vSPX > 0) {
return (vClose / vSPX * Divisor);
} else {
return;
Comment
-
twbrogan
All that study does is create a composite symbol.
As I said you can accomplish the same using the Composite Symbol tool
Alex
Originally posted by twbrogan View PostIs what you are describing the same as making the MACD connected to the relative strength ratio( what I call relative performance ratio)? Because that is what I am trying to do. Below is the relative strength that Bollinger code and I want to connect a MACD to it.
/*********************************************
Relative Strength
10/29/2003 John Bollinger
Copyright 2003 Bollinger Capital Management
*********************************************/
var aFPArray = new Array();
function preMain() {
setPriceStudy(true);
setStudyTitle("Relative Strenth versus S&P 500");
setCursorLabelName("rs vs SPX");
setDefaultBarFgColor(Color.RGB(0x00,0x94,0xFF));
aFPArray[0] = new FunctionParameter( "Divisor", FunctionParameter.NUMBER);
with( aFPArray[0] ) {
setLowerLimit( 100 );
setUpperLimit( 2000 );
setDefault( 1000 );
}
}
function main(Divisor) {
if (Divisor == null) Divisor = 1000;
var vClose = getValue("Close", 0, 1);
var vSPX = getValue("Close", 0, 1, "$SPX");
if(vSPX > 0) {
return (vClose / vSPX * Divisor);
} else {
return;
Comment
Comment