(continues from prior post – to see the thread in reverse order click here)
In version 7.9.1 the efsInternal() function has been enhanced and now includes the same functionality of the efsExternal() function described in the prior post
To see how it works save the script enclosed below as test3.efs
Alex
PHP Code:
function preMain() {
setPriceStudy(false);
setStudyTitle("MACD");
setCursorLabelName("MACD",0);
setCursorLabelName("MACDSig",1);
setCursorLabelName("MACDHist",2);
setDefaultBarFgColor(Color.blue,0);
setDefaultBarFgColor(Color.red,1);
setDefaultBarFgColor(Color.magenta,2);
setPlotType(PLOTTYPE_LINE,0);
setPlotType(PLOTTYPE_LINE,1);
setPlotType(PLOTTYPE_HISTOGRAM,2);
}
function main(){
var vExtEfs = efsInternal("example");
var vMACD = getSeries(vExtEfs,0);
var vSig = getSeries(vExtEfs,1);
var vHist = getSeries(vExtEfs,2);
return new Array (vMACD,vSig,vHist.getValue(0));
}
function example(){
return new Array (macd(12,26,9), macdSignal(12,26,9), macdHist(12,26,9));
}
If you search through the forums you will find many threads [complete with examples] that discuss how to use them efficiently
Leave a comment: