PureBytes Links
Trading Reference Links
|
Couldn't let it beat me!
Possibly you could import long ticker lists, to the ParamList via the
file functions - haven't tried that part.
I don't like the way AB compresses padded daily view to weekly -
unless I am missing something and there is another way to code it.
The easiest way to use it is to select the ref symbol as the current
chart view and then use the param list to view any other symbol in
padded mode.
/*
Nominate a data padding reference symbol in AA settings.
Right click on the chart and select a ticker from the parameter
options.
Then select the same symbol, from the Workspace list, to view it
normally
OR select any other symbol from the Workspace list to view the
original selection in
padded mode.
Daily or Weekly view functions as usual, in padded mode, except that
any week containing a padded daily bar will compress the padded bars
selectively and not in total.
*/
Select = ParamToggle("PadData","No|Yes",1);
Ticker = ParamList("Tickers","^DJI|A|CAT",0);
SetForeign(Ticker, Select);
Plot(C, "SetForeign" + " - " + Ticker, colorRed, styleBar );
RestorePriceArrays(Select);
--- In amibroker@xxxxxxxxxxxxxxx, "brian_z111" <brian_z111@xxx> wrote:
>
> It would be easier if you could get rid of the need to use
> TimeFrameSet and also avoid having to manually enter symbols.
>
> I made a start on something ... not happy with it but you might as
> well have it.
>
> I was trying to get it so that I could view daily bars normally and
> then weekly bars fixed up (and easily change between).
>
> I downloaded 15 bars, for 3 tickers, from Yahoo (^DJI,A,CAT) and
then
> deleted quotes from A (a thursay, friday and monday quote in the
> middle of the database).
>
> Open a new default blank chart and insert.
>
> Select = ParamToggle("SelectPad","True|False",0);
> SetForeign("A", Select);
> Plot(C, "SetForeign", colorRed, styleBar );
> RestorePriceArrays(Select)
>
> If I click on "A" I can view daily bars (not fixedup) == 12 bars
> If I click on any other symbol then Foreign "A" plots with fixup
bars
> in place OR if I use parameters to toggle True|False then I can
> see "A", in daily view, with white space where the missing quotes
> are ... changing to weekly, using the chart icons, gives me a fixed
> up weekly chart.
>
> It might be useful if you can find a way to use paramlist, or some
> other AFL list, so you can right click/parameters to select any
> symbol as Foreign instead of typing in code (assuming you want to
> scroll through a watch list).
>
> brian_z
>
>
>
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "whitneybroach" <WhitneyBroach@>
> wrote:
> >
> > Yeah, a data hole is a data hole.
> >
> > I ran TimeFrameSet( inWeekly) and gave it Foreign( sym, "close",
> fixup
> > = 2 ) and the gap is gone.
> >
> > Thanks again.
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "brian_z111" <brian_z111@>
wrote:
> > >
> > > I am just talking about the easy way out.
> > >
> > > No matter what you do you can't get an accurate indicator out
of
> > > missing data anyway.
> > >
> > >
> > > If you SetForeign, fixup == true, then missing daily bars will
be
> > > filled with previous OHLC etc ... you could just run a separate
> > > window for Weekly view with SetForeign in use.
> > >
> > > If you still need a way to view daily or weekly in the same
> window
> > > then there might be a code solution.
> > >
> > >
> > > brian_z
> > >
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, "whitneybroach"
> <WhitneyBroach@>
> > > wrote:
> > > >
> > > > Thanks. Will try that.
> > > >
> > > > --- In amibroker@xxxxxxxxxxxxxxx, "brian_z111" <brian_z111@>
> wrote:
> > > > >
> > > > > I seem to recall playing around with something along those
> lines
> > > a
> > > > > long time ago in a land far far away (not certain about it
> now).
> > > > >
> > > > > SetForeign(Fixup) will use prev days OHLC to fill holes....
I
> > > believe
> > > > > it uses reference symbol nominated in the AA settings.
> > > > >
> > > > > Requires a reference symbol with data on all trading days -
> if
> > > the
> > > > > market was suspended then you need to make an artificial
> calendar
> > > > > ticker OR manually add data to missing calendar days on the
> > > reference
> > > > > symbol.
> > > > >
> > > > > There was dicussion on creating calendar day tickers -
> someone
> > > posted
> > > > > some code - it can be done in excel and then imported via
> ASCII.
> > > > >
> > > > >
> > > > >
> > > > > brian_z
> > > > >
> > > > >
> > > > > --- In amibroker@xxxxxxxxxxxxxxx, "whitneybroach"
> > > <WhitneyBroach@>
> > > > > wrote:
> > > > > >
> > > > > > Hmmm, no ideas?
> > > > > >
> > > > > > --- In amibroker@xxxxxxxxxxxxxxx, "whitneybroach"
> > > <WhitneyBroach@>
> > > > > > wrote:
> > > > > > >
> > > > > > > Due to the 9/11 markets interruption, daily bars were
> missing
> > > > > several
> > > > > > > days in a row. 9/10 and then 9/17 appear consecutive
in
> many
> > > > > series.
> > > > > > >
> > > > > > > Switching a chart from daily to weekly bars causes
> indicators
> > > to
> > > > > fail
> > > > > > > at that part of the chart. A version of the
WilliamsAD,
> for
> > > > > example,
> > > > > > > goes to zero. Others drop radically. I suppose some
> rise to
> > > > > infinity.
> > > > > > >
> > > > > > > I have not noticed this when switching to monthly bars.
> > > > > > >
> > > > > > > Of course 9/11 is not the only possible multi-day
market
> > > > > interruption
> > > > > > > that could affect weekly versions of indicators.
> > > > > > >
> > > > > > > Aside from a change in how AB handles the conversion
from
> > > daily to
> > > > > > > weekly bars, does anyone have ideas for elegant AFL
that
> can
> > > keep
> > > > > > > indicators sane? A general solution that is simple,
does
> > > *not*
> > > > > check
> > > > > > > for specific historical dates, and works only when the
> chart
> > > > > interval
> > > > > > > is set to weekly?
> > > > > > >
> > > > > > > I apologize if this is already documented elsewhere. I
> did
> > > not
> > > > > see
> > > > > > > a solution with quick searches of "9/11" or "September
> 2001"
> > > in
> > > > > Yahoo
> > > > > > > or in the code library. I found this with potentially
> useful
> > > > > > > functions, but I wonder if its ideas can be made to
work
> when
> > > the
> > > > > > > interval is weekly:
> > > > > > <http://www.amibroker.com/library/formula.php?id=223>
> > > > > > >
> > > > > > > Best regards,
> > > > > > > Whitney
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
------------------------------------
**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
*********************
TO GET TECHNICAL 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/
|