I need help in applying Bollinger bands to a displaced moving average. I have no idea how to do this and would greatly appreciate some help anybody could give me as I am new to the Java language. Below is the code for the displaced moving average I want to apply a Standard Deviation to:
function preMain() {
setPriceStudy(true);
setStudyTitle("25X5 DMA");
//setPlotType(PLOTTYPE_LINE);
setCursorLabelName("25X5 DMA", 0);
setDefaultBarThickness(1, 0);
setDefaultBarFgColor(Color.green, 0);
}
function main() {
var v25x5dma = new MAStudy(25, 5, "Close", MAStudy.SIMPLE);
return v25x5dma.getValue(MAStudy.MA)
}
function preMain() {
setPriceStudy(true);
setStudyTitle("25X5 DMA");
//setPlotType(PLOTTYPE_LINE);
setCursorLabelName("25X5 DMA", 0);
setDefaultBarThickness(1, 0);
setDefaultBarFgColor(Color.green, 0);
}
function main() {
var v25x5dma = new MAStudy(25, 5, "Close", MAStudy.SIMPLE);
return v25x5dma.getValue(MAStudy.MA)
}
Comment