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

Re: [amibroker] Re: How stupid can I be???



PureBytes Links

Trading Reference Links

Tom,

TJ would know if this was an eSignal thing, I think ...

I don't actually use PM or AM in coding, and I think people argue
about whether 12 noon is AM or PM, anyway.  ^_-

If anyone can figure this out, it seems likely it will have to be TJ.

It's clearly a one-minute database.  It updates one-minute charts in
real time when the market is open.  And that data is saved, and
always available for viewing in various timeframes.  I just can't
isolate entries by time of day, which is a big thing not to be able
to do on an intraday database.

Yuki

Thursday, February 8, 2007, 6:42:03 PM, you wrote:



i> What about define AM trade as timenum()<=113200 and PM trade as 
i> timenum()>=114500, avoid using 12am or 12pm , in this way I backtest 
i> East Asia markets without problem.  

i> Or since I use IB datafeed,not sure if it is due to the esignal data 
i> you are using, what about saving esignal data in text format and 
i> import into Amibroker again to backtest. This is the last guess£¯
i> try  I am capable of. / Tom


i> --- In amibroker@xxxxxxxxxxxxxxx, Yuki Taga <yukitaga@xxx> wrote:
>>
>> Hi Tom,
>> 
>> Didn't change anything, sadly, but thanks for the try.
>> 
>> I did wonder what settings might work there, and have tried 
i> several.
>> One thing I haven't tried yet is to establish the AM session as the
>> "Day Session" (9 to 11 AM) and the PM session as the "Evening
>> Session" (12:30 to 3 PM).  But I'll wait and see what others say
>> about this.
>> 
>> It's also not the appending of the Timenum() line to the Buy
>> statement that causes problems.  I get no trades with or without 
i> that
>> line when I set periodicity to 1 minute.
>> 
>> But I do have an eSignal database, and it is one-minute bars.  ^_^
>> 
>> I am appalled that I cannot do this without external help.  This is
>> simply a first step of course; eventually I'd like a little more 
i> (is
>> the word "granularity") in my testing (first hour, second hour, 
i> last
>> hour, etc.).
>> 
>> Yuki
>> 
>> Thursday, February 8, 2007, 6:15:17 PM, you wrote:
>> 
>> t> Hi
>> 
>> t> In database setting, try " show day session only", instead 
i> of "show 24 hours trading"
>> 
>> t> Tom
>> 
>> 
>> t>   ----- Original Message ----- 
>> t>   From: Yuki Taga 
>> t>   To: Tomasz Janeczko 
>> t>   Sent: Thursday, February 08, 2007 4:48 PM
>> t>   Subject: Re: [amibroker] How stupid can I be???
>> 
>> 
>> t>   Hi Tomasz,
>> 
>> t>   I don't know what to say. It doesn't work.
>> 
>> t>   Your assumption 1 is correct, I believe: see the
>> t>   IntradaySettings.png.
>> 
>> t>   Your assumption 2 is *absolutely* correct. In fact, I do not 
i> exit
>> t>   same day, anyway (unless I override, which I rarely do). Here 
i> is my
>> t>   exit:
>> 
>> t>   ApplyStop( stopTypeNBar, stopModeBars, delay, True, False );
>> 
>> t>   I have had this code a long time, and RT results and trading 
i> results
>> t>   are never off by even one single yen -- other than fast-
i> market trade
>> t>   entry miss or something like that. But it is accurate, 
i> realistic,
>> t>   and works -- the code I mean. But I cannot, using my eSignal
>> t>   one-minute database, isolate AM and PM entries. I have tried, 
i> on my
>> t>   own, to do this FOREVER, and I cannot do it.
>> 
>> t>   All I do is two things (other than what I would do with my 
i> master EOD
>> t>   database):
>> 
>> t>   1) Change periodicity to 1 minute (see file)
>> 
>> t>   2) Append 'AND Timenum() <= 120000;' to the end of the Buy 
i> statement.
>> 
>> t>   Then I backtest.
>> 
>> t>   But I generally get *no* trades as a result when I backtest 
i> after
>> t>   doing this. For example, using either last n days = 2, or 
i> using From
>> t>   2/7/2007 To 2/8/2007, I get no trades. That's wrong. There 
i> were
>> t>   four signals, three yesterday and one today. One of the 
i> trades on
>> t>   2/7 (yesterday) was at about 9:30 AM. I didn't dream it.
>> 
>> t>   Looking back, say, 100 bars, where I would have dozens and 
i> dozens of
>> t>   trades, I get maybe 4 to show up. That's not realistic. It's 
i> flat
>> t>   out way wrong. I know from years of experience most of my 
i> entries
>> t>   come in the AM session. Off hand, I'd say it's 2-1 or higher.
>> t>   Naturally, now that I am accumulating a longer and longer 
i> intraday
>> t>   database, I'd like to isolate these instances and test them.
>> 
>> t>   I cannot.
>> 
>> t>   Using the RT database in daily mode (with periodicity set at 
i> daily),
>> t>   there is no problem backtesting. But of course I'm *not* able 
i> to
>> t>   isolate signals by using Timenum() that way. Not that I can 
i> isolate
>> t>   them in any case, mind you.
>> 
>> t>   This is, to say the least, excruciatingly frustrating for me. 
i> I
>> t>   don't believe I am completely stupid, obviously, and I cannot 
i> see why
>> t>   this (apparently) simple little thing will not work for me.
>> 
>> t>   This is the *reason* I bought the RT version of AB years ago, 
i> and why
>> t>   I started subscribing to eSignal immediately when it became 
i> available
>> t>   in Japan. And on top of that, I knew the first few years of
>> t>   subscription would only serve to build up a database, and 
i> that I
>> t>   could not do realistic intraday testing until I had sufficient
>> t>   instances and data to draw reasonably valid conclusions from.
>> 
>> t>   I want to throw up now. ^_^
>> 
>> t>   Yuki
>> 
>> t>   Thursday, February 8, 2007, 4:45:56 PM, you wrote:
>> 
>> t>   TJ> Yuki,
>> 
>> t>   TJ> You code is correct assuming that
>> t>   TJ> 1. You don't use time shift (File->Database Settings-
>>Intraday Settings)
>> t>   TJ> 2. You mean that your ENTRY is limited to AM session
>> t>   TJ> (the code cares only about Buy signal, it does not limit 
i> you from
>> t>   TJ> exiting later in the PM session, you would need to write
>> t>   TJ> condition for EXIT to close positions before 12 PM.
>> 
>> t>   TJ> Best regards,
>> t>   TJ> Tomasz Janeczko
>> t>   TJ> amibroker.com
>> t>   TJ> ----- Original Message ----- 
>> t>   TJ> From: "Yuki Taga" <yukitaga@xxx>
>> t>   TJ> To: <amibroker@xxxxxxxxxxxxxxx>
>> t>   TJ> Sent: Thursday, February 08, 2007 5:13 AM
>> t>   TJ> Subject: [amibroker] How stupid can I be???
>> 
>> t>   >> This program really makes me feel like an idiot sometimes. 
i> But this
>> t>   >> idiot mops up tens of millions of yen annually from the 
i> local equity
>> t>   >> market, so she can't be *that* stupid. Right?
>> t>   >> 
>> t>   >> Nonetheless:
>> t>   >> 
>> t>   >> I am trying to add what -- I (probably stupidly) think -- 
i> should be a
>> t>   >> simple qualifier to existing, known-good code.
>> t>   >> 
>> t>   >> Simply, we have two sessions in Tokyo, AM & PM. Since 
i> *nothing* ever
>> t>   >> trades at exactly 12 PM (market is closed), I used that 
i> for the
>> t>   >> divider.
>> t>   >> 
>> t>   >> Buy = (all my secret Rocky The Flying Squirrel stuff) AND 
i> Timenum()
>> t>   >> <= 120000;
>> t>   >> 
>> t>   >> Backtesting with an interval setting of one minute *must* 
i> show *only*
>> t>   >> AM trades. Right? Wrong? Do I need neurosurgery? Do I need 
i> a whap
>> t>   >> on the head with a Whack-A-Mole mallet?
>> t>   >> 
>> t>   >> (BTW, Whack-A-Mole is *extremely* popular in Tokyo, but we 
i> call it
>> t>   >> something else, of course. I'm trying to get it called
>> t>   >> "Whack-A-Politician" -- little Abe-san heads would pop up -
i> - but I'm
>> t>   >> not having much success, despite his plummeting 
i> popularity.)
>> t>   >> 
>> t>   >> Can anyone fix my personal, intra-cranial neural network? 
i> If anyone
>> t>   >> could help "girl genius" here, she'd be very appreciative.
>> t>   >> 
>> t>   >> My best Bullwinkle The Moose voice: "This time for *sure*!"
>> t>   >> 
>> t>   >> Yuki
>> t>   >> 
>> t>   >> 
>> t>   >> 
>> t>   >> Please note that this group is for discussion between 
i> users only.
>> t>   >> 
>> t>   >> To get support from AmiBroker please send an e-mail 
i> directly to 
>> t>   >> SUPPORT {at} amibroker.com
>> t>   >> 
>> t>   >> For NEW RELEASE ANNOUNCEMENTS and other news always check 
i> DEVLOG:
>> t>   >> http://www.amibroker.com/devlog/
>> t>   >> 
>> t>   >> For other support material please check also:
>> t>   >> http://www.amibroker.com/support.html
>> t>   >> 
>> t>   >> Yahoo! Groups Links
>>



 
Best,

Yuki


Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.17.30/674 - Release Date: 2/7/2007 3:33 PM