[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] uptick versus downtick volume



PureBytes Links

Trading Reference Links

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);


------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/