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

Re: [amibroker] ignorance personified (or) why don't I get this stuff?



PureBytes Links

Trading Reference Links

Hi Paul,

It's not your fault of course.

I don't think we are going anywhere with the code below, however.  I
assume some typos, but maybe I assume too much.  (There is no
~11weeks, for example, I presume.)

But even after fixing what I think are typos, my output is shown in
the png.

I think the number of people who can use this program without going
back to university is dwindling by the day.  TJ ... do you hear me?

Very, very depressing.

Yuki

Monday, March 19, 2007, 9:18:48 PM, you wrote:

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

PH> ________________________________

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

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

PH>          


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

 
Best,

Yuki

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Transfer from your equities account.  
Receive up to $1,000 from GFT. Click here to learn more.
http://us.click.yahoo.com/aZttyC/X_xQAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Attachment: Snap1.png
Description: PNG image