File Name: KeltnerMCEmaBandsAdj.efs
Description:
Keltner study with bands based on a fixed multiplier constant expressed as a percentage of the basis line above and below the basis line.
Formula Parameters:
nInputLength: Default is 8 (length for EMA).
nMultiplierConstant: Default is 0.013 (number may also be entered as 1.3).
Notes:
Download File:
KeltnerMCEmaBandsAdj.efs
EFS Code:
Description:
Keltner study with bands based on a fixed multiplier constant expressed as a percentage of the basis line above and below the basis line.
Formula Parameters:
nInputLength: Default is 8 (length for EMA).
nMultiplierConstant: Default is 0.013 (number may also be entered as 1.3).
Notes:
Download File:
KeltnerMCEmaBandsAdj.efs
EFS Code:
PHP Code:
/*********************************
Provided By : eSignal. (c) Copyright 2003
*********************************/
function preMain() {
setPriceStudy(true);
setStudyTitle("EMA Keltner w/ Constant Bands");
setCursorLabelName("K-Upper", 0);
setCursorLabelName("K-Basis", 1);
setCursorLabelName("K-Lower", 2);
setDefaultBarFgColor(Color.blue, 0); // upper
setDefaultBarFgColor(Color.red, 1); // basis
setDefaultBarFgColor(Color.blue, 2); // lower
}
function main(nInputLength, nMultiplierConstant) {
if(nInputLength == null)
nInputLength = 8;
if(nInputLength <= 0)
nInputLength = 8;
if (nMultiplierConstant != null) {
if (nMultiplierConstant > 1) nMultiplierConstant /= 100;
nMultiplierConstant = nMultiplierConstant*1;
} else {
nMultiplierConstant = 0.013;
}
var dKeltnerBasis= call("/Library/KeltnerEMA.efs", nInputLength);
if(dKeltnerBasis == null) return;
return new Array(dKeltnerBasis + (nMultiplierConstant * dKeltnerBasis), dKeltnerBasis, dKeltnerBasis - (nMultiplierConstant * dKeltnerBasis));
}