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

RE: [amibroker] Creating an artifical security.



PureBytes Links

Trading Reference Links










Just looking at what I sent out, was just
some thoughts, about to start trading here, so haven’t time to test it. But
you may also need to builkd in the datenum()==lastvalue(datenum()) into that to
define the day to vary the OHLCV. Like a C =param( valuewhen(C, datenum()==lastvalue(datenum()),x,x-5,x+5,1);

Is that the right way round for valuewhen?
Anyway hope you get my drift for some fiddling with things

 





<span
>Cheers,

<span
 >Graham





 

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

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

<font size=2 color=navy
face=Arial>But
seriously folks my best trades have been made using the Hindsight Indicator <font
size=2 color=navy face=Wingdings>J

<font size=2 color=navy
face=Arial> 

<font size=2 color=navy
face=Arial>Try
setting the composite OHLCV to = ref(c,1) etc should put all data back one day
(probably lose the first days data of the chart)

<font size=2 color=navy
face=Arial>Then
with whatever indicator you use have a param setting for the arrays 

<font size=2 color=navy
face=Arial>Eg 

<font size=2 color=navy
face=Arial> 

<font size=2 color=navy
face=Arial>X =
Lastvalue( C )

<font size=2 color=navy
face=Arial>C =
Param(&#8220;C&#8221;,X, X-5,X+5,1);

<font size=2 color=navy
face=Arial> 

<font size=2 color=navy
face=Arial>Then
test your theories

<font size=2 color=navy
face=Arial> 





<font size=3 color=blue
face="Times New Roman">Cheers,

<font size=3 color=blue
face="Times New Roman">Graham





<font size=2 color=navy
face=Arial> 

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

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

<font size=2 color=navy
face=Arial>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 <font
size=2 color=navy face=Wingdings>J

<font size=2 color=navy
face=Arial> 





<font size=3 color=blue
face="Times New Roman">Cheers,

<font size=3 color=blue
face="Times New Roman">Graham





<font size=2 color=navy
face=Arial> 

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

<font size=2
face="Courier New">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.

<font size=2
face="Courier New"> 

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

<font size=2
face="Courier New"> 

<font size=2
face="Courier New">Cheers,

<font size=2
face="Courier New">Graham

<font size=2
face="Courier New"> 

<font size=2
face="Courier New"> 

<font size=2
face="Courier New">-----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.

<font size=2
face="Courier New"> 

<font size=2
face="Courier New">Help! I want to be
able to create a security that has all data 

<font size=2
face="Courier New">shifted back in
time by one day and then be able to put in my best 

<font size=2
face="Courier New">guess for the
final day's data.

<font size=2
face="Courier New"> 

<font size=2
face="Courier New">Shifting can be
done, I think, using the ref function.

<font size=2
face="Courier New"> 

<font size=2
face="Courier New">Dummy =
ref(original security,-1)

<font size=2
face="Courier New"> 

<font size=2
face="Courier New">But how can I plug
in the final days data. I can't quite figure that 

<font size=2
face="Courier New">one out. Any great
ideas out there?

<font size=2
face="Courier New"> 

<font size=2
face="Courier New">Bill

<font size=2
face="Courier New"> 

<font size=2
face="Courier New"> 

<font size=2
face="Courier New">Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 

<font size=2
face="Courier New">(Web page:
http://groups.yahoo.com/group/amiquote/messages/)

<font size=2
face="Courier New"> 

<font size=2
face="Courier New">Check group FAQ
at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

<font size=2
face="Courier New"> 

<font size=2
face="Courier New">Your use of Yahoo!
Groups is subject to http://docs.yahoo.com/info/terms/ 

<font size=2
face="Courier New"> 

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

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

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