Hi, this indicator calculates the highest value in the last 20 days macd (exponential moving average). I would like to calculate the highest value in the last 20 days macd (simple moving average). How can I do?
Thank you very much for the help!
Thank you very much for the help!
Code:
var bInit = false; var xMacd = null; var xHighMacd = null; function main() { if (bInit == false) { xMacd = macd(3, 10, 15); xHighMacd = highest(20, xMacd); bInit = true; } return xHighMacd.getValue(0); }
Comment