PureBytes Links
Trading Reference Links
|
Bill,
Graham already presented the code and it is nice.
But I started to wonder if it wouldn't be easier for you to use
Foreign/Ref function instead. I mean instead of creating artificial ticker
and then using it somewhere else
use
Dummy = Ref( Foreign("Original Security", "C" ), -1 );
in the *final* indicator you want to create.
To change the last day data simply use:
Dummy = Ref( Foreign("Original Security", "C" ), -1 );
Dummy = IIF( Cum(1) == LastValue( Cum(1) ), FINALDAYVALUE, Dummy );
(in most recent version 4.28 it can be also coded using BarIndex() :)
Dummy = IIF( BarIndex() == LastValue( BarIndex() ), FINALDAYVALUE, Dummy );
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: <wbarack@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, February 04, 2003 9:30 PM
Subject: [amibroker] Creating an artifical security.
> Help! I want to be able to create a security that has all data
> shifted back in time by one day and then be able to put in my best
> guess for the final day's data.
>
> Shifting can be done, I think, using the ref function.
>
> Dummy = ref(original security,-1)
>
> But how can I plug in the final days data. I can't quite figure that
> one out. Any great ideas out there?
>
> Bill
>
>
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>
> Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|