Hello,
Thank you very much for your e-mail.
This is not limitation. This is logical consequence of mathematical facts.
If you have a picture with resolution of 100x100pixels (your weekly data) you can not suddenly get 1000x1000 pixels (daily data)
out of it because there is no information in that resolution.
You can not get 4K signal out of low-resolution signal.
(Although TV makers would claim otherwise, but all they do is apply smoothing interpolation.
Interpolated data however does not have details that actual hi-res picture has)
Best regards,
Tomasz Janeczko
amibroker.com
I've tried TimeFrameExpand.I think that information that ALL time frame functions work only from shorter interval to longer interval and that there is no way to access shorter interval data should be stated clearly at the top of the chapter, because it's very important for all the functions described there.
I've read "you can only compress data from shorter interval to longer interval." and I interpreted it literally. I didn't want to compress the data.
BTW: can this limitation be removed in the future? Of course there are some cases when there is no shorter interval data (eg. when using daily bars and EOD data, you don't have access to 10 min data), but since weekly bars are made of daily data, I found it odd, that I cannot access daily data in the easy way.
best regards
On Sun, Apr 17, 2016 at 11:12 AM, Tomasz Janeczko groups@amibroker.com [amibroker] <amibroker@yahoogroups.com> wrote:
Hello,
Thank you very much for your e-mail.
The thing is that AmIBroker manual is not a novel where you can skip large parts.
AmiBroker manual is different. It is literally PACKED with information and you need
to read every sentence and understand every sentence. Don't skip sentences or entire parts
because you will miss essential stuff.
If you read https://www.amibroker.com/guide/h_timeframe.html carefully you would find this:
How does it work internally ?
Time-frame functions do not change the BarCount - they just squeeze the arrays so you have first N-bars filled with NULL values and then - last part of the array contains the actual time-compressed values. This is why it is essential to expand the data back to the original frame with TimeFrameExpand. The following simple exploration shows what happens after you switch to a higher timeframe. Run Exploration on current symbol, all quotations, periodicity set to daily and you will see how "weekly close compressed" column contains empty values at the beginning and weekly compressed data at the end of array.
So first error - you are not using TimeFramExpand, while it is essential.
Second thing:
you write "I am using weekly bars"
Again - you skipped vital information from the manual (https://www.amibroker.com/guide/h_timeframe.html)
It says:
"Please note that you can only compress data from shorter interval to longer interval. So when working with 1-minute data you can compress to 2, 3, 4, 5, 6, ....N-minute data. But when working with 15 minute data you can not get 1-minute data bars. In a similar way if you have only EOD data you can not access intraday time frames."
You are trying the reverse - against the instructions.
That won't work.
You must use THE OTHER WAY ROUND.
Use DAILY BARS, and use TimeFrameSet to switch to weekly when needed.
Best regards,
Tomasz Janeczko
amibroker.com
OK, so the complete picture is:
I'm on a market where liquidity can be a problem. I want to filter out low liquidity stocks. So I don't want to check just if the volume was high enough on the last bar, I want to check few recent bars.
I'm checking both the average volume and lowest volume. The actual code goes like this
VolMA = MA(Volume * Close, 4);VolLow = LLV(Volume * Close, 8);hasVolume = VolLow > 100000 AND VolMA > 500000;
and then
BuySignal = someCondition AND hasVolume;
I'm using weekly bars. Checking weekly volume is problematic, because there are some weeks with less than 5 trading days, so the volume on "shorter" weeks is lower. For MA it's not that big deal, but for LLV threshold it could be distorting results.
So that's why I wanted to check lowest daily volume for the last 20 bars of so. Ideally I'd like to check something like "what is the 5 percentile of daily volume for given period", but for now I'd be more than happy with lowest value.
I got response off the list, that the problem is going from weekly to daily (and the TimeFrameSet doesn't work from lower to higher, only the other way around)
best
On Sat, Apr 16, 2016 at 8:25 PM, 'B. Pitatzidis' bobptz@gmail.com [amibroker] <amibroker@yahoogroups.com> wrote:
and thenIT_IS_A_LOW_VOL_DAY = (Volume * C ) = LLV(Volume * C, 20);Unless you say something like:Then you wantI do not see why you need LLV.
Buy = ... AND (Volume * C) > 10000)
Buy = ... AND IT_IS_A_LOW_VOL_DAY and (Volume * C) > 10000)
On Sat, Apr 16, 2016 at 9:17 PM, Marcin Jagodziński marcin.jagodzinski@gmail.com [amibroker] <amibroker@yahoogroups.com> wrote:
Sorry, my mistake. No, I don't want to find the date, I'd rather find the value (and then use it in Buy like Buy = ... AND VolLowDaily > 10000)
On Sat, Apr 16, 2016 at 7:57 PM, 'B. Pitatzidis' bobptz@gmail.com [amibroker] <amibroker@yahoogroups.com> wrote:
>>>
What I want to achieve is to find the day with lowest volume
<<<
VolLowDaily = LLV(Volume * C, 20);
This will find the lowest VOLUME*C (amount of money), but not the DATE, as you wish. Maybe you need to use VALUEWHEN to find the date?
So add to your code something like:
ValueWhen(Volume * C =VolLowDaily , datetime(), )
On Sat, Apr 16, 2016 at 8:29 PM, Marcin Jagodziński marcin.jagodzinski@gmail.com [amibroker] <amibroker@yahoogroups.com> wrote:
Yes, I've tried it, the result is the same.
On Sat, Apr 16, 2016 at 7:26 PM, 'B. Pitatzidis' bobptz@gmail.com [amibroker] <amibroker@yahoogroups.com> wrote:
HiI have never used "AddColumn" but let me give it a shot. Have you tried the TimeFrameExpand ?
TimeFrameSet(inDaily);VolLowDaily = LLV(Volume * C, 20);TimeFrameRestore();VolLowDaily = TimeFrameExpand(VolLowDaily,inDaily);
AddColumn(VolLowDaily, "VLD");
No, it's not THIS trivial, I was using Filter of course.
On Sat, Apr 16, 2016 at 7:03 PM, Alan alan@thenorthams.us [amibroker] <amibroker@yahoogroups.com> wrote:
Filter = 1;
TimeFrameSet(inDaily);VolLowDaily = LLV(Volume * C, 20);TimeFrameRestore();AddColumn(VolLowDaily, "VLD");
Hello everyone,
although I've read https://www.amibroker.com/guide/h_timeframe.html several times, I still have (probably pretty trivial) problem with TimeFrameSet.
What I want to achieve is to find the day with lowest volume (I'm using weekly bars for exploration). I've added this to my exploration
TimeFrameSet(inDaily);VolLowDaily = LLV(Volume * C, 20);TimeFrameRestore();
AddColumn(VolLowDaily, "VLD");
and I'm getting weird (high) values of VolLowDaily.
Anyone could tell me what I'm doing wrong?
best--
Marcin Jagodziński
--
Marcin Jagodziński
Posted by: Tomasz Janeczko <groups@amibroker.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (17) |
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
EmoticonEmoticon