PureBytes Links
Trading Reference Links
|
Neat
code Graham!
<FONT face=Arial color=#0000ff
size=2>
Now
lets say I'd like figure out what price for tomorrow (today in the composite,
right?) would cause a buy signal. How can I initialize that price and vary it by
.01 up or down until I get a buy or another signal?
<FONT face=Arial color=#0000ff
size=2>
That
would be soooo very neat!!
<FONT face=Arial color=#0000ff
size=2>
<FONT face=Arial color=#0000ff
size=2>d
<FONT
face=Tahoma size=2>-----Original Message-----From: Graham
[mailto:gkavanag@xxxxxxxxxxxxxx] Sent: Tuesday, February 04, 2003
4:02 PMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE:
[amibroker] Creating an artifical security.
<SPAN lang=EN-AU
>Try this to create composite with the last day just
being equal to previous close price and zero volume. Quote editor will allow
to enter the numbers.
<SPAN lang=EN-AU
>
<SPAN
lang=EN-AU
>// CREATE
COMPOSITE WITH LAST DAY NOT ENTERED
<SPAN
lang=EN-AU
>//USE SCAN
BUTTON TO CREATE COMPOSITE, THEN QUOTE EDITOR TO ENTER THE LAST Day
MANUALLY
<SPAN
lang=EN-AU
>
<SPAN lang=EN-AU
>O<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
> =
<SPAN lang=EN-AU
>IIf<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>DateNum<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>()==<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>LastValue<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>DateNum<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>()),<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>Ref<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>C<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,-<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>1<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>),<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>O<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>);
<SPAN lang=EN-AU
>H<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
> =
<SPAN lang=EN-AU
>IIf<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>DateNum<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>()==<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>LastValue<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>DateNum<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>()),<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>Ref<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>C<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,-<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>1<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>),<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>H<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>);
<SPAN lang=EN-AU
>L<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
> =
<SPAN lang=EN-AU
>IIf<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>DateNum<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>()==<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>LastValue<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>DateNum<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>()),<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>Ref<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>C<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,-<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>1<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>),<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>L<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>);
<SPAN lang=EN-AU
>C<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
> =
<SPAN lang=EN-AU
>IIf<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>DateNum<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>()==<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>LastValue<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>DateNum<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>()),<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>Ref<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>C<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,-<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>1<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>),<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>C<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>);
<SPAN lang=EN-AU
>V<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
> =
<SPAN lang=EN-AU
>IIf<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>DateNum<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>()==<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>LastValue<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=blue size=2><SPAN lang=EN-AU
>DateNum<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>()),<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>0<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>V<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>);
<SPAN
lang=EN-AU
>
<SPAN
lang=EN-AU
>//Automatic
inclusion of ticker code
<SPAN
lang=EN-AU
>xyz =
<SPAN lang=EN-AU
>"~"<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
> +
<SPAN lang=EN-AU
>Name<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>();
<SPAN
lang=EN-AU
>
<SPAN lang=EN-AU
>Buy<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>=<FONT
face="Courier New" color=fuchsia size=2><SPAN lang=EN-AU
>0<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>;
<SPAN lang=EN-AU
>AddToComposite<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>H<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,xyz,<FONT
face="Courier New" color=#cc4466 size=2><SPAN lang=EN-AU
>"H"<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>);
<SPAN lang=EN-AU
>AddToComposite<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>L<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,xyz,<FONT
face="Courier New" color=#cc4466 size=2><SPAN lang=EN-AU
>"L"<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>);
<SPAN lang=EN-AU
>AddToComposite<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>O<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,xyz,<FONT
face="Courier New" color=#cc4466 size=2><SPAN lang=EN-AU
>"O"<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>);
<SPAN lang=EN-AU
>AddToComposite<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>C<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,xyz,<FONT
face="Courier New" color=#cc4466 size=2><SPAN lang=EN-AU
>"C"<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>);
<SPAN lang=EN-AU
>AddToComposite<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>(<FONT
face="Courier New" color=red size=2><SPAN lang=EN-AU
>V<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>,xyz,<FONT
face="Courier New" color=#cc4466 size=2><SPAN lang=EN-AU
>"V"<FONT
face="Courier New" color=black size=2><SPAN lang=EN-AU
>);
<SPAN
lang=EN-AU
>
<SPAN lang=EN-AU
>
<SPAN lang=EN-AU
>Cheers,
<SPAN lang=EN-AU
>Graham
<SPAN lang=EN-AU
>
<SPAN lang=EN-AU
>
<SPAN
>-----Original Message-----From: BillBarack
<wbarack@xxxxxxxxx> [mailto:wbarack@xxxxxxxxx] Sent: Wednesday, 5
February 2003 4:30 AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker]
Creating an artifical security.
<SPAN lang=EN-AU
>
<SPAN lang=EN-AU
>Help! I want to be able to create a security that has
all data
<SPAN lang=EN-AU
>shifted back in time by one day and then be able to
put in my best
<SPAN lang=EN-AU
>guess for the final day's data.
<SPAN lang=EN-AU
>
<SPAN lang=EN-AU
>Shifting can be done, I think, using the ref
function.
<SPAN lang=EN-AU
>
<SPAN lang=EN-AU
>Dummy = ref(original security,-1)
<SPAN lang=EN-AU
>
<SPAN lang=EN-AU
>But how can I plug in the final days data. I can't
quite figure that
<SPAN lang=EN-AU
>one out. Any great ideas out there?
<SPAN lang=EN-AU
>
<SPAN lang=EN-AU
>Bill
<SPAN lang=EN-AU
>
<SPAN lang=EN-AU
>
<SPAN lang=EN-AU
>Post AmiQuote-related messages ONLY to:
amiquote@xxxxxxxxxxxxxxx
<SPAN lang=EN-AU
>(Web page:
http://groups.yahoo.com/group/amiquote/messages/)
<SPAN lang=EN-AU
>
<SPAN lang=EN-AU
>Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
<SPAN lang=EN-AU
>
<SPAN lang=EN-AU
>Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
<SPAN lang=EN-AU
> Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the <A
href="">Yahoo! Terms of Service.
Yahoo! Groups Sponsor
ADVERTISEMENT
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 the Yahoo! Terms of Service.
|