There was a prior thread addessing the removal of arrows applied to a chart to reduce the cpu load. I have searched and can not find it. Can someone point it out to me?
Best Regards,
Alan
Best Regards,
Alan
var vGraphicID = 0;
var nLastRawTime = null;
var BarCounter = 0; // Counts the number of bars in the chart
function main() {
// This is the function I use to finding new bars on the chart
// If new bar
if ((getValue("rawtime", 0) != nLastRawTime) ) {
nLastRawTime = getValue("rawtime", 0);
BarCounter += 1;
// Increment Graphics Counter.
fIncrementGraphicID()
}
drawShapeRelative(0, high(0)+MakeGOffset(), Shape.DOWNARROW, "", Color.red, Shape.TOP | Shape.ONTOP , vGraphicID+"SE");
return;
}
function fIncrementGraphicID() {
vGraphicID += 1;
if (vGraphicID > 100) { vGraphicID = 1; }
}
function MakeGOffset() {
return (high(-1)-low(-1))/3);
}
Comment