Up/Down volume on NYSE

Hello,

I've been trying to plot the up/down volume breadth indicator for the NYSE.
I'm using Dtn / IqFeed as my data provider, and they provide the following tickers for the up and down volumes on the NYSE: VINA.Z & VIND.Z

I've tried the following code:

    vadTickerUp = Foreign("VINA.Z", "Close");
    vadTickerDn = Foreign("VIND.Z", "Close");
    vadTicker = vadTickerUp - vadTickerDn;
    vadTickerRatio = vadTickerUp / vadTickerDn;
    vadName = "V-ADD-NYSE";

    Plot(0, "", colorYellow, styleDashed | styleNoRescale);
    Plot(vadTicker, "V-ADIndex", ColorWhite, styleLine);
    Title = vadName + " - VAD=" + NumToStr(vadTickerRatio,1.2,False);

This works as expected. However, I would like to plot this an a candlestick indicator, by using styleCandlestick instead of styleLine. This doesn't work, I think because there is no OHL data available for the two foreign tickers.

I also tried using SetForeign(), but as far as I know, I can only use this with one foreign ticker, not with two as in my case.

Can anyone help?

AFL Function Reference - PLOTOHLC (amibroker.com)
This is used for custom OHLC but you need to pass the 4 arrays

1 Like

Many thanks.
That worked, in combination with PlotOHLC()

Before you use these metrics, perhaps you need to establish whether they are even worthy of consideration.

NYSE listings include: Debt Instruments, Hybrid Debt/Equity Instruments, Warrants, Rights, Structured Products, Investment Companies and ETFs.

Right now, all of the above represent over 1000 listings on NYSE (out of just over 3000).

Do you really want all of these instruments as part of your metrics, especially on an equal-weighted basis?

1 Like

Hello,

I don't understand your comment/reply.
As I understand it, the AD, TICK and AD-VOLUME are calculated based on all stocks on the NYSE.

Let's assume you are an equities trader, and you are using market breadth indicators to measure sentiment of the market

These indicators are equal-weighted - that is, any movement of any underlying component is considered equally.

But, since you are including ALL securities, there are many you probably would want to exclude.

Let's consider one stock on NYSE - Bank of America Corp (BAC).

There was also 10 Preferred securities for Bank of America Corp - (BAC-B, -E, -K, -L, -M, -N, -O, -P, -Q, -S). These hybrid debt-equity instruments have some level of correlation to the underyling stock, but also to interest rate movements.

Do you think that including them would improve or reduce the quality of a market-wide metric? Do you think that including interest-rate-senstivie non-equity instruments is useful to your study of equities?

3 Likes

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.