PureBytes Links
Trading Reference Links
|
Both Graham and Nathan, I took me some time to figure out why this
excellent idea doesn't work. It all applies to an options database
and details would make a dreary read. It boils down to this:
Symbols with no activity or price-change are not reported (data hole
in ASCII import).
IIf statement in ATC is a selector: there are
Symbols_I_do_wanna_count and Symbols_I_do_NOT_wanna_count.
Say I want to add up combined Open Interest:
AddToComposite( IIf(Symbol_I_do_wanna_count, OI, Null), .....
Now on a certain date, *NONE* of the Symbols_I_do_wanna_count have
data provided (all have data hole). However some of the
Symbols_I_do_NOT_wanna_count *DO* have data. When ATC hits one of
those, it immediately creates a value for that day, and not Null as
expected, but zero.
I need Null for Foreign to fixup the data hole (OI hasn't actually
changed). I cannot manipulate Foreign into fixing all zero values
because some days combined OI actually *IS* zero.
Y'see that if I'd use -ve or other out-of-range value instead, that
would distort the calculation on regular days, because it would add -
ve for every Symbol_I_do_NOT_wanna_count.
Whacky problem, thnx again for thinking along.
Meanwhile got the idea to incorporate IsNull() data hole check in ATC
itself, but it feels like a slippery slope. Would much prefer ATC to
simply generate Null value on command.
Any additional ideas welcome.
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
>
> Perthaps a negative value instead of the zero, of course depends if
> you get -ve normally
> Or an extrordinary large negative number, like -10000000
> Then substitute when you are reading te composite
>
>
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
>
>
> On 1/23/06, treliff <treliff@xxxx> wrote:
> > Good call Nathan, but nope that won't do it for me. Point is that
> > there are "genuine" zero values in the resulting ATC ticker that I
> > would NOT want converted to Null (the example I gave was just a
dummy
> > to illustrate the challenge).
> >
> > --- In amibroker@xxxxxxxxxxxxxxx, "WALTON, Nathan"
> > <nathan.walton@xxxx> wrote:
> > >
> > > After calling Foreign:
> > >
> > > eg
> > >
> > >
> > >
> > > x = Foreign("~nulltest", "O");
> > >
> > >
> > >
> > > Can you simply use:
> > >
> > >
> > >
> > > x = iif(x == 0, Null, x);
> > >
> > >
> > >
> > > This will substitute Null values for '0's
> > >
> > > ________________________________
> > >
> > > From: amibroker@xxxxxxxxxxxxxxx
[mailto:amibroker@xxxxxxxxxxxxxxx]
> > On
> > > Behalf Of treliff
> > > Sent: Monday, 23 January 2006 11:32 AM
> > > To: amibroker@xxxxxxxxxxxxxxx
> > > Subject: [amibroker] Re: How can AddToComposite generate Null
> > values?
> > >
> > >
> > >
> > > Thanks Graham, but that doesn't work. When I use 0 (zero) then
ATC
> > > creates zero value as expected, but I need it to create empty
> > (Null)
> > > value.
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx>
wrote:
> > > >
> > > > use 0 instead of null
> > > >
> > > >
> > > > --
> > > > Cheers
> > > > Graham
> > > > AB-Write >< Professional AFL Writing Service
> > > > Yes, I write AFL code to your requirements
> > > > http://e-wire.net.au/~eb_kavan/ab_write.htm
> > > >
> > > >
> > > > On 1/23/06, treliff <treliff@xxxx> wrote:
> > > > > When I run a dummy-scan like
> > > > >
> > > > > AddToComposite( IIf( DayOfWeek() == 5, Null,
> > > 1) , "~nulltest" , "X");
> > > > >
> > > > > this results in Friday's values zero (instead of Null or
> > > {empty} ).
> > > > >
> > > > > Point is I need my ATC to generate values that will be
> > recognized
> > > by
> > > > > Foreign function as "fixup candidates".
> > > > >
> > > > > I have tried instead
> > > > >
> > > > > AddToComposite( IIf( DayOfWeek() == 5, 1/0,
> > > 1) , "~nulltest" , "X");
> > > > >
> > > > > and this generates Infiniti values:
> > > > >
> > > > > 1.#INF
> > > > >
> > > > > however it seems these are not considered for Foreign fixup.
> > > > >
> > > > > Any advice will be gratefully received. TIA.
> > > > >
> > > > > -treliff
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > 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 other support material please check also:
> > > > > http://www.amibroker.com/support.html
> > > > >
> > > > >
> > > > > Yahoo! Groups Links
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > 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 other support material please check also:
> > > http://www.amibroker.com/support.html
> > >
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > >
> > > YAHOO! GROUPS LINKS
> > >
> > >
> > >
> > > * Visit your group "amibroker
> > > <http://groups.yahoo.com/group/amibroker> " on the web.
> > >
> > > * To unsubscribe from this group, send an email to:
> > > amibroker-unsubscribe@xxxxxxxxxxxxxxx
> > > <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?
subject=Unsubscribe>
> > >
> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms
of
> > > Service <http://docs.yahoo.com/info/terms/> .
> > >
> > >
> > >
> > > ________________________________
> > >
> >
> >
> >
> >
> >
> >
> >
> >
> > 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 other support material please check also:
> > http://www.amibroker.com/support.html
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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 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/
<*> 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/
|