I downloaded Jason K programs from eSignal, but could not get them to work. The programs are:
BidAskVolume.efs
BidAskVolumeRatio.efs
When I save them to my computer and download them to a chart, all I get is a blank, no volumes of any kind show up. What am I doing wrong?
The BidAskVolume.efs program is below:
BidAskVolume.efs
BidAskVolumeRatio.efs
When I save them to my computer and download them to a chart, all I get is a blank, no volumes of any kind show up. What am I doing wrong?
The BidAskVolume.efs program is below:
PHP Code:
/*****************************************************************
Provided By : eSignal. (c) Copyright 2003
*****************************************************************/
function preMain() {
setStudyTitle("Bid\/Ask Volume");
setCursorLabelName("Bid Vol", 0);
setCursorLabelName("Inside Vol", 1);
setCursorLabelName("Ask Vol", 2);
setDefaultBarFgColor(Color.blue, 0);
setDefaultBarFgColor(Color.lime, 1);
setDefaultBarFgColor(Color.red, 2);
setDefaultBarThickness(8, 0);
setDefaultBarThickness(6, 1);
setDefaultBarThickness(4, 2);
setPlotType(PLOTTYPE_HISTOGRAM, 0);
setPlotType(PLOTTYPE_HISTOGRAM, 1);
setPlotType(PLOTTYPE_HISTOGRAM, 2);
}
var nBidVol = 0;
var nInsideVol = 0;
var nAskVol = 0;
var vVol = null;
var bPrimed = false;
function main() {
if (getCurrentBarIndex() < 0) return;
var nState = getBarState();
if (nState == BARSTATE_NEWBAR) {
nBidVol = 0;
nInsideVol = 0;
nAskVol = 0;
vVol = 0;
}
var vPrevVol = null;
if (vVol != null && bPrimed == true) vPrevVol = vVol;
var nAsk = getMostRecentAsk();
var nBid = getMostRecentBid();
var vClose = close();
vVol = volume();
var vTradeVol = vVol - vPrevVol;
if (bPrimed == false && vVol != null) {
bPrimed = true;
return;
} else {
if (vClose <= nBid) {
nBidVol += vTradeVol;
} else if (vClose >= nAsk) {
nAskVol += vTradeVol;
} else {
nInsideVol += vTradeVol;
}
}
return new Array(nBidVol, nInsideVol, nAskVol);
}
Comment