iqfeed intraday bar volume  [SOLVED]

Questions about MultiCharts and user contributed studies.
mjm
Posts: 28
Joined: 22 Aug 2012
Has thanked: 9 times
Been thanked: 4 times

iqfeed intraday bar volume

Postby mjm » 17 Oct 2012

I am seeing strange Volume values for intraday bars using IQFeed. Rather than seeing the expected trading volume for the bar (say 1-minute), I get a constant large value. That value is equal to what QuoteManager says the "UpVol" is for the instrument, but the "TotalVol" field in QuoteManager looks like the value I want. I've attached a screenshot of the QuoteManager EditData window and the output of a simple signal.

Steps I took:

* In Portfolio Backtester, added the following signal:

Code: Select all

Print(GetSymbolName, " ", (Date+19000000):0:0, " ", Time:0:0,
" OHLC[", Open:0:2, " ", High:0:2, " ", Low:0:2, " ", Close:0:2, "] ",
" Vol ", Volume:0:0);
* In Portfolio Backtester, added a single Instrument from IQFeed. In the Insert Instrument / Settings tab, I chose Resolution 1 Minute, Quote Field "Trade", Sessions "Default", and Build Volume On "Trade Volume".

* When I run this strategy I see the following:

Code: Select all

AAON 20121015 1553 OHLC[18.85 18.85 18.85 18.85] Vol 324723904
AAON 20121015 1555 OHLC[18.85 18.85 18.84 18.84] Vol 324723904
AAON 20121015 1556 OHLC[18.88 18.88 18.87 18.87] Vol 324723904
AAON 20121015 1557 OHLC[18.89 18.89 18.89 18.89] Vol 324723904
AAON 20121015 1558 OHLC[18.88 18.89 18.88 18.89] Vol 324723904
AAON 20121015 1559 OHLC[18.87 18.87 18.87 18.87] Vol 324723904
AAON 20121015 1600 OHLC[18.87 18.90 18.87 18.87] Vol 324723904
When you compare this to the QuoteManager screenshot, you will see that the Volume values match the "UpVol" column. I guess this is consistent with the PowerLanguage documention for "Volume", which says: "For tick and volume-based charts, and time-based charts with resolutions of 24 hours or less: the volume traded on Up ticks will be returned if Build Volume On is set to Trade Volume; the number of Up ticks in the current bar will be returned if Build Volume On is set to Tick Count."

But I don't want either of these. I just want the total volume for the bar and it appears that value is available to QuoteManager as the "TotalVol" field. Is there a way I can get at the data in the "TotalVol" column instead?

Multicharts 64-bit v8.0.5622.401
IQFeed v4.8.1.7

Thanks,
Mike
Attachments
quotemanager-editdata-AAON.png
QuoteManager EditData screenshot
(55.9 KiB) Downloaded 596 times

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: iqfeed intraday bar volume

Postby TJ » 17 Oct 2012

Use TICKS

mjm
Posts: 28
Joined: 22 Aug 2012
Has thanked: 9 times
Been thanked: 4 times

Re: iqfeed intraday bar volume

Postby mjm » 17 Oct 2012

Use TICKS
I'm not sure I understand ... In Portfolio Backtester I tried Format Instrument / Settings / Resolution "1 Tick", Quote Field "Trade", Built Volume On "Trade Volume". Now I see:

Code: Select all

