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

RE: [amibroker] Code challenge - gurus on your toes!



PureBytes Links

Trading Reference Links




<SPAN 
class=252282800-18032003>Dale,
<SPAN 
class=252282800-18032003> 
Often 
I just guess <G> 
<SPAN 
class=252282800-18032003> 
Help 
defines an array as....

What is an 
Array?
An array is simply a list (or row) of values. 
In some books it may be referred to as a vector. Each numbered row of values in 
the example represents an individual array. Amibroker has stored in its database 
6 arrays for each stock. One for opening price, one for the low price, one for 
the high price, one for the closing price and one for volume (see the rows 
labeled 1-5 below) and one for open interest. These can be referenced in <FONT 
color=#ffffff >AFL as open, low, high, 
close, volume, openint or o, l, h, c, v, oi.
If you are referencing 
one of the 6 arrays or making calculations based on them then it is an 
array.  In your example you used Status to determine what AB was doing 
(Scan, Explore etc) Since this state is not stored nor calculated from the 
six arrays you must  use lastvalue() .
" <FONT color=blue 
face=Tahoma size=2><SPAN 
>One more thing: Do you 
use Amibroker to signal trades with delay = 1 and Price = Open?  On the 
evening before the trade do you use plots to tell you to trade the next morning 
or do you use some formula in the AA and run a Scan or Explore to tell 
you?"
<FONT 
face=Tahoma>Dale, you have probably forgotten more about system 
design than I know but for what it is worth I do 
use delay=1 and Price=Open for evaluation and back testing in AA, although in 
practice I seldom actual buy the open. I have been burned too many times by this 
fickle market. Instead I wait 30 minutes to let the dust settle. Interday I plot 
actual signals based on high or low. (delay=o)
<SPAN 
class=252282800-18032003>Regards,
jayson 
<SPAN 
> <FONT 
face=Arial size=2>
 
 Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: dingo 
[mailto:dingo@xxxxxxxxxx]Sent: Monday, March 17, 2003 4:23 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: RE: [amibroker] 
Code challenge - gurus on your toes!

<SPAN 
>Have I tried it? NO 
but looks like that is the magic answer!!!
<SPAN 
> 
<SPAN 
>I get totally wrapped 
around the axle to this day on what is an array and what is not an 
array.
<SPAN 
> 
<SPAN 
>If you have the time 
could you explain how this works at the individual bar level? If not I 
understand and really appreciate this!! It just might help the little light go 
on in my head (yea, right!).
<SPAN 
> 
<SPAN 
>One more thing: Do you 
use Amibroker to signal trades with delay = 1 and Price = Open?  On the 
evening before the trade do you use plots to tell you to trade the next morning 
or do you use some formula in the AA and run a Scan or Explore to tell 
you?
<SPAN 
> 
<SPAN 
>Thanks Jason!  
You are great to be here help us as much as you do!  
<SPAN 
> 
<SPAN 
>d
<SPAN 
> 
<SPAN 
>-----Original 
Message-----From: Jayson 
[mailto:jcasavant@xxxxxxxxxxxx] <SPAN 
>Sent: Monday, March 17, 2003 3:56 
PMTo: 
amibroker@xxxxxxxxxxxxxxx<SPAN 
>Subject: RE: [amibroker] Code challenge - 
gurus on your toes!
<FONT face="Times New Roman" 
size=3> 

<FONT color=blue face=Arial 
size=2>Dale have 
you tried lastvalue(tmpdelay)

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

<FONT color=#282828 face=Arial 
size=2><SPAN 
> 

<FONT color=blue face=Arial 
size=2>tmpDelay = 
<SPAN 
>IIf(Status("action") 
== 5, 1, 0<SPAN 
>);

<FONT color=blue face=Arial 
size=2><SPAN 
>tmpdelay=<FONT 
color=#282828 face=Arial size=2><SPAN 
>LastValue<FONT 
color=blue face=Arial size=2><SPAN 
>(tmpdelay);

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

<FONT color=blue face=Arial 
size=2>I think 
this needs to be a fixed number..

<FONT face="Times New Roman" 
size=3> 
<FONT color=blue face=Arial 
size=2><SPAN 
>Jayson 

<P class=MsoNormal 
><FONT 
face=Tahoma size=2><SPAN 
>-----Original 
Message-----From: dingo 
[mailto:dingo@xxxxxxxxxx]Sent: 
Monday, March 17, 2003 3:41 PM<SPAN 
>To: _amibroker_yahoo<SPAN 
>Subject: [amibroker] Code challenge - gurus 
on your toes!
<FONT face="Courier New" 
size=2>I'm trying to write some AFL code that will 
change the trade delays and<FONT face="Courier New" 
size=2><FONT 
face="Courier New">trade prices based solely on whether the code is being run in 
the backtester/optimizer or 
not.Here's a feeble attempt 
that doesn't work:tmpDelay = 
IIf(Status("action") == 5, 1, 0);<FONT 
face="Courier New">tmpPrice = IIf(Status("action") == 5, Open, 
Close);SetTradeDelays(tmpDelay, 
tmpDelay, tmpDelay, tmpDelay);<FONT 
face="Courier New">BuyPrice = SellPrice = ShortPrice = CoverPrice = 
tmpPrice;Lets see if you can 
solve this one!  (Use of vbScript is 
permissable)<FONT 
face="Courier New">d<FONT 
face="Courier New" size=2>Send BUG REPORTS to 
bugs@xxxxxxxxxxxxx<SPAN 
><FONT 
face="Courier New">Send SUGGESTIONS to 
suggest@xxxxxxxxxxxxx<FONT 
face="Courier New">-----------------------------------------<FONT 
face="Courier New">Post AmiQuote-related messages ONLY to: 
amiquote@xxxxxxxxxxxxxxx (Web page: 
<A 
href="">http://groups.yahoo.com/group/amiquote/messages/)<FONT 
face="Courier New">--------------------------------------------<FONT 
face="Courier New">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. <FONT 
face="Courier New" size=2>Send BUG REPORTS to 
bugs@xxxxxxxxxxxxx<SPAN 
><FONT 
face="Courier New">Send SUGGESTIONS to 
suggest@xxxxxxxxxxxxx<FONT 
face="Courier New">-----------------------------------------<FONT 
face="Courier New">Post AmiQuote-related messages ONLY to: 
amiquote@xxxxxxxxxxxxxxx (Web page: 
<A 
href="">http://groups.yahoo.com/group/amiquote/messages/)<FONT 
face="Courier New">--------------------------------------------<FONT 
face="Courier New">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. 
Send 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------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









Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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.