Hello
I would like to have the ability to remove the histogram from EFS 2 custom study. Here is the code that I have altered but it seems that the histogram has a "blue outline" which I can not remove.
Do I need to remove line 72 & 82 to only show the MACD and signal line without the histogram?
Also I can not seem to alter the bar thickness. Can someone suggest what I can do to change the thickness of the lines?
Any assistance would be greatly appreciated.
Pogman
**************************/
var fpArray = new Array();
function preMain() {
setStudyTitle("MACD");
setCursorLabelName("MACD",0);
setCursorLabelName("MACDSig",1);
setDefaultBarFgColor(Color.aqua,0);
setDefaultBarFgColor(Color.red,1);
setPlotType(PLOTTYPE_LINE,0);
setPlotType(PLOTTYPE_LINE,1);
setDefaultBarThickness(4,8);
setDefaultBarThickness(4,3);
askForInput();
var x=0;
fpArray[x] = new FunctionParameter("Fast", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(12);
}
fpArray[x] = new FunctionParameter("Slow", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(26);
}
fpArray[x] = new FunctionParameter("Smoothing", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(9);
}
fpArray[x] = new FunctionParameter("Source", FunctionParameter.STRING);
with(fpArray[x++]){
addOption("open");
addOption("high");
addOption("low");
addOption("close");
addOption("hl2");
addOption("hlc3");
addOption("ohlc4");
setDefault("close");
}
fpArray[x] = new FunctionParameter("Symbol", FunctionParameter.STRING);
with(fpArray[x++]){
setDefault("");
}
fpArray[x] = new FunctionParameter("Interval", FunctionParameter.NUMBER);
with(fpArray[x++]){
setDefault("");
}
fpArray[x] = new FunctionParameter("Params", FunctionParameter.BOOLEAN);
with(fpArray[x++]){
setName("Show Parameters");
setDefault(false);
}
}
var bInit = false;
var xMACD = null;
var xMACDSig = null;
var xMACDHist = null;
function main(Fast,Slow,Smoothing,Source,Symbol,Interval,Pa rams){
if(bInit == false){
if(Symbol == null) Symbol = getSymbol();
if(Interval == null) Interval = getInterval();
var vSymbol = Symbol+","+Interval;
xMACD = macd(Fast,Slow,Smoothing,eval(Source)(sym(vSymbol) ));
xMACDSig = macdSignal(Fast,Slow,Smoothing,eval(Source)(sym(vS ymbol)));
xMACDHist = macdHist(Fast,Slow,Smoothing,eval(Source)(sym(vSym bol)));
addBand(0,PS_SOLID,3,Color.black,"Centerline");
setShowTitleParameters(eval(Params));
bInit = true;
}
return new Array (getSeries(xMACD),getSeries(xMACDSig),getSeries(xM ACDHist));
}
I would like to have the ability to remove the histogram from EFS 2 custom study. Here is the code that I have altered but it seems that the histogram has a "blue outline" which I can not remove.
Do I need to remove line 72 & 82 to only show the MACD and signal line without the histogram?
Also I can not seem to alter the bar thickness. Can someone suggest what I can do to change the thickness of the lines?
Any assistance would be greatly appreciated.
Pogman
**************************/
var fpArray = new Array();
function preMain() {
setStudyTitle("MACD");
setCursorLabelName("MACD",0);
setCursorLabelName("MACDSig",1);
setDefaultBarFgColor(Color.aqua,0);
setDefaultBarFgColor(Color.red,1);
setPlotType(PLOTTYPE_LINE,0);
setPlotType(PLOTTYPE_LINE,1);
setDefaultBarThickness(4,8);
setDefaultBarThickness(4,3);
askForInput();
var x=0;
fpArray[x] = new FunctionParameter("Fast", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(12);
}
fpArray[x] = new FunctionParameter("Slow", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(26);
}
fpArray[x] = new FunctionParameter("Smoothing", FunctionParameter.NUMBER);
with(fpArray[x++]){
setLowerLimit(1);
setDefault(9);
}
fpArray[x] = new FunctionParameter("Source", FunctionParameter.STRING);
with(fpArray[x++]){
addOption("open");
addOption("high");
addOption("low");
addOption("close");
addOption("hl2");
addOption("hlc3");
addOption("ohlc4");
setDefault("close");
}
fpArray[x] = new FunctionParameter("Symbol", FunctionParameter.STRING);
with(fpArray[x++]){
setDefault("");
}
fpArray[x] = new FunctionParameter("Interval", FunctionParameter.NUMBER);
with(fpArray[x++]){
setDefault("");
}
fpArray[x] = new FunctionParameter("Params", FunctionParameter.BOOLEAN);
with(fpArray[x++]){
setName("Show Parameters");
setDefault(false);
}
}
var bInit = false;
var xMACD = null;
var xMACDSig = null;
var xMACDHist = null;
function main(Fast,Slow,Smoothing,Source,Symbol,Interval,Pa rams){
if(bInit == false){
if(Symbol == null) Symbol = getSymbol();
if(Interval == null) Interval = getInterval();
var vSymbol = Symbol+","+Interval;
xMACD = macd(Fast,Slow,Smoothing,eval(Source)(sym(vSymbol) ));
xMACDSig = macdSignal(Fast,Slow,Smoothing,eval(Source)(sym(vS ymbol)));
xMACDHist = macdHist(Fast,Slow,Smoothing,eval(Source)(sym(vSym bol)));
addBand(0,PS_SOLID,3,Color.black,"Centerline");
setShowTitleParameters(eval(Params));
bInit = true;
}
return new Array (getSeries(xMACD),getSeries(xMACDSig),getSeries(xM ACDHist));
}
Comment