I made a stab at modifying the bandwidth efs file, as follows:
function preMain() {
setStudyTitle("Lowest BandWidth");
setCursorLabelName("Low BW", 0);
setCursorLabelName("Floor", 1);
}
var bb = new BollingerStudy(20, "Close", 2.0);
function main() {
var vUpper = bb.getValue(BollingerStudy.UPPER);
var vLower = bb.getValue(BollingerStudy.LOWER);
var vMiddle = bb.getValue(BollingerStudy.BASIS);
var Bndwidth = efs("/Bollinger/Bandwidth.efs",0);
var low_bw = llv(50,Bndwidth);
if(vUpper == null || vLower == null || vMiddle == null)
return 0.0;
return new Array((vUpper - vLower) / vMiddle * 100, 0.0, low_bw);
}
What I'd like to do, however, is color the line a different color when the bandwidth is equal to the lowest bandwith. Also, I'd like to be able to modify the low_bw (or the lookback number) via the Formula Parameters in Study Properties dialog box.
What am I missing?
Thanks.
Harold Harper
[email protected]
function preMain() {
setStudyTitle("Lowest BandWidth");
setCursorLabelName("Low BW", 0);
setCursorLabelName("Floor", 1);
}
var bb = new BollingerStudy(20, "Close", 2.0);
function main() {
var vUpper = bb.getValue(BollingerStudy.UPPER);
var vLower = bb.getValue(BollingerStudy.LOWER);
var vMiddle = bb.getValue(BollingerStudy.BASIS);
var Bndwidth = efs("/Bollinger/Bandwidth.efs",0);
var low_bw = llv(50,Bndwidth);
if(vUpper == null || vLower == null || vMiddle == null)
return 0.0;
return new Array((vUpper - vLower) / vMiddle * 100, 0.0, low_bw);
}
What I'd like to do, however, is color the line a different color when the bandwidth is equal to the lowest bandwith. Also, I'd like to be able to modify the low_bw (or the lookback number) via the Formula Parameters in Study Properties dialog box.
What am I missing?
Thanks.
Harold Harper
[email protected]
Comment