Yuki
I'm sorry about the blow up. I feel somewhat responsible as it was my
untested idea.
I subsequently went and have a look. I think I now know what the problem is
Amibroker stores each bar with a date and time stamp. In daily or above,
there is no time, just dates. But in intraday databases, each bar has a date
and time stamp. This also applies to ATC. Each bar of the same date and time
value from every stock in the watchlist is added to the composite. In an
Esignal database, where closing stock prices are stamped with different time
will be added to a different bar even though they are of the same date.
What I first thought to be a problem is not really a problem for AB (because
of the same reason). The fix to your problem is really quite simple
First change your AFL so only the volume field of composites are used:
For example
---------------------------------------
TimeFrameSet(inDaily);
num = C > MA(C, 50);
AddToComposite(num, "~10weeksA", "V");
AddToComposite(1, "~10weeksB", "V");
TimeFrameRestore();
Buy = 0;
ratio = Foreign("~10weeks", "V")/Foreign("~11weeks", "V"); 
Plot(ratio, "ratio", colorRed, styleLine);
------------------------------------------------
Next, Set your Periodicity in your AA setting to Daily
And try it out on a small watchlist of say 20 stocks first.
And uncheck the Wait for backfill box.
The next action is important, make sure you change your pluggin status to
shutdown
So it no longer communicates with Esignal's data manager.
Run your Scan
The plot should come out as volume is the field that sums up all "intraday"
bars of the same date.
It works for me when I tested it.
Cheers
Paul.

________________________________

        From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of Yuki Taga
        Sent: Monday, 19 March 2007 3:30 PM
        To: Paul Ho
        Subject: Re: [amibroker] ignorance personified (or) why don't I get
this stuff?
        
        

        Hi Paul,
        
        I had no luck using the suggestions you kindly offered, and part of
        that is maybe simply because I don't completely understand them.
        
        I did manage to lock up AB (not responding state), and when I
finally
        closed the scan that was not responding (the big red X box), the
        program blew up (as in vaporized -- as in no longer running on my
        computer).
        
        This was using 1minute periodicity, trying the suggestions you made,
        which I almost assuredly misunderstood.
        
        So, I am one of these people who needs special guidance. I need
        Charlton Heston, or maybe TJ impersonating Charlton Heston, to come
        down from the mountain with specific instructions inscribed on stone
        tablets. Indeed, maybe I could get by without the stone tablets, but
        without the specificity, it seems I am just easy binary road kill,
        albeit tasty road kill -- let's not have any doubts about that.
        
        The hand signal, Paul. I need the secret hand signal. If it helps,
        I know that the "Meaning of Life" has been discovered, and that its
        value is 42. (Google tells me everything except how to program AB.)
        
        I'm hoping that this revelation of at least some of my own
        semi-secret knowledge (only known my me and anyone else with an
        Internet connection who can spell G-o-o-g-l-e) will get me the
secret
        hand signal that will, I pray, lead me to programming nirvana.
        
        In the meantime, I'm eyeing the short sword and thinking that this
        state of ignorance is simply too painful to bear.
        
        Thanks,
        
        Yuki
        
        Sunday, March 18, 2007, 9:05:39 PM, you wrote:
        
        PH> Yuki
        PH> if for instance you have 1000 daily bars, but in a intraday
database,
        PH> depending on your setting, you could have 100000 bars or more
        PH> even though you might have set periodicity to daily. the 1000
bars is being
        PH> mapped to that 100000 bar database, and i think thats why 
        PH> its causing some weird looking values
        PH> Though i haven't tried it myself. You could try this
        PH> timeframeset(indaily);
        PH> // your usual ATC code here
        PH> timeframerestore();
        PH> In your data retrieving code
        PH> do this instead
        PH> Num = foreign(~10weekMA%", "V");
        PH> Den = foreign((~10weekMA%", "I");
        PH> PercentageRising = timeframeexpand(Num,
indaily)/timeframeexpand(Den,
        PH> indaily);
        PH> //your plot statement.
        PH> make sure the periodicity in your AA setting is the same as your
database
        PH> intraday setting.
        PH> let me know if that works
        PH> cheers
        
        PH> _____ 
        
        PH> From: [email protected]
<mailto:amibroker%40yahoogroups.com> 
        PH> [mailto:[email protected]
<mailto:amibroker%40yahoogroups.com> ] On Behalf
        PH> Of Yuki Taga
        PH> Sent: Sunday, 18 March 2007 9:06 PM
        PH> To: [email protected]
<mailto:amibroker%40yahoogroups.com> 
        PH> Subject: [amibroker] ignorance personified (or) why don't I get
this stuff?
        
        PH> AB cognoscenti: (Franco, some Latin, maybe even Italian, for
you.)
        
        PH> For a long time, I have used a breadth indicator known to and
used by
        PH> many: (used intelligently, a darned-good breadth indicator)
        
        PH> Above10Week = C >= MA(C,50);
        
        PH> Buy = 0; // required -- does not generate signals
        
        PH> AddToComposite(Above10Week, "~10WeekMA%", "V" );
        
        PH> /* add one to open interest field (we use this field as a
counter) */
        
        PH> AddToComposite( 1, "~10WeekMA%", "I" );
        
        PH> PercentageRising = Foreign("~10WeekMA%", "V") /
Foreign("~10WeekMA%", "I") *
        PH> 100;
        
        PH> Plot(PercentageRising,"Pct. of stocks above 10 Wk
        PH> MA",colorBlack,styleLine,0,100,xshift=0);
        PH> Plot(MA(PercentageRising,8),"",colorOrange,styleLine);
        
        PH> PlotGrid(60, Color = colorDefault);
        PH> PlotGrid(40, Color = colorDefault);
        
        PH> Title = EncodeColor(colorBlack)+"Stocks above 10 week MA = "
        PH> +WriteVal(PercentageRising,1.1,separator=True)+"%";
        
        PH> Little old me, a code-challenged idiot, did this all by herself;
        PH> please try not to get a case of, as they said long ago in
England,
        PH> "the vapors".
        
        PH> This works wonderfully, as far as producing a chart goes, in my
EOD
        PH> databases. But try as I might ... I cannot get it to produce
        PH> anything other than "strange" in my eSignal database. Well,
"weird"
        PH> is other than "strange", but you get the idea. It's f*&[EMAIL 
PROTECTED], as
they
        PH> say in the vernacular. And I actually know what vernacular is,
too.
        
        PH> I have tried two things:
        
        PH> 1) making sure settings periodicity is "daily" (DUH!)
        
        PH> 2) adding code to set the time frame as daily for the first
line, and
        PH> then restoring it
        
        PH> Neither works. The chart output is still "strange, weird, or
even
        PH> 'on drugs'". ("This is your chart on opiates! Your chart is
        PH> ecstatic, but you are decidedly not.")
        
        PH> I have come to the conclusion (a no-brainer) that I am simply
        PH> incredibly stupid when it comes to this kind of thing, and
therefore,
        PH> that I must prostrate myself to those who know the secret
handshake,
        PH> or other Freemason-like rituals.
        
        PH> I promise not to reveal your secrets, should you deign to share
them
        PH> with me, and that I will commit ritual suicide (oh, it's a nasty
        PH> business that you don't want to know about) should you refuse.
Please
        PH> consider the unsightly mess that I am talking about, and kindly
take
        PH> mercy on my Japanese soul.
        
        PH> Best,
        
        PH> Yuki
        
        

         


Send instant messages to your online friends http://au.messenger.yahoo.com 

Reply via email to