Hi all,

I want to display uptick versus downtick volume but on a different
timeframe chart. E.g. 1 min, 15 min etc.

I couldn't find a way of doing this using the timeframe functions
because you can't access lower timeframes.
Am I correct in thinking therefore, that this is technically
impossible to do in AB?

This is not too much of a problem as I can just code it in Java and
import as ASCII data.  However it would be nice if it could be done in
program.

Anyone have a solution?

Cheers,
Julian.


PS. Here is the code I use to calculate this data for every minute on
a tick chart.

yesterdaysClose = Ref(C, -1);
upTick = C > yesterdaysClose;
downTick = C < yesterdaysClose;
sameTick = C == yesterdaysClose;

Minutes = Minute();
newMinute = Minutes != Ref(Minutes, -1);
endOfMinute = Ref(newMinute, 1);

barsInMinute = BarsSince(newMinute) + 1;

upVolume = IIf(upTick, V, 0);
downVolume = IIf(downTick, V, 0);
sameVolume = IIf(sameTick, V, 0);

upVinMinute = IIf(endOfMinute, Sum(upVolume, barsInMinute), 0);
downVinMinute = IIf(endOfMinute, Sum(downVolume, barsInMinute), 0);
sameVinMinute = IIf(endOfMinute, Sum(sameVolume, barsInMinute), 0);

Plot(upVinMinute, "UP", colorBlue, styleHistogram | styleThick);
Plot(downVinMinute*-1, "Down", colorRed, styleHistogram | styleThick);

Reply via email to