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

RE: [amibroker] Creating an artifical security.



PureBytes Links

Trading Reference Links










My code just removes the last bar, but if
you are backtesting s system against an indicator, why not use param function
to vary the OHLC etc. Next step would be to use that to look at tomorrows prics.
Now if I could figure a way to create a composite with tomorrows prices
included, then a composite of that witout tomorrows prices, then with the param
you could fiddle away, then use the alertif() when you get it right. Next would
be to be able to instead of just backtesting on previous data would be for
Tomasz to actually build in the ability to go back one day (or one week, whatever)
so that we could test the system, return to the start of the trend and place
the order in real life. Hey, if they can do it in Back to the Future movie why
not in Amibroker <span
>J

 





<span
>Cheers,

<span
 >Graham





 

<span
>-----Original Message-----
From: dingo
[mailto:dingo@xxxxxxxxxx] 
Sent: Wednesday, 5 February 2003
6:33 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Creating
an artifical security.

<font size=3
face="Times New Roman"> 



<font size=2 color=blue
face=Arial>Neat
code Graham!





<font size=2
face="Times New Roman"> 





<font size=2 color=blue
face=Arial>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 size=2
face="Times New Roman"> 





<font size=2 color=blue
face=Arial>That
would be soooo very neat!!





<font size=2
face="Times New Roman"> 





<font size=2 color=blue
face=Arial>d





-----Original Message-----
From: Graham
[mailto:gkavanag@xxxxxxxxxxxxxx] 
Sent: Tuesday, February 04, 2003
4:02 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: 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
> 

<font size=2 color=green
face="Courier New">// CREATE COMPOSITE WITH LAST DAY NOT ENTERED 

<font size=2 color=green
face="Courier New">//USE SCAN BUTTON TO CREATE COMPOSITE, THEN QUOTE EDITOR TO ENTER
THE LAST Day MANUALLY

<font size=3
face="Times New Roman"> 

<font size=2 color=red
face="Courier New">O<span
lang=EN-AU > = <font
size=2 color=blue face="Courier New">IIf<font size=2
color=black face="Courier New">(<font size=2 color=blue
face="Courier New">DateNum<span
lang=EN-AU >()==<font
size=2 color=blue face="Courier New">LastValue<font size=2
color=black face="Courier New">(<font size=2 color=blue
face="Courier New">DateNum<span
lang=EN-AU >()),<font
size=2 color=blue face="Courier New">Ref<font size=2
color=black face="Courier New">(<font size=2 color=red
face="Courier New">C<span
lang=EN-AU >,-<font
size=2 color=fuchsia face="Courier New">1<font size=2
color=black face="Courier New">),<font size=2 color=red
face="Courier New">O<span
lang=EN-AU >);

<font size=2 color=red
face="Courier New">H<span
lang=EN-AU > = <font
size=2 color=blue face="Courier New">IIf<font size=2
color=black face="Courier New">(<font size=2 color=blue
face="Courier New">DateNum<span
lang=EN-AU >()==<font
size=2 color=blue face="Courier New">LastValue<font size=2
color=black face="Courier New">(<font size=2 color=blue
face="Courier New">DateNum<span
lang=EN-AU >()),<font
size=2 color=blue face="Courier New">Ref<font size=2
color=black face="Courier New">(<font size=2 color=red
face="Courier New">C<span
lang=EN-AU >,-<font
size=2 color=fuchsia face="Courier New">1<font size=2
color=black face="Courier New">),<font size=2 color=red
face="Courier New">H<span
lang=EN-AU >);

<font size=2 color=red
face="Courier New">L<span
lang=EN-AU > = <font
size=2 color=blue face="Courier New">IIf<font size=2
color=black face="Courier New">(<font size=2 color=blue
face="Courier New">DateNum<span
lang=EN-AU >()==<font
size=2 color=blue face="Courier New">LastValue<font size=2
color=black face="Courier New">(<font size=2 color=blue
face="Courier New">DateNum<span
lang=EN-AU >()),<font
size=2 color=blue face="Courier New">Ref<font size=2
color=black face="Courier New">(<font size=2 color=red
face="Courier New">C<span
lang=EN-AU >,-<font
size=2 color=fuchsia face="Courier New">1<font size=2
color=black face="Courier New">),<font size=2 color=red
face="Courier New">L<span
lang=EN-AU >);