...
AAON 20121015 1557 OHLC[18.89 18.89 18.89 18.89] Vol 50
AAON 20121015 1558 OHLC[18.87 18.87 18.87 18.87] Vol 150
AAON 20121015 1558 OHLC[18.87 18.87 18.87 18.87] Vol 50
AAON 20121015 1558 OHLC[18.87 18.87 18.87 18.87] Vol 50
AAON 20121015 1558 OHLC[18.87 18.87 18.87 18.87] Vol 50
AAON 20121015 1558 OHLC[18.87 18.87 18.87 18.87] Vol 50
AAON 20121015 1558 OHLC[18.87 18.87 18.87 18.87] Vol 50
AAON 20121015 1558 OHLC[18.87 18.87 18.87 18.87] Vol 50
AAON 20121015 1559 OHLC[18.87 18.87 18.87 18.87] Vol 50
AAON 20121015 1559 OHLC[18.88 18.88 18.88 18.88] Vol 50
AAON 20121015 1559 OHLC[18.88 18.88 18.88 18.88] Vol 50
AAON 20121015 1559 OHLC[18.88 18.88 18.88 18.88] Vol 50
AAON 20121015 1559 OHLC[18.89 18.89 18.89 18.89] Vol 100
AAON 20121015 1559 OHLC[18.90 18.90 18.90 18.90] Vol 50
AAON 20121015 1559 OHLC[18.90 18.90 18.90 18.90] Vol 50
AAON 20121015 1559 OHLC[18.87 18.87 18.87 18.87] Vol 50
These volume numbers look more reasonable. But I was hoping MultiCharts could aggregate them to the bar level, say 1-minute or 60-minute bars. Did I misunderstand your suggestion?

Thanks,
Mike

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: iqfeed intraday bar volume  [SOLVED]

Postby TJ » 17 Oct 2012

I don't mean using resolution "1 Tick".

I meant to replace the keyword VOLUME with TICKS in your code:

Code: Select all

Print(GetSymbolName, " ", (Date+19000000):0:0, " ", Time:0:0,
" OHLC[", Open:0:2, " ", High:0:2, " ", Low:0:2, " ", Close:0:2, "] ",
" Vol ", TICKS:0:0);

ps. look up the definition for TICKS. It is a legacy thing. :-(

mjm
Posts: 28
Joined: 22 Aug 2012
Has thanked: 9 times
Been thanked: 4 times

Re: iqfeed intraday bar volume

Postby mjm » 17 Oct 2012

ps. look up the definition for TICKS. It is a legacy thing. :-(
Wow, I never would have found that. It works! And to save others the confusion, here is the very helpful documentation for the 'Ticks' function:

Code: Select all

Returns the total volume for the current bar if Build Volume On is set to Trade Volume.
... With Build Volume On is set to Trade Volume:
- the volume of the current tick will be returned for 1-tick charts
- the total volume of the current bar will be returned for multi-tick, volume, and time-based charts
Thanks so much for pointing this out!

-Mike

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: iqfeed intraday bar volume

Postby TJ » 17 Oct 2012

You are welcome.

Good trading to you.

moses
Posts: 54
Joined: 16 Nov 2012
Has thanked: 34 times
Been thanked: 7 times

Re: iqfeed intraday bar volume

Postby moses » 16 Dec 2012

??!!
I've been frustrated all day trying to figure out what was wrong with my code!

Obviously easylanguage and powerlanguage are not the same!
Is there any reason at all that 'ticks' means 'volume', and 'volume' means 'up volume' in Multicharts?

I almost cannot believe this - MC, you need to create a smooth user experience for these very basics, so we'll invest our time getting frustrated with trading, not how to use 'volume'!!!

Okay, rant over..


TJ, thank you again!

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: iqfeed intraday bar volume

Postby TJ » 16 Dec 2012

??!!
I've been frustrated all day trying to figure out what was wrong with my code!

Obviously easylanguage and powerlanguage are not the same!
Is there any reason at all that 'ticks' means 'volume', and 'volume' means 'up volume' in Multicharts?

I almost cannot believe this - MC, you need to create a smooth user experience for these very basics, so we'll invest our time getting frustrated with trading, not how to use 'volume'!!!

Okay, rant over..

TJ, thank you again!
For your information, this is not a MultiCharts "invention".
The TICKS and VOLUME keywords in PowerLanguage are the same as in EasyLanguage,
which have not changed in TS for over 25 years.

moses
Posts: 54
Joined: 16 Nov 2012
Has thanked: 34 times
Been thanked: 7 times

Re: iqfeed intraday bar volume

Postby moses » 16 Dec 2012

??!!

now i feel even stupider than i normally do..

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: iqfeed intraday bar volume

Postby TJ » 16 Dec 2012

??!!
now i feel even stupider than i normally do..
You are not alone.


This is a legacy thing.

It started way back, when the exchanges only report trades, but not intraday volume information. So people count the number of trades reported (ie ticks), and use that as intraday "volume".


Return to “MultiCharts”