I want to create a custom indicator based on the JForex MACD indicator to create a standard version which uses the close price. In the calculate method of the MACD, the value is calculated using the following code:
for (k = 0; k < slowRes.getNumberOfElements(); k++){
macd[k] = fastMAOutput[k] - slowMAOutput[k];
}
I would like to modify it in the following way:
for (k = 0; k < slowRes.getNumberOfElements(); k++){
macd[k] = ((fastMAOutput[k] - slowMAOutput[k]) / close) * 100;
}
but I cannot work out how to get the close price values.