<font size=2 color=red
face="Courier New">C<span
lang=EN-AU > = <font
size=2 color=blue face="Courier New">IIf<font size=2
color=black face="Courier New">(<font size=2 color=blue
face="Courier New">DateNum<span
lang=EN-AU >()==<font
size=2 color=blue face="Courier New">LastValue<font size=2
color=black face="Courier New">(<font size=2 color=blue
face="Courier New">DateNum<span
lang=EN-AU >()),<font
size=2 color=blue face="Courier New">Ref<font size=2
color=black face="Courier New">(<font size=2 color=red
face="Courier New">C<span
lang=EN-AU >,-<font
size=2 color=fuchsia face="Courier New">1<font size=2
color=black face="Courier New">),<font size=2 color=red
face="Courier New">C<span
lang=EN-AU >);

<font size=2 color=red
face="Courier New">V<span
lang=EN-AU > = <font
size=2 color=blue face="Courier New">IIf<font size=2
color=black face="Courier New">(<font size=2 color=blue
face="Courier New">DateNum<span
lang=EN-AU >()==<font
size=2 color=blue face="Courier New">LastValue<font size=2
color=black face="Courier New">(<font size=2 color=blue
face="Courier New">DateNum<span
lang=EN-AU >()),<font
size=2 color=fuchsia face="Courier New">0<font size=2
color=black face="Courier New">,<font size=2 color=red
face="Courier New">V<span
lang=EN-AU >);

<font size=3
face="Times New Roman"> 

<font size=2 color=green
face="Courier New">//Automatic inclusion of ticker code

<font size=2 color=black
face="Courier New">xyz =  <font size=2 color="#cc4466"
face="Courier New">"~"<font size=2 color=black
face="Courier New"> + <span
lang=EN-AU >Name<font
size=2 color=black face="Courier New">();

<font size=3
face="Times New Roman"> 

<font size=2 color=red
face="Courier New">Buy<span
lang=EN-AU >=<font
size=2 color=fuchsia face="Courier New">0<font size=2
color=black face="Courier New">;

<font size=2 color=blue
face="Courier New">AddToComposite<font size=2 color=black
face="Courier New">(<span
lang=EN-AU >H<font
size=2 color=black face="Courier New">,xyz,<font size=2
color="#cc4466" face="Courier New">"H"<font
size=2 color=black face="Courier New">);

<font size=2 color=blue
face="Courier New">AddToComposite<font size=2 color=black
face="Courier New">(<span
lang=EN-AU >L<font
size=2 color=black face="Courier New">,xyz,<font size=2
color="#cc4466" face="Courier New">"L"<font
size=2 color=black face="Courier New">);

<font size=2 color=blue
face="Courier New">AddToComposite<font size=2 color=black
face="Courier New">(<span
lang=EN-AU >O<font
size=2 color=black face="Courier New">,xyz,<font size=2
color="#cc4466" face="Courier New">"O"<font
size=2 color=black face="Courier New">);

<font size=2 color=blue
face="Courier New">AddToComposite<font size=2 color=black
face="Courier New">(<span
lang=EN-AU >C<font
size=2 color=black face="Courier New">,xyz,<font size=2
color="#cc4466" face="Courier New">"C"<font
size=2 color=black face="Courier New">);

<font size=2 color=blue
face="Courier New">AddToComposite<font size=2 color=black
face="Courier New">(<span
lang=EN-AU >V<font
size=2 color=black face="Courier New">,xyz,<font size=2
color="#cc4466" face="Courier New">"V"<font
size=2 color=black face="Courier New">);

<font size=3
face="Times New Roman"> 

<span
> 

<span
lang=EN-AU >Cheers,

<span
lang=EN-AU >Graham

<span
> 

<span
> 

<span
>-----Original Message-----
From: BillBarack <wbarack@xxxxxxxxx> [mailto:wbarack@xxxxxxxxx] 
Sent: Wednesday, 5 February 2003 4:30 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Creating an artifical security.

<span
> 

<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
> 

<span
lang=EN-AU >Shifting can be done, I think, using the
ref function.

<span
> 

<span
lang=EN-AU >Dummy = ref(original security,-1)

<span
> 

<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
> 

<span
lang=EN-AU >Bill

<span
> 

<span
> 

<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
> 

<span
lang=EN-AU >Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

<span
> 

<span
lang=EN-AU >Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/ 

<span
> 

<font size=2
face="Times New Roman">

Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx <font
size=2 face="Courier New">
(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<font
size=2> 

Your
use of Yahoo! Groups is subject to the <a
href="">Yahoo! Terms of Service.<font
size=2> 



<font size=2
face="Times New Roman">



<font size=2
face="Courier New">Post AmiQuote-related
messages ONLY to: amiquote@xxxxxxxxxxxxxxx <font size=2
face="Courier New">
(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<font
size=2> 

Your
use of Yahoo! Groups is subject to the <a
href="">Yahoo! Terms of Service.<font
size=2> 










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.