PureBytes Links
Trading Reference Links
|
Graham: I have used the VB case statement with long numbers of symbols
Partial example to get the idea across:
ticker = Name(); BLevel = 0; SLevel = 0;
BSSC = 0; SL = 0;
/* VBSCRIPT for values specific to each stock */
EnableScript("vbscript");
<%
'BSSC Codes: 1 = Buy/Sell 2 = Short/Cover / SL = Stop Loss percentage
Stock = AFL("ticker") : Trigger = 0 : BSSC = 0 : SL =0
Select Case Stock
Case "ACAI" Trigger = 71 : BSSC = 1 : SL = 0.18
Case "ACDO" Trigger = 70 : BSSC = 1 : SL = 0.18
Case "ACMR" Trigger = 24 : BSSC = 1 : SL = 0.18
Case "AEIS" Trigger = 70 : BSSC = 1 : SL = 0.18
.
.
.
I did not come up with this (I believe Rick Parsons did) but I used it
to good effect in a number of scripts
Ken
-----Original Message-----
From: Graham [mailto:gkavanag@xxxxxxxxxxxxxx]
Sent: Tuesday, February 04, 2003 7:26 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Auto analyzer task
I did a similar exercise some time ago. Once I had all the individual
variables optimised I used this in the AA scan formula for variable x1.
I suggest you not try to do too many stocks or variables as it gets
extremely time consuming, tiring and you end up with silly mistakes. I
put all the optimised results into a spreadsheet and then used
concatenate (or &) function to append everything together into lines I
could copy/paste direct into Amibroker AA.
x1 =
(name()=="AMP")*11+(name()=="ANZ")*6+(name()=="BHP")*14+(name()=="CBA")*
9+(name()=="NAB")*6+(name()=="QAN")*5+(name()=="RIO")*8+(name()=="TLS")*
10+(name()=="WBC")*4+(name()=="WOW")*2+(name()=="WPL")*7+(name()=="XJO")
*12;
Cheers,
Graham
-----Original Message-----
From: ajfazli <ajfazli@xxxxxxxxx> [mailto:ajfazli@xxxxxxxxx]
Sent: Wednesday, 5 February 2003 8:04 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Auto analyzer task
Folks,
i am trying to have the AA optimize stock one by one and determine
the best value for a given period and then see if any buy/short
signal today and dump it into a report. Sounds like a large task, but
has anybody attempted this or done parts of it? can you help?
Thanks in advance.
Amir
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/
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/
|