How can I create a 1 minute Advanced chart for the the S&P mini (ES M5) that shows the tick volume and not the trade volume. For example it would be similar to the regular S&P (SP M5)
Announcement
Collapse
No announcement yet.
Volume
Collapse
X
-
crjaq1
The script enclosed below will count the number of ticks occurring in a bar. Note however that because historical tick volume is not available - except with those futures where volume is actually tick volume - the efs will only work in real time ie from the moment you load it in a chart. If you reload the efs it will reset and start computing again from the most current bar only
Alex
PHP Code:function preMain() {
setStudyTitle("Tick Count");
setCursorLabelName("Ticks");
setPlotType(PLOTTYPE_HISTOGRAM);
setHistogramBase(0);
}
var vCntr = 0;
function main() {
if(getBarState()==BARSTATE_NEWBAR){
vCntr = 0;
}
vCntr++;
return vCntr;
}
Comment