When you use volume a lot to try to read the markets, single spikes can be annoying, because they compress the volume chart and make the rest of the chart unreadable.
Resizing the volume in the volume pane by dragging the scale does not work; you can resize volume, but not move it up and down.
To cut off spikes in volume, I have written a little efs study. Since I'm new to efs, I would like any comments.
Just use this study instead of the volume display. The limit may be entered by using the "Edit Study" dialogue. I have not included any parameters for the color display. This would be a nice extension.
Regards
Bernd Kuerbs
Resizing the volume in the volume pane by dragging the scale does not work; you can resize volume, but not move it up and down.
To cut off spikes in volume, I have written a little efs study. Since I'm new to efs, I would like any comments.
Just use this study instead of the volume display. The limit may be entered by using the "Edit Study" dialogue. I have not included any parameters for the color display. This would be a nice extension.
Regards
Bernd Kuerbs
PHP Code:
/*****************************************************************
Based upon "Tick Extremes.efs" from eSignal
*****************************************************************/
/*** To avoid volume spikes distorting the volume chart, the display of volume values larger than the limit
will be cut off.
The user may enter the limit via the "Edit Studies" dialogue;
The bars are colored based upon the price chart, not by comparing to the volume of the prvious bar.
***/
function preMain() {
setStudyTitle(" Volume Cut Off ");
setCursorLabelName("Vol Cut Off", 0);
setPlotType(PLOTTYPE_HISTOGRAM, 0);
setHistogramBase(0);
setDefaultBarThickness(1, 0);
setDefaultBarFgColor(Color.yellow, 0);
}
var vColorBse = Color.yellow;
var vColorUp = vColorBse;
var vColorDn = Color.cyan;
function main(vCutOffLimit) {
var c = close();
var o = open();
var v = volume();
var vColor;
var vCutOff;
if (c == null || o == null || v == null ) return;
vColor = vColorBse;
if (c >= o) {
vColor = vColorUp;
}
else {
vColor = vColorDn;
}
vCutOff = v;
if (vCutOffLimit != null) {
vCutOff = Math.min(v,vCutOffLimit);
}
setBarFgColor(vColor, 0);
return (vCutOff);
}
Comment