Re: [amibroker] OT: installing OS again

2010-09-08 Thread Keith McCombs

Anthony --
I use:
http://www.terabyteunlimited.com/image-for-windows.htm#IFWFEATURE
If you click on Download, you can download a trial version.  Sorry, I 
don't know what the limitations are on this version.  I have, and use, 
the complete bundle including BootIt NG (for disk partitioning).  $49.  
There is a learning curve (but not nearly as steep as AB).


Another popular one is:
http://www.acronis.com/homecomputing/products/trueimage/
I used a previous version of their Pro line, Backup  Recovery.  It also 
has a trial version.  It was easier to use than I4W above.  But I have 
used I4W for many, many years, so I just stick with it.


Also, Terabyteunlimited doesn't charge for updates.  Acronis does.

-- Keith


On 9/8/2010 07:31, Anthony Faragasso wrote:


Thank you everyone...
Keith,
I am using windows Vista home premium...I can not run in Repair 
mode...I have exhausted all methods I can think of to repair the OS..
There are several / many Services that can not be started no matter 
what I have tried...I have not been able to update the OS through the

windows automatic update service for sometime 
I do NOT have all installed program disks...
Are there any free disk Imaging softwares that allow what you suggest ?
Anthony

- Original Message -
*From:* Keith McCombs mailto:kmcco...@engineer.com
*To:* amibroker@yahoogroups.com mailto:amibroker@yahoogroups.com
*Sent:* Tuesday, September 07, 2010 11:52 PM
*Subject:* Re: [amibroker] OT: installing OS again

Before you attempt to do anything else, make a complete image of
your hard drive. Make sure that your disk imaging software will
allow you to recover individual folders and files as well as the
entire image.

Then see if you can run your OS installation software in 'Repair'
mode.  If you can, you may end up fixing what ever your problem
is, without needing to reinstall any software.

If that doesn't work, maybe you might have to reinstall the OS. 
Are you absolutely sure that the only solution to your problem is

a complete re-install?  Positive?  Absolutely Positive? If so:
Just because you have copies of all your installed programs does
NOT mean that you can merely copy them onto the newly installed OS.

You will have to re-install almost all of your programs.  For this
you need the Original installation programs, including protection
keys, either on disks or saved elsewhere.

Good luck,
-- Keith

BTW, I have been using PC's since the very first IBM ones. 
Probably owned a couple of dozen since then.  The only time I have

had to reinstall an OS was when I lost my first HD more than 25
years ago.  Since then, I make drive images and/or use other work
arounds.

On 9/7/2010 02:36, reinsley wrote:




Hi,


IMO, before to format, save your My documents files ( it's
another name under Vista, the file containing all your personnal
documents), save your bookmarks ( IE or Firefox), save your
Outlook settings (address book contacts, settings accounts)
Emails as well if needed, but they are on ISP's server.
Save the other application files such as AB, into c:\Program
Files. Your formulas, your databases, etc. are there.

Then format the disk, and start from scratch, install vista.
Don't forget the drivers.

Install all your applications. Printer and gadgets...

Restore your My documents, and AB formulas, AB databases.

You can do a todolist of the actions before to start. You update
this document as and when you did it.
Next install you update your technical notes, the order to
proceed, the things forgotten. It's a good way to never miss a step.

When everything is running fine for a while, you know what is
worth to backup from time to time. :)

Best regards



Le 07/09/2010 00:44, Anthony Faragasso a écrit :


I need to re-install windows Vista to correct several issues I
am having...
I purchased an external Hard drive...How do I move all programs
and files to the external hard drive and then move
them back to the computers internal hard drive after
re-installing the operating system ?
I do not think just backing up the internal hard drive will
preserve all programs...some programs I do not
have disks for...
Help...
thank you
Anthony






Re: [amibroker] User's Guide 5.30 in PDF format?

2010-09-07 Thread Keith McCombs

Great!
Thank you very much.
-- Keith

On 9/4/2010 08:32, Tomasz Janeczko wrote:


Hello,

Available now.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-05-28 07:26, Keith McCombs wrote:

When should we expect to see the AB 5.30 User's Guide available in 
PDF format?

I'm looking forward to it.
Thank you,
-- Keith




Re: [amibroker] OT: installing OS again

2010-09-07 Thread Keith McCombs
Before you attempt to do anything else, make a complete image of your 
hard drive. Make sure that your disk imaging software will allow you to 
recover individual folders and files as well as the entire image.


Then see if you can run your OS installation software in 'Repair' mode.  
If you can, you may end up fixing what ever your problem is, without 
needing to reinstall any software.


If that doesn't work, maybe you might have to reinstall the OS.  Are you 
absolutely sure that the only solution to your problem is a complete 
re-install?  Positive?  Absolutely Positive? If so:
Just because you have copies of all your installed programs does NOT 
mean that you can merely copy them onto the newly installed OS.


You will have to re-install almost all of your programs.  For this you 
need the Original installation programs, including protection keys, 
either on disks or saved elsewhere.


Good luck,
-- Keith

BTW, I have been using PC's since the very first IBM ones.  Probably 
owned a couple of dozen since then.  The only time I have had to 
reinstall an OS was when I lost my first HD more than 25 years ago.  
Since then, I make drive images and/or use other work arounds.


On 9/7/2010 02:36, reinsley wrote:




Hi,


IMO, before to format, save your My documents files ( it's another 
name under Vista, the file containing all your personnal documents), 
save your bookmarks ( IE or Firefox), save your Outlook settings 
(address book contacts, settings accounts) Emails as well if needed, 
but they are on ISP's server.
Save the other application files such as AB, into c:\Program Files. 
Your formulas, your databases, etc. are there.


Then format the disk, and start from scratch, install vista. Don't 
forget the drivers.


Install all your applications. Printer and gadgets...

Restore your My documents, and AB formulas, AB databases.

You can do a todolist of the actions before to start. You update this 
document as and when you did it.
Next install you update your technical notes, the order to proceed, 
the things forgotten. It's a good way to never miss a step.


When everything is running fine for a while, you know what is worth to 
backup from time to time. :)


Best regards



Le 07/09/2010 00:44, Anthony Faragasso a écrit :

I need to re-install windows Vista to correct several issues I am 
having...
I purchased an external Hard drive...How do I move all programs and 
files to the external hard drive and then move
them back to the computers internal hard drive after re-installing 
the operating system ?
I do not think just backing up the internal hard drive will preserve 
all programs...some programs I do not

have disks for...
Help...
thank you
Anthony





Re: [amibroker] Req Can we have afl showing gravity bars with color? please help

2010-09-05 Thread Keith McCombs

RV --
Please stop shouting.
Thank you.
-- Keith

On 9/5/2010 12:14, ram vel wrote:

[Attachment(s) #TopText from ram vel included below]

hi ford
 gravitycolor bars
can be coded in Amibroker,very well and easily.
I attach a simple code in tradestation,with hope someone will convert 
into Afl soon.
*if you have tradestation, they're free on the forums OR you could 
easily code them yourself if you just read some easy language code.
A moving average that changes colour when up/ down combined with 
heikin ashi bars.

*
*Ive done some research and found that the colour charts turn blue or 
red in relation to a moving average which is based on the wieght of 
the price relative to the high or low. Meaning, if, for a particular 
bar, the prices 'tick count' is around the lower half of the bar, than 
the top half, it will turn red. if there is more activity in the top 
half than the bottom, it turns blue. I*
*m not sure how this average is writtin in code, but i do know it goes 
something like the difference between the number of ticks (regardless 
of time period) above the open (or top half of bar) and the bottom 
half (or lower than the open).

im sure there is a simpler way to explain. lol
Ive done some research and found that the colour charts turn blue or 
red in relation to a moving average which is based on the wieght of 
the price relative to the high or low. Meaning, if, for a particular 
bar, the prices 'tick count' is around the lower half of the bar, than 
the top half, it will turn red. if there is more activity in the top 
half than the bottom, it turns blue. I*
*m not sure how this average is writtin in code, but i do know it goes 
something like the difference between the number of ticks (regardless 
of time period)
above the open (or top half of bar) and the bottom half (or lower than 
the open).

im sure there is a simpler way to explain. lol*
*I had a look at your chart, it looks quite impressive. it seems to 
work better on very low time frames, so i can see why you may favour 
using another setup. *

**
*eld (tradestation) code is here*
**
*Cheer up*
*regards*
*rv*





Re: [amibroker] AFl required

2010-09-04 Thread Keith McCombs

Silon --
You must be precise in how you define Recent and Top.  For example:
recent = 14; // this is maximum of 14 bars, including this one. You pick 
the number.

top = HHV(Close, recent); // you might prefer High or Avg instead of Close
top = ref(top, -1); // we don't want to include today's close, but 14 
previous days


percent = 0.01;  // you pick number between -0.05 and 0.05
// -0.05=percent0 for your system 1
// percent = 0 for your system 2
// 0percent=0.05 for your system 3

system = High = top * (1 + percent);  // or use Close instead of High

Hope this helps.
-- Keith



1. c
On 9/4/2010 01:32, silon sama wrote:

[Attachment(s) #TopText from silon sama included below]


Dear All,


Any Body Can Help Me in Coding of 3 AFLS-pls find attachment



1.Closed or made intraday high below 1-5% from RECENT previous 
rallie'S top



2. closed or made high above Recent  previous ralliy's TOP


3 .Closed or made intraday high ABOVE 1-5% from previous rallies top


Yours Thankfully

Silon











[amibroker] Open Suggestion for AB User's PDF Guide

2010-09-03 Thread Keith McCombs
The first place I go for help with AmiBroker is the AmiBroker 5.20 
User's Guide in PDF format.  I prefer the .pdf file because I find it 
easier to search than the help file.   And I've been able to add my own 
and others comments and merged maintenance notes using Adobe Acrobat.   
Also, much of the guide I have printed out, dog eared, marked up, 
highlighted, and inserted into three ring binders.


I thought I might make the following suggestions before a 5.30 .pdf is 
released.  My hope is that this will make the guide both easier for TJ 
to produce and to update, and for users to use, and reuse.  These 
suggestions are predicated on the assumption that the Guide exists in a 
common word processing file such a .doc, .rtf, or .odt, and that TJ 
would be willing to release it as such.


The general idea is to make the guide modular, so that it is much easier 
to keep up to date, and to make updates more obvious to the users.  
Briefly, changes similar to these:

1.  Number all chapters, with page numbers chapter relative.
2.  Freeze the page numbers with version 5.30.
3.  When changes or additions are made which require adding pages 
between existing pages, use page number.number.  Example: pages, 12, 13, 
13.1, 13.2, 14, 15, when pages 13.1 and 13.2 are added.


Perhaps, dividing the guide up using sub-chapters and sub-sub-chapters, 
etc., ie. 1., 1.1. 1.1.2. 1.2, etc. might be advisable.  Whatever is 
easiest to implement and understand.


The above could make it much easier for TJ, because he could release 
just page addins as new features are added and/or changes made, without 
re-paginating the entire guide.  Also, it would be much easier for users 
to make additions using their own word processing software rather than 
an expensive, and more awkward, tool such as Acrobat.  And they would be 
more aware of new features and changes as they became available.  If TJ 
thought that one chapter, or sub chapter, needed re-writing in its 
entirety, then he could do so and release it as new chapter.  And users 
could install it appropriately.


I hope that the entire document would be available as one file so users 
would not have to make multiple downloads and stitch them all together.


My above thoughts are quick and dirty.  I hope that others will 
comment and improve on them.


Oops, one final thought, having the Guide in .doc or similar format, 
also makes it easier to adjust the margins to avoid putting holes 
through the print.


-- Keith



Re: [amibroker] Re: Open Interest Field

2010-09-01 Thread Keith McCombs

TA --
I just posted a suggestion, #2034, to that effect at 
http://www.amibroker.com/feedback/

-- Keith

On 9/1/2010 12:34, TA wrote:


Thanks Brenton, hopefully TJ would provide an option to do this.

*From:* amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] 
*On Behalf Of *Brenton Hill

*Sent:* Tuesday, August 31, 2010 11:30 PM
*To:* amibroker@yahoogroups.com
*Subject:* Re: [amibroker] Re: Open Interest Field

TA

If you're trying to import into the open interest field of an existing 
security, it is not possible, even using $HYBRID 1, I've tried it, and 
corresponded with Amibroker support about it, I have copied the reply 
from Marcin below.


Regards
Brenton

Hello,

You should import all the data at once - together with OHLC prices. So 
- you

would need to combine data before you import it into AB.

$HYBRID simply does not work for OpenInt field. $HYBRID was added to 
support double fixing quotation system used some time ago in Warsaw 
Stock Exchange and as such it always expects close price.


Best regards

Marcin Gorzynski
Amibroker.com Technical Support

On 1/09/2010 15:10, TA wrote:

Keith, this doesn't work for. Were you able to test it?

*From:* amibroker@yahoogroups.com
mailto:amibroker@yahoogroups.com
[mailto:amibro...@yahoogroups.com] *On Behalf Of *Keith McCombs
*Sent:* Tuesday, August 31, 2010 8:29 PM
*To:* amibroker@yahoogroups.com mailto:amibroker@yahoogroups.com
*Subject:* Re: [amibroker] Re: Open Interest Field

TJ --
Yes, I did read that; many times over.
It does not say that Open Interest is or is not quotation data. 
And nowhere else in the document are we users told precisely what

is or is not quotation data.
Nor does it say that Close must always be present.  Is Open
quotati on data?  If so, why is it not required?

My reading of accept only quotation data, means to me that if
$NOQUOTES is 0, then non-quotation data will not be accepted.  It
does not say that any particular data, Close in this case, must be
present.

If you are still with me, could you please explain: If TA includes
$HYBRID, and his data base already includes Close, should the
following work for him?
$FORMAT TICKER, Date_USA, OPENINT
$SKIPLINES 0
$NOQUOTES 0
$AUTOADD 0
$OVERWRITE 1
$SEPARATOR ,
$DEBUG 1
$HYBRID 1
A,8/27/2010,34600
AA,8/27/2010,102000

Thank you for your continuing efforts in my behalf,
-- Keith

On 8/31/2010 13:27, Tomasz Janeczko wrote:

Hello,

Poor searching.
As I wrote, search for $NOQUOTES and read what is written there
http://www.amibroker.com/guide/d_ascii.html
http://www.amibroker.com/guide/d_ascii.htm%20%20l

It is clearly written:

$NOQUOTESSwitch quotation data mode

0 - (default) accept only quotation data (AmiBroker checks for
non-zero prices and valid dates)
1 - switch off quotation data checking - this allows importing
non-quotation data - for example only ticker and full names


Best regards,
Tomasz Janeczko
amibroker.com

On 2010-08-31 19:16, Keith McCombs wrote:

TJ --
I just did a word search in .pdf manual, 5.20.  I could
not find where it said that either that Open Interest is
considered as PART of quotation.  Or that at least CLOSE
price is required.
My searches included:
$NOQUOTES
openinterest
at least close price
part of quotation

I also searched pages 284-299 for:
quotation
close
and rer ead areas containing those words, without benefit.

-- Keith


On 8/31/2010 12:14, Tomasz Janeczko wrote:

Hello,

It is already. Check the description of $NOQUOTES in the
manual.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-08-31 16:55, Keith McCombs wrote:

TJ --
IMHO, this type of information should be in the User's
Manual.
-- Keith

On 8/31/2010 06:43, Tomasz Janeczko wrote:

Hello,

Open Interest is considered as PART of quotation,
therefore can NOT be imported with $NOQUOTES 1

Since it is  a PART of quotation, it has to come
*together* with at least CLOSE price.

So your data file should contain
DateTime, Close, OpenInterest

fields at minimum.

Best regards,
Tomasz Jane czko
amibroker.com

On 2010-08-31 08:05, TA wrote:

TJ, by chance if you see message would you please
comment. TIA

*From

Re: [amibroker] Re: Open Interest Field

2010-08-31 Thread Keith McCombs

TA --
The error message referring to close price is very suspicious.  Does 
your data base already have a an 'A' ticker, and if so does it have a 
positive close price?


I don't know that the exists of a ticker with a close price.  But, maybe 


-- Keith

On 8/31/2010 02:05, TA wrote:


TJ, by chance if you see message would you please comment. TIA

*From:* amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] 
*On Behalf Of *TA

*Sent:* Monday, August 30, 2010 7:53 PM
*To:* amibroker@yahoogroups.com
*Subject:* RE: [amibroker] Re: Open Interest Field

Hi Ed

nb sp;

Thanks, for the reply. Initially, I was thinking the same that the 
number might be too big. However, I input it manually it takes it. If 
I set $NOQUOTES to 1 the $debug does produce any error but it also 
doesn't import the data. If I set $NOQUOTES to 0 then it produce the 
following error:


Error in line A,8/27/2010,34600

Invalid (close) price. Prices must be positive. If you want to import 
no quotation data please specify $NOQUOTES 1 ('no quotation data' box 
in Wizard)


 p class=MsoNormal*From:* amibroker@yahoogroups.com 
[mailto:amibro...@yahoogroups.com] *On Behalf Of *Ed H

*Sent:* Monday, August 30, 2010 7:17 PM
*To:* amibroker@yahoogroups.com
*Subject:* [amibroker] Re: Open Interest Field

My WAG (Wild Ass Guess) would be that the OI field is a fixed point 32 
bit number (same as volume) which has a max value of 4 billion. The AA 
stock is already at 1 billion.


Try cutting off 3 zeros from each OI entry and see if that helps.

Try adding $BREAKONERROR 1 to the commands in addition to $DEBUG and 
see if the error log file has ! any hints.


--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
TA tagro...@... mai%20%20lto:tagro...@... wrote:


 I am trying to import an ascii file with following data to the Open 
Interest

 field:



 A,8/27/2010,34600

 AA,8/27/2010,102000



 The following is my format file instructions. It keeps on failing. 
Do you

 see why? TIA



 $FORMAT TICKER, Date_USA, OPENINT

 $SKIPLINES 0

 $NOQUOTES 1

 $AUTOADD 0

 $OVERWRITE 1

 $SEPARATOR ,

 $DEBUG 1





Re: [amibroker] Re: Open Interest Field

2010-08-31 Thread Keith McCombs

TJ --
IMHO, this type of information should be in the User's Manual.
-- Keith

On 8/31/2010 06:43, Tomasz Janeczko wrote:


Hello,

Open Interest is considered as PART of quotation, therefore can NOT be 
imported with $NOQUOTES 1


Since it is  a PART of quotation, it has to come *together* with at 
least CLOSE price.


So your data file should contain
DateTime, Close, OpenInterest

fields at minimum.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-08-31 08:05, TA wrote:


TJ, by chance if you see message would you please comment. TIA

*From:* amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] 
*On Behalf Of *TA

*Sent:* Monday, August 30, 2010 7:53 PM
*To:* amibroker@yahoogroups.com
*Subject:* RE: [amibroker] Re: Open Interest Field

Hi Ed

Thanks, for the reply. Initially, I was thinking the same that the 
number might be too big. However, I input it manually it takes it. If 
I set $NOQUOTES to 1 the $debug does produce any error but it also 
doesn't import the data. If I set $NOQUOTES to 0 then it produce the 
following error:


Error in line A,8/27/2010,34600

Invalid (close) price. Prices must be positive. If you want to import 
no quotation data please specify $NOQUOTES 1 ('no quotation data' box 
in Wizard)


*From:* amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] 
*On Behalf Of *Ed H

*Sent:* Monday, August 30, 2010 7:17 PM
*To:* amibroker@yahoogroups.com
*Subject:* [amibroker] Re: Open Interest Field

My WAG (Wild Ass Guess) would be that the OI field is a fixed point 
32 bit number (same as volume) which has a max value of 4 billion. 
The AA stock is already at 1 billion.


Try cutting off 3 zeros from each OI entry and see if that helps.

Try adding $BREAKONERROR 1 to the commands in addition to $DEBUG and 
see if the error log file has ! any hints.


--- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, TA tagro...@... 
mailto:tagro...@... wrote:


 I am trying to import an ascii file with following data to the Open 
Interest

 field:



 A,8/27/2010,34600

 AA,8/27/2010,102000



 The following is my format file instructions. It keeps on failing. 
Do you

 see why? TIA



 $FORMAT TICKER, Date_USA, OPENINT

 $SKIPLINES 0

 $NOQUOTES 1

 $AUTOADD 0

 $OVERWRITE 1

 $SEPARATOR ,

 $DEBUG 1






Re: [amibroker] Re: Open Interest Field

2010-08-31 Thread Keith McCombs

TJ --
I just did a word search in .pdf manual, 5.20.  I could not find where 
it said that either that Open Interest is considered as PART of 
quotation.  Or that at least CLOSE price is required.

My searches included:
$NOQUOTES
openinterest
at least close price
part of quotation

I also searched pages 284-299 for:
quotation
close
and reread areas containing those words, without benefit.

-- Keith


On 8/31/2010 12:14, Tomasz Janeczko wrote:


Hello,

It is already. Check the description of $NOQUOTES in the manual.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-08-31 16:55, Keith McCombs wrote:


TJ --
IMHO, this type of information should be in the User's Manual.
-- Keith

On 8/31/2010 06:43, Tomasz Janeczko wrote:


Hello,

Open Interest is considered as PART of quotation, therefore can NOT 
be imported with $NOQUOTES 1


Since it is  a PART of quotation, it has to come *together* with at 
least CLOSE price.


So your data file should contain
DateTime, Close, OpenInterest

fields at minimum.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-08-31 08:05, TA wrote:


TJ, by chance if you see message would you please comment. TIA

*From:* amibroker@yahoogroups.com 
[mailto:amibro...@yahoogroups.com] *On Behalf Of *TA

*Sent:* Monday, August 30, 2010 7:53 PM
*To:* amibroker@yahoogroups.com
*Subject:* RE: [amibroker] Re: Open Interest Field

Hi Ed

Thanks, for the reply. Initially, I was thinking the same that the 
number might be too big. However, I input it manually it takes it. 
If I set $NOQUOTES to 1 the $debug does produce any error but it 
also doesn't import the data. If I set $NOQUOTES to 0 then it 
produce the following error:


Error in line A,8/27/2010,34600

Invalid (close) price. Prices must be positive. If you want to 
import no quotation data please specify $NOQUOTES 1 ('no quotation 
data' box in Wizard)


*From:* amibroker@yahoogroups.com 
[mailto:amibro...@yahoogroups.com] *On Behalf Of *Ed H

*Sent:* Monday, August 30, 2010 7:17 PM
*To:* amibroker@yahoogroups.com
*Subject:* [amibroker] Re: Open Interest Field

My WAG (Wild Ass Guess) would be that the OI field is a fixed point 
32 bit number (same as volume) which has a max value of 4 billion. 
The AA stock is already at 1 billion.


Try cutting off 3 zeros from each OI entry and see if that helps.

Try adding $BREAKONERROR 1 to the commands in addition to $DEBUG 
and see if the error log file has ! any hints.


--- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, TA tagro...@... 
mailto:tagro...@... wrote:


 I am trying to import an ascii file with following data to the 
Open Interest

 field:



 A,8/27/2010,34600

 AA,8/27/2010,102000



 The following is my format file instructions. It keeps on 
failing. Do you

 see why? TIA



 $FORMAT TICKER, Date_USA, OPENINT

 $SKIPLINES 0

 $NOQUOTES 1

 $AUTOADD 0

 $OVERWRITE 1

 $SEPARATOR ,

 $DEBUG 1






Re: [amibroker] Re: Open Interest Field

2010-08-31 Thread Keith McCombs

TJ --
Yes, I did read that; many times over.
It does not say that Open Interest is or is not quotation data.  And 
nowhere else in the document are we users told precisely what is or is 
not quotation data.
Nor does it say that Close must always be present.  Is Open quotation 
data?  If so, why is it not required?


My reading of accept only quotation data, means to me that if 
$NOQUOTES is 0, then non-quotation data will not be accepted.  It does 
not say that any particular data, Close in this case, must be present.


If you are still with me, could you please explain: If TA includes 
$HYBRID, and his data base already includes Close, should the following 
work for him?

$FORMAT TICKER, Date_USA, OPENINT
$SKIPLINES 0
$NOQUOTES 0
$AUTOADD 0
$OVERWRITE 1
$SEPARATOR ,
$DEBUG 1
$HYBRID 1
A,8/27/2010,34600
AA,8/27/2010,102000

Thank you for your continuing efforts in my behalf,
-- Keith

On 8/31/2010 13:27, Tomasz Janeczko wrote:


Hello,

Poor searching.
As I wrote, search for $NOQUOTES and read what is written there
http://www.amibroker.com/guide/d_ascii.html

It is clearly written:

$NOQUOTESSwitch quotation data mode

0 - (default) accept only quotation data (AmiBroker checks for 
non-zero prices and valid dates)
1 - switch off quotation data checking - this allows importing 
non-quotation data - for example only ticker and full names



Best regards,
Tomasz Janeczko
amibroker.com

On 2010-08-31 19:16, Keith McCombs wrote:


TJ --
I just did a word search in .pdf manual, 5.20.  I could not find 
where it said that either that Open Interest is considered as PART of 
quotation.  Or that at least CLOSE price is required.

My searches included:
$NOQUOTES
openinterest
at least close price
part of quotation

I also searched pages 284-299 for:
quotation
close
and reread areas containing those words, without benefit.

-- Keith


On 8/31/2010 12:14, Tomasz Janeczko wrote:


Hello,

It is already. Check the description of $NOQUOTES in the manual.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-08-31 16:55, Keith McCombs wrote:


TJ --
IMHO, this type of information should be in the User's Manual.
-- Keith

On 8/31/2010 06:43, Tomasz Janeczko wrote:


Hello,

Open Interest is considered as PART of quotation, therefore can 
NOT be imported with $NOQUOTES 1


Since it is  a PART of quotation, it has to come *together* with 
at least CLOSE price.


So your data file should contain
DateTime, Close, OpenInterest

fields at minimum.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-08-31 08:05, TA wrote:


TJ, by chance if you see message would you please comment. TIA

*From:* amibroker@yahoogroups.com 
[mailto:amibro...@yahoogroups.com] *On Behalf Of *TA

*Sent:* Monday, August 30, 2010 7:53 PM
*To:* amibroker@yahoogroups.com
*Subject:* RE: [amibroker] Re: Open Interest Field

Hi Ed

Thanks, for the reply. Initially, I was thinking the same that 
the number might be too big. However, I input it manually it 
takes it. If I set $NOQUOTES to 1 the $debug does produce any 
error but it also doesn't import the data. If I set $NOQUOTES to 
0 then it produce the following error:


Error in line A,8/27/2010,34600

Invalid (close) price. Prices must be positive. If you want to 
import no quotation data please specify $NOQUOTES 1 ('no 
quotation data' box in Wizard)


*From:* amibroker@yahoogroups.com 
[mailto:amibro...@yahoogroups.com] *On Behalf Of *Ed H

*Sent:* Monday, August 30, 2010 7:17 PM
*To:* amibroker@yahoogroups.com
*Subject:* [amibroker] Re: Open Interest Field

My WAG (Wild Ass Guess) would be that the OI field is a fixed 
point 32 bit number (same as volume) which has a max value of 4 
billion. The AA stock is already at 1 billion.


Try cutting off 3 zeros from each OI entry and see if that helps.

Try adding $BREAKONERROR 1 to the commands in addition to $DEBUG 
and see if the error log file has ! any hints.


--- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, TA tagro...@... 
mailto:tagro...@... wrote:


 I am trying to import an ascii file with following data to the 
Open Interest

 field:



 A,8/27/2010,34600

 AA,8/27/2010,102000



 The following is my format file instructions. It keeps on 
failing. Do you

 see why? TIA



 $FORMAT TICKER, Date_USA, OPENINT

 $SKIPLINES 0

 $NOQUOTES 1

 $AUTOADD 0

 $OVERWRITE 1

 $SEPARATOR ,

 $DEBUG 1






Re: [amibroker] Report/Stats for individual stocks

2010-08-31 Thread Keith McCombs

Ronen --
Yes.
Most of the metrics you want are not displayed by Back Test, but by 
Optimize.  But that's Ok.


I just tried this with only two symbols:
run = Optimize(Runs, 1, 1, 2, 1);  // make max the number of stocks 
you wish to test

if((Name() == QLD AND run == 1)
OR (Name() == QID AND run == 2)){
// your code goes here
}else Buy = Sell = Short = Cover = 0;

If you have only a few stocks to test this way, you can just type in the 
code for each stock.
However, if you have very many, then make a symbol list using Scan or 
Explore and export to a spread sheet and/or a good code editor to help 
generate the code.  Then Optimize, and after it finishes, export the 
results and merge with your numbered list to include the names with your 
results.


Hope this helps.
-- Keith

On 8/31/2010 18:52, Ronen wrote:


Is there a way to backtest a group of stocks, each individually, and 
then get that stats for each stock (i.e. Sharpe, win%, Loss%, #trades)?


For example, if my backtest period is 5 years, run the backtest for 
stock A for the 5 year period, calculate the stats and then move to 
stock B. So, in other words, I would would see how successful a 
strategy was for each stock in my universe. Otherwise I would have to 
manually run the backtest on stock A, mark down the statistics by hand 
and then run the test on stock B etc...





Re: [amibroker] Definitive Guide to AFL

2010-08-30 Thread Keith McCombs
The help file is also available in .pdf format, Amibroker 5.20 User's 
Guide.
http://amibroker.com/download.html#amibroker (third item on same page as 
program download)


Hopefully there will eventually be an updated version to 5.30.

On 8/30/2010 03:51, Herman wrote:


there are several books by Howard Bandy 
http://www.quantitativetradingsystems.com/ , a AmiBroker Knowledge 
Base http://www.amibroker.com/kb/, a User Knowledge Base 
http://www.amibroker.org/userkb/, an afl library 
http://www.amibroker.com/members/, and there are many code 
collections in many languages all over the web.


herman

* I'm an experienced MetaStock programmer who is
 considering moving over to AmiBroker. What is the most
 comprehensive guide to AFL? I have the help file from the
 program and would like to know if there are any other good
 reference works that dig deep into AFL. I hope the help file is not 
all there is.


 Thanks



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

 For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
 http://www.amibroker.com/devlog/

 Yahoo! Groups Links


 amibroker-fullfeatu...@yahoogroups.com 
mailto:amibroker-fullfeatu...@yahoogroups.com



*

* *
* *
**
* *


Re: [amibroker] Re: How many open charts do you use

2010-08-28 Thread Keith McCombs
I am confused by your use of the terms 'sheet' and 'pane'.  I believe 
that 8 is the default number of sheets per chart (or is it per chart 
window).  One is the default number of panes per sheet.


Also, I'm not sure what a chart is.  For example, on page 38 of the 
Users Guide 5.20, I see a total of 9 chart 'panes' distributed among 4 
chart 'widows'.  But how many charts are there?


Or perhaps chart should not be used as a noun at all, but only as an 
adjective?


Can someone make this more clear for me?
-- Keith

On 8/28/2010 10:16, Rob wrote:


TJ,

As a real time day trader I use 12 open charts... each chart currently 
has 8 panes, but frankly I only use max 3 panes per chart (on some a 
single pane only)... I think 8 may have been the default and I didn't 
change it.
As I understood it, reducing the number of panes didn't add any speed 
benefit because unless they were actually being viewed they had no 
drain on resources.


Yours

Rob

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Tomasz Janeczko gro...@... wrote:


 Hello,

 I have a question for AmiBroker users, especially those using it in 
real-time:
 how many chart windows do you have open simultaneously and how many 
panes per chart ?


 I mean the maximum that you use or would like to use.

 I am asking because knowing that would make code tuning / 
optimization choices easier.


 Thank you in advance.

 Best regards,
 Tomasz Janeczko
 amibroker.com





Re: [amibroker] Re: How many open charts do you use

2010-08-28 Thread Keith McCombs

TJ --
I think I got it now.

Chart, as an adjective, as in chart pane, chart sheet, chart widow, 
etc..  As a noun, it means a chart window.


Thank you very much.
-- Keith

On 8/28/2010 13:01, Tomasz Janeczko wrote:


Hello,

Keith, you are right.

In AmiBroker, a chart is a window that may contain one or more 
panes (each displaying indicator and/or price/volume).

Sheets are excel-like tabs on the bottom of chart window.

I was asking for chart windows and panes in the sense above.

As I understand it Rob meant sheets in his description.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-08-28 18:18, Keith McCombs wrote:

I am confused by your use of the terms 'sheet' and 'pane'.  I believe 
that 8 is the default number of sheets per chart (or is it per chart 
window).  One is the default number of panes per sheet.


Also, I'm not sure what a chart is.  For example, on page 38 of the 
Users Guide 5.20, I see a total of 9 chart 'panes' distributed among 
4 chart 'widows'.  But how many charts are there?


Or perhaps chart should not be used as a noun at all, but only as an 
adjective?


Can someone make this more clear for me?
-- Keith

On 8/28/2010 10:16, Rob wrote:


TJ,

As a real time day trader I use 12 open charts... each chart 
currently has 8 panes, but frankly I only use max 3 panes per chart 
(on some a single pane only)... I think 8 may have been the default 
and I didn't change it.
As I understood it, reducing the number of panes didn't add any 
speed benefit because unless they were actually being viewed they 
had no drain on resources.


Yours

Rob

--- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, Tomasz Janeczko gro...@... 
wrote:


 Hello,

 I have a question for AmiBroker users, especially those using it 
in real-time:
 how many chart windows do you have open simultaneously and how 
many panes per chart ?


 I mean the maximum that you use or would like to use.

 I am asking because knowing that would make code tuning / 
optimization choices easier.


 Thank you in advance.

 Best regards,
 Tomasz Janeczko
 amibroker.com






[amibroker] QP EOD data base not updating

2010-08-28 Thread Keith McCombs
I originally posted this as a follow up to Using QP EOD and AB 64bit.  
I assume it was overlooked because of this.


TJ --
Running the Scan helped.  However, that leads me to another question or two:
I had set up the data base, QP3L, with local enabled a while ago, in 
addition to my already existing local disabled data base, QP3.


1.  QP3L does not update when running either AB32 or AB64.  So it has no 
new data since early July.  Is there some way to update it?  I could 
delete QP3, if that would help.


2.  In your instruction 2 below, why did you capitalize the word ONCE.  
ONCE is enough? Or, more than ONCE is a problem?


Thanks so much for your help.
-- Keith

On 8/27/2010 15:54, Tomasz Janeczko wrote:


Hello,

It is easy (no need to export/import):

1. Setup the QP2 database using 32 bit version, make sure that local 
data storage is enabled

2. Run a scan over all symbols ONCE using 32 bit version.
3. Run 64-bit AmiBroker on that QP2 database. It does not matter that 
you don't have QP2 plugin

in 64-bit, it will use locally stored data.


Best regards,
Tomasz Janeczko
amibroker.com

On 2010-08-27 21:19, Keith McCombs wrote:

I would like to use AB 64bit for running exhaustive optimization on 
QuotesPlus EOD data.  However, AB does not have a 64bit plugin for 
QuotesPlus data.


One thought I have is to write all the data out to ASCII files using 
fputs(), then import it into a new data base using ASCII import.  But 
I have two questions:


1.  Is there a better way?
2.  Is there some way to setup and have the symbols placed in the 
same QP categories as in my original QP data base?


Thanks for help on this,
-- Keith




Re: [amibroker] automatic import

2010-08-27 Thread Keith McCombs

Ju --
If you need to do this infrequently, you can use AB's ASCII import 
Import Wizard and ASCII Import.  They are very easy to use and quite fast.


If you want to do this every day or even more often, then you will 
probably want to do it programmatically.  Take a look at the file 
functions, fopen, fgets, etc. for reading data.  If, you do not need to 
save the results to a file, you can save and use them temporarily using 
StaticVarSet and StaticVarGet.  If you wish to save them in AmiBroker 
type data files then see AddToComposite().


-- Keith

On 8/27/2010 09:23, Ju wrote:


I have some data from sources that are not directly integrated with 
Amibroker/Amiquote. I want them to be automatically loaded into AB. 
Does AB provide any programmable interface? Is .afl coding the only 
solution? How is .afl performance if the data is huge?





[amibroker] Using QP EOD data and AB 64bit

2010-08-27 Thread Keith McCombs
I would like to use AB 64bit for running exhaustive optimization on 
QuotesPlus EOD data.  However, AB does not have a 64bit plugin for 
QuotesPlus data.


One thought I have is to write all the data out to ASCII files using 
fputs(), then import it into a new data base using ASCII import.  But I 
have two questions:


1.  Is there a better way?
2.  Is there some way to setup and have the symbols placed in the same 
QP categories as in my original QP data base?


Thanks for help on this,
-- Keith


Re: [amibroker] Using QP EOD data and AB 64bit

2010-08-27 Thread Keith McCombs

TJ --
Running the Scan helped.  However, that leads me to another question or two:
I had set up the data base, QP3L, with local enabled a while ago, in 
addition to my already existing local disabled data base, QP3.


1.  QP3L does not update when running either AB32 or AB64.  So it has no 
new data since early July.  Is there some way to update it?  I could 
delete QP3, if that would help.


2.  In your instruction 2 below, why did you capitalize the word ONCE.  
ONCE is enough? Or, more than ONCE is a problem?


Thanks so much for your help.
-- Keith

On 8/27/2010 15:54, Tomasz Janeczko wrote:


Hello,

It is easy (no need to export/import):

1. Setup the QP2 database using 32 bit version, make sure that local 
data storage is enabled

2. Run a scan over all symbols ONCE using 32 bit version.
3. Run 64-bit AmiBroker on that QP2 database. It does not matter that 
you don't have QP2 plugin

in 64-bit, it will use locally stored data.


Best regards,
Tomasz Janeczko
amibroker.com

On 2010-08-27 21:19, Keith McCombs wrote:

I would like to use AB 64bit for running exhaustive optimization on 
QuotesPlus EOD data.  However, AB does not have a 64bit plugin for 
QuotesPlus data.


One thought I have is to write all the data out to ASCII files using 
fputs(), then import it into a new data base using ASCII import.  But 
I have two questions:


1.  Is there a better way?
2.  Is there some way to setup and have the symbols placed in the 
same QP categories as in my original QP data base?


Thanks for help on this,
-- Keith




Re: [amibroker] Should All Symbols in Database Have Same Amount of Data?

2010-08-27 Thread Keith McCombs
The short answer is: padding is not necessary and should not be done.  
You can select Pad and align to reference symbol in Backtester 
Settings (pages 244 and 245 in Users Guide 5.20).  But this does not 
affect your data base.


AB knows how to handle missing data.  Using zero for prices could cause 
you lots of trouble.  AB assumes a missing bar had the same value as the 
close of the previous bar with no volume.  There is a big difference 
between what AB does, correctly, and setting a price to zero.


Missing data at the beginning of a data stream is no problem for AB.  AB 
just starts at the start of the stream.


On 8/27/2010 23:52, valuelive wrote:


Hi All

I am in the process of setting up my first AB database. Is it 
necessary (or preferable) for all symbols to contain data over the 
same period of time?


If so, should I pad symbols with zero and price and volume data for 
non trading weekdays and for dates prior to the symbol first trading 
on the exchange?


If not, then presumably it is ok (or even preferable)that the amount 
of data for each symbol within a database is variable (i.e. no padding 
with zero data).


Assuming that AB does not itself place any data length consistency 
requirements to perform correctly, what are the pros and cons of each 
approach from a technical analysis point of view?


kind regards
valuelive




Re: [amibroker] How to reduce optimization time ?

2010-08-26 Thread Keith McCombs
I just tried the QuickAFL as suggested by TJ below with a system which 
tests all of NASDAQ over 5 month period.  Data can go back as much as 
20years.  Improvement in Optimization time was about 30%.


I also made another observation.  I was already running a number of 
other programs, using from 25 to 40% of CPU time when I started AB.  It 
was taking about 18 seconds per iteration with QuickAFL off but only 
about 13 seconds with QuickAFL on.


But Wait.  I then closed all my programs, including AB.  Then restarted 
AB only.  Iteration times were reduced to 10 and 7 seconds 
respectively.  And finally, left AB running and restarted all the other 
programs.  Iteration times still about 10 and 7 seconds.  I'm guessing 
that the reason for this has something to do with how data is stored in 
cache.


BTW, I am running AB32 5.30.4 on XP64 SP2; Intel Core 2 Quad Q6600, 
2.4GHz; 8GB RAM.

-- Keith

On 8/25/2010 12:02, Tomasz Janeczko wrote:


Hello,

Turn on QuickAFL in the Automatic Analysis Settings.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-08-25 17:46, Perumal wrote:
 Hi all,

 My database has data for a period of 2 years of intra day data. I 
want to optimize certain parameters on a programme on the data of last 
6 months only. It takes 15 minutes for optimization.


 If I export only the the data of only last 6 months to a separate 
database (this database will contain only this 6 months data), it 
takes only 5 minutes for the same optimization.


 That is, for the same optimization on 6 months data, it takes long 
time if I use larger database, and takes less time if I use a small 
database. The problem is that I have to export the last 6 months data 
to a separate database every time I want to do optimization.


 I am sure there might be some way by which I could do the 
optimization on the main data base itself, without taking long time.


 Can somebody tell how to achieve this.

 With best regards

 UMR Perumal





 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

 For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
 http://www.amibroker.com/devlog/

 Yahoo! Groups Links








Re: [amibroker] Re: customized walk forward backtesting possible?

2010-08-20 Thread Keith McCombs

Ade --
If you decide that you do need to use CBT, this is, IMHO, the best 
document available on the subject.

http://www.amibroker.org/userkb/2008/03/16/amibroker-custom-backtester-interface-2/

-- Keith

On 8/20/2010 08:50, Howard B wrote:


Hi Ade --

I may be misunderstanding, but I don't see that CBT will be involved.  
I'm thinking something like this may work -- all in pseudo-afl code.


///
//  ConditionSwitch.afl
//
//  Determine the current condition
//
//  Use whatever foreign series and indicators you need
//  to set Condition to an integer value
//  Condition = ;
//
//  Use the switch statement to set the parameter values
Switch (Condition)
{
Case 1:
V1 = xxx;
V2 = xxx;
Break;
Case 2:
V1 = yyy;
V2 = yyy;
Break;
}
// Proceed with your trading system
//  using values of V1 and V2 that depend on broad conditions.
Buy = something related to V1 and V2;
Sell = ;

/

Or do you have something else in mind?

Thanks,
Howard


On Fri, Au
g 20, 2010 at 12:37 AM, adexie ade...@yahoo.com 
mailto:ade...@yahoo.com wrote:


thanks Howard for your suggestion. I guess the difficult part for
me is how to code it up. I found this online,

http://www.amibroker.com/kb/2008/05/19/historical-portfolio-backtest-metrics/
but it's not very comprehensive on custom backtest. Do you know of
any other documentation on this topic?

Thanks very much. And btw, big fan of your trading system book!

Ade


--- In amibroker@yahoogroups.com
mailto:amibroker%40yahoogroups.com, Howard B howardba...@...
wrote:

 Hi Ade --

 You might add logic code to your afl that identifies the
category of market
 condition, then sets the parameters the way you want them for that
 condition, and then continues on with the optimization.

 Perhaps using the Switch statement.

 Thanks,
 Howard

 On Thu, Aug 19, 2010 at 9:20 AM, adexie ade...@... wrote:

 
 
  Greetings all,
 
  I was wondering if anyone knows whether it is possible to do
customized
  walk forward backtesting with afl code? So I have control over
what
  parameter from IS to use in OS. For example, each time after a IS
  optimization, i would like to modify the parameter from the
optimization
  based on current market condition and then use that in OS,
Instead of
  directly use the best parameter in the OS test.
 
  Any input is greatly appreciated.
 
  Best,
  Ade
 
 
 






Re: [amibroker] Problem with ExportImage in AB 5.30.4?

2010-08-20 Thread Keith McCombs

Progster --
I recently noticed, with 5.30.4, something that may be related to the 
problem you are having.  Maybe not.


After a walk forward test, ~~~ISEQUITY and ~~~OSEQUITY are not written 
to disk until AB is closed.  Same goes for ~~~EQUITY after a backtest.  
This is driving me up a wall.  I used to copy and rename these files for 
safe keeping while AB was running.  Now I have to close AB first.  Very 
inconvenient.

-- Keith


On 8/20/2010 05:12, Progster wrote:

[Attachment(s) #TopText from Progster included below]

Hi,

Is is possible that the AB OLE Automation Object Model call
ExportImage() is broken in AB 5.30.4?

Despite everything I could think of to try, the images always come out
blank, like those attached.

Neither of the codes below work, and yet each was said to work on the
list in the past.

Operational attempts have included:

AB Open Dbl-Click on script
AB Open Run script from command window

AB Closed Dbl-Click on script
AB Closed Run script from command window

Results are always either: server error, AB crash, or it runs and
produces the blank chart.

When AB is open, it doesn't matter what layout/chart is up. Still no joy.

What could be (not) happening here???

- Progster

---

// ImageTest_01.js
AB = new ActiveXObject(Broker.Application);
AB.ActiveWindow.ExportImage( test.gif, 640, 480 );

// ImageTest_02.js

iWatchList = 8; /// you can define watch list number here

AB = new ActiveXObject(Broker.Application);
Qty = AB.Stocks.Count; for( i = 0; i  Qty; i++ )
{
Stk = AB.Stocks( i );
if( iWatchList  32 )
{
if( Stk.WatchListBits  ( 1  iWatchList ) )
{
Doc = AB.Documents.Open( Stk.Ticker );
WScript.Sleep( 4000 ); // 4 seconds delay
AB.ActiveWindow.ExportImage(Stk.Ticker + .png)
Doc.Close();
}
}
else
{
if( Stk.WatchListBits2  ( 1  ( iWatchList - 32 )) )
{
Doc = AB.Documents.Open( Stk.Ticker );
AB.ActiveWindow.ExportImage(Stk.Ticker + .png)
WScript.Sleep( 4000 ); // 4 seconds delay
Doc.Close();
}
}
}




Re: [amibroker] Re: Specified Optimizer Engine not found

2010-08-20 Thread Keith McCombs

TJ --
So that I can be sure that I have the correct CMAE.dll, could you please 
tell me its correct size, to the byte?
Also, I have two \Amibroker\ folders, one for 32bit AB only, the other 
for 64bit AB and Start in:.  So, where, precisely, should CMAE.dll be 
placed, with the 32bit or with the 64bit and StartIn?  Should it be in 
\AmiBroker\ or AmiBroker\Plugins\?


Thank you so much for your help with this.
-- Keith


Hello,

You can not rename optimizer plugins. You can not have 2 copies
with different names. Optimizer plugins have INTERNAL ID, that is 
independent of file name and the internal name is always used regardless

of file name. If you attempt to rename one and create another copy,
only ONE of those two DLLs will be loaded and used.
This can create problems because you will not know which one really is 
in use. So, don't mess with it.

Make sure that you have one and only ONE (most recent) plugin.

Best regards,
Tomasz Janeczko
amibroker.com

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Keith McCombs kmcco...@... wrote:


 Nope. That doesn't work.
 Thanks anyway,
 -- Keith

 On 8/19/2010 10:48, amiuser999 wrote:
 
  Actually, I think even if they are differenmt file names but simply
  copies of another one you might still have problems. Try removing one
  from the directory completely...
 
  --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com 
mailto:amibroker%40yahoogroups.com,

  Keith McCombs kmccombs@ wrote:
  
   I know. They were originally in two different directories. I 
rename to
   avoid conflict and so that I will know what one AB is looking 
for as

  in:
   CMAE.dll vs CMAE.dll.no
  
   On 8/19/2010 01:42, amiuser999 wrote:
   
I don't think you can have more than 1 dll with the same name 
in the

plugin directory ...
   
--- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com

  mailto:amibroker%40yahoogroups.com
  mailto:amibroker%40yahoogroups.com,
Keith McCombs kmccombs@ wrote:

 Oops, forgot to mention that OS is XP 64bit SP2.

 On 8/18/2010 23:12, Keith McCombs wrote:
 
  Using AB 5.30.4 32bit, I get an error message, /Specified
  Optimizer
  Engine not found/, when I specify, 
|OptimizerSetEngine(cmae);|.

  However, no problem with either trib or spso.
  I also have two CMAE.dll files (recent, 34,304bytes and older,
  60,416bytes). Both are versions 1.0.0.1.
 
  Any help would be greatly appreciated.
  Thank you,
  -- Keith
 
 

   
   
  
 
 





Re: [amibroker] Problem with ExportImage in AB 5.30.4?

2010-08-20 Thread Keith McCombs

TA --
Save did the trick.  So simple.
Thank you very much
-- Keith


You don't need to close AB. Just use save or save all.

*From:* amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] 
*On Behalf Of *Keith McCombs

*Sent:* Friday, August 20, 2010 11:16 AM
*To:* amibroker@yahoogroups.com
*Subject:* Re: [amibroker] Problem with ExportImage in AB 5.30.4?

Progster --
I recently noticed, with 5.30.4, something that may be related to the 
p roblem you are having.  Maybe not.


After a walk forward test, ~~~ISEQUITY and ~~~OSEQUITY are not written 
to disk until AB is closed.  Same goes for ~~~EQUITY after a 
backtest.  This is driving me up a wall.  I used to copy and rename 
these files for safe keeping while AB was running.  Now I have to 
close AB first.  Very inconvenient.

-- Keith


On 8/20/2010 05:12, Progster wrote:

Hi,

Is is possible that the AB OLE Automation Object Model call
ExportImage() is broken in AB 5.30.4?

Despite everything I could think of to try, the images always come
out
blank, like those attached.

Neither of the codes below work, and yet each was said to work on the
list in the past.

Operational attempts have included:

AB Open Dbl-Click on script
AB Open Run script from command window

AB Closed Dbl-Click on script
AB Closed Run script from command window

Results are always either: server error, AB crash, or it runs and
produces the blank chart.

When AB is open, it doesn't matter what layout/chart is up. Still
no joy.

What could be (not) happening here???

- Progster

---

// ImageTest_01.js
AB = new ActiveXObject(Broker.Application);
AB.ActiveWindow.ExportImage( test.gif, 640, 480 );

// ImageTest_02.js

iWatchList = 8; /// you can define watch list number here

AB = new ActiveXObject(Broker.Application);
Qty = AB.Stocks.Count; for( i = 0; i  Qty; i++ )
{
Stk = AB.Stocks( i );
if( iWatchList  32 )
{
if( Stk.WatchListBits  ( 1  iWatchList ) )
{
Doc = AB.Documents.Open( Stk.Ticker );
WScript.Sleep( 4000 ); // 4 seconds delay
AB.ActiveWindow.ExportIm age(Stk.Ticker + .png)
Doc.Close();
}
}
else
{
if( Stk.WatchListBits2  ( 1  ( iWatchList - 32 )) )
{
Doc = AB.Documents.Open( Stk.Ticker );
AB.ActiveWindow.ExportImage(Stk.Ticker + .png)
WScript.Sleep( 4000 ); // 4 seconds delay
Doc.Close();
}
}
}




Re: [amibroker] How to use Plot from plugin dll

2010-08-19 Thread Keith McCombs

Ron --
I receive and save all postings via email.  There were no responses to 
Dimaz's 7/20/10 posting other than yours.
You might try contacting him directly, at kij...@gmail.com, to see he 
has made any progress.

-- Keith

On 8/19/2010 13:14, ronald davis wrote:


I just now started to learn programming.

I tried many times to add Plot to the FunctionTag gFunctionTable[],
but Visual Studio  always  complained.

I would appreciate receiving code with source code
that calls Plot ,so I can add it to my AFL plugin
dllFunctionTag gFunctionTable[]

If anyone is interested in my AFL plugin with source code,
let me know, and I will be happy to post it.
The called indicators are Stochk, StochD, RMI, PDI, ADX.
Here is how these dll called indicators appear in a formula
editor chart panexStochK();xStochD();xPDI();xADX();xRMI();

I then added k=, d=, pi=,x=,and m= to these plugin
called xIndicators.
k=xStochK();d=xStochD();pi=xPDI();x=xADX();m=xRMI();
km=(k+m)/2;kdm=(k+d+m)/3;kd=(k+d)/2;xpd(x+pi+d)/3;
xd=(x+d)/2;xpi=(x+pi)/2;kd=(k+d)/2;dm=(d+m)/2;kd=(k+d)/2;

I then commented out the built-in Amibroker indicators,
and these xIndicators caused my smoothing algorithms
to still plot the  same algorithm smoothed lines.
Thanks for any help,  Ron D

I saved Dimaz's Jul 20, 2010 at 11:08 AM post entitledHow to use 
Plot from plugin dll.
I just now went to the  message board, to look for possible followup 
posts, and FWIW

Dimaz's post is no longer at this July 20 messages link.
http://finance.groups.yahoo.com/group/amibroker/messages/151240?viscount=-30l=1 
http://finance.groups.yahoo.com/group/amibroker/messages/151240?viscount=-30l=1


Dimaz asked'What is the correct format of using Plot in plugin dll?
I try this code below, which partially works. But only array,
color,xshift and zorder seems to agree on input. The others seem to
completely ignore them. It puzzles me.
Thanks for you patience and help,
Dimaz

AmiVar VmyPlot( int NumArgs, AmiVar *args ) {

AmiVar close = gSite.GetVariable( Close );
AmiVar colorYellow = oneValArray( 42 ); //--- AmiVar array of number 42

AmiVar plotArg[8];
plotArg[0] = close;//price
plotArg[1].string = my plot;//name string
plotArg[2] = colorYellow;//color
plotArg[3].val = 2 ;//style
plotArg[4].val = 0;//minValue
plotArg[5].val = 0;//maxValue
plotArg[6].val = 0; //Xshift
plotArg[7].val = 0; //zorder
AmiVar result = gSite.CallFunction( plot, 8, plotArg );
return result;
}
FunctionTag gFunctionTable[] = {
myPlot, { myPlot, 0, 0, 0, 0, NULL }
};




Re: [amibroker] Re: Specified Optimizer Engine not found

2010-08-19 Thread Keith McCombs

Nope.  That doesn't work.
Thanks anyway,
-- Keith

On 8/19/2010 10:48, amiuser999 wrote:


Actually, I think even if they are differenmt file names but simply 
copies of another one you might still have problems. Try removing one 
from the directory completely...


--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Keith McCombs kmcco...@... wrote:


 I know. They were originally in two different directories. I rename to
 avoid conflict and so that I will know what one AB is looking for as 
in:

 CMAE.dll vs CMAE.dll.no

 On 8/19/2010 01:42, amiuser999 wrote:
 
  I don't think you can have more than 1 dll with the same name in the
  plugin directory ...
 
  --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com 
mailto:amibroker%40yahoogroups.com,

  Keith McCombs kmccombs@ wrote:
  
   Oops, forgot to mention that OS is XP 64bit SP2.
  
   On 8/18/2010 23:12, Keith McCombs wrote:
   
Using AB 5.30.4 32bit, I get an error message, /Specified 
Optimizer

Engine not found/, when I specify, |OptimizerSetEngine(cmae);|.
However, no problem with either trib or spso.
I also have two CMAE.dll files (recent, 34,304bytes and older,
60,416bytes). Both are versions 1.0.0.1.
   
Any help would be greatly appreciated.
Thank you,
-- Keith
   
   
  
 
 





Re: [amibroker] Real-Time Data Exploration Problem

2010-08-18 Thread Keith McCombs

Tom --
In Automatic AnalysisSettingsBackester settingsGeneral, try setting 
Periodicity: to 1 minute.


Alternatively, you can use TimeFrameSet() function (page 798 of .pdf 
file, Amibroker 5.20 User's Guide) and associated functions under SEE 
ALSO.  Use it with:

if(status(actionExplore))
{
   your explore code including TimeFrameSet()
}

-- Keith



On 8/17/2010 14:48, Tom wrote:


I have only had amibroker for a few days but am having a problem with 
realtime quotes...


I have eSignal data (FX only) and have setup the database per the 
Amibroker help files. (1 minute as they suggested).


I have tried 1, 5, 15, hourly, daily charts and they all work great.

The problem I am having is with the exploration. Using the following 
code


**
Nbars=Param(Num Bars,20,1,5000);

ticker = ParamStr( Ticker, EUR A0-FX );

Filter = (Name()==ticker) AND (BarIndex()=(Nbars-1));
AddColumn(C,Close,1.4);
**

I get the following results for the exploration (setting Nbars to 10):

Ticker Date/Time Close
EUR A0-FX 5/25/2010 11:45:00 PM 1.2295
EUR A0-FX 5/26/2010 11:45:00 PM 1.2224
EUR A0-FX 5/27/2010 11:45:00 PM 1.2299
EUR A0-FX 5/28/2010 6:00:00 PM 1.2281
EUR A0-FX 5/30/2010 11:45:00 PM 1.2317
EUR A0-FX 5/31/2010 11:45:00 PM 1.2255
EUR A0-FX 6/1/2010 11:45:00 PM 1.2211
EUR A0-FX 6/2/2010 11:45:00 PM 1.2292
EUR A0-FX 6/3/2010 11:45:00 PM 1.2177
EUR A0-FX 6/4/2010 6:00:00 PM 1.1966

I was wanting to get 1 minute bars, but am getting daily bars.

Any ideas about what I am doing wrong??

Thanks
Tom




Re: [amibroker] Re: req afl code for finding score for each stock find best score stocks by explore

2010-08-18 Thread Keith McCombs

DownTrend = (totalscore  -40 AND totalscore **= -99);

On 8/18/2010 20:32, Mubashar Virk wrote:


Hi All,

There is an error in the following code that I am somehow not able to 
fix. While running the explorer The Score and Trend columns match 
till I get a score of -60. the corresponding Trend colums show a 
blank instead of showing downtrend.


I have highlighted the possible error area in bold. Please help.



//uptrend
event1 = IIf(C  MA(C,20),20,0);
event3 = IIf(CMA(C,50),35,0);
event5 = IIf(CMA(C,200),45,0);

// downtrend
event2 = IIf(C  MA(C,20),-20,0);
event4 = IIf(C  MA(C,50),-35,0);
event6 = IIf(C  MA(C,200),-45,0);

totalscore = event1 + event2 + event3 + event4 + event5 + event6;

//Plot(totalscore,  , colorRed);

Filter = 1;

AddColumn (totalscore , Score, 1.0);

*StrongUpTrend = totalscore == 100;
Neutral = (totalscore  -40 AND totalscore  40);
Uptrend = (totalscore  40 AND totalscore = 99);
DownTrend = (totalscore  -40 AND totalscore = -99);
StrongDownTrend = totalscore == -100;*


Trend =
WriteIf(StrongUpTrend , Strong UpTrend ,
WriteIf(Neutral , Neutral ,
WriteIf(Uptrend , Uptrend ,
WriteIf(DownTrend , DownTrend ,
WriteIf(StrongDownTrend , Strong DownTrend,
);

AddTextColumn(Trend, Trend, 5.6);
//


On 8/8/2010 4:35 PM, Mubashar Virk wrote:


Hi Ford,
I think I have removed the silly error now. Please see the attachments.
I am an EOD Trader and this scoring idea seems nice to me.
Mav


On 8/8/2010 2:32 PM, ford7k wrote:


Mr Mubashar virk

Many thanks for this superfast reply.
Real kind of you to provide me the code
you have separated trend in a good way
warm regards
keep your spirit up
ford
ps
please refer to
following
I am sure you must be well aware of it.
==
/* Formula Name: Trend Exploration: Slope Moving Average
Author/Uploader: marcus - marcusdavidsson
Date/Time added: 2009-09-20 06:38:06
Origin:
Keywords:
Level: basic
Flags: exploration
==
take care

--- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, Mubashar Virk mvir...@... wrote:


 //uptrend
 event1 = IIf(C  MA(C,20),20,0);
 event3 = IIf(CMA(C,50),35,0);
 event5 = IIf(CMA(C,200),45,0);

 // downtrend
 event2 = IIf(C  MA(C,20),-20,0);
 event4 = IIf(C  MA(C,50),-35,0);
 event6 = IIf(C  MA(C,200),-45,0);

 totalscore = event1 + event2 + event3 + event4 + event5 + event6;

 // Plot(totalscore,  , colorRed);

 Filter = 1;

 AddColumn (totalscore , Score, 1.0);

 Trend =
 WriteIf(totalscore == 100, Strong Uptrend,
 WriteIf(totalscore = -40 OR totalscore = 40 OR totalscore  0 AND
 totalscore = 40, Neutral, // this argument needs to be written 
more

 accurately.
 WriteIf(totalscore  40 AND totalscore = 99, Uptrend,
 WriteIf(totalscore  -40 AND totalscore = -99, Downtrend,
 WriteIf(totalscore == -100, Strong Down Trend,
 );

 On 8/8/2010 10:43 AM, ford7k wrote:
 
 
  Hi afl experts
 
  I am trying to make an afl code.
  This code uses points alloted to each event like
  price above 20dma =20,
  price above 50dma=35 pointr,
  price goes above 200=45 points.
 
  if the opposite happens,score is negative,
  price cross below 20ma= -20 points
  price cross below 50ma = -35 points
  price cross below 200dma = -45 points
 
  I like to see the total score at current time or current day or 
anyday

  on screen or in exploration
 
  Can I try this way
  event1
  iif(c  ma(c,20),20,0);
  event3
  iif(cma(c,50),35,0);
  event5
  iif(cma(c,200),45,0);
 
  event2
  iif(c  ma(c,20),-20,0);
  event4
  iif(c  ma(c,50),-35,0);
  event6
  iif(c ma(c,200),-45,0);
 
  total score =
  example
  currently event1 occured,event3 occured and event6 occured
  the score is =5
  current total score = 20+30+(-45) =5 means mild uptrend or neutral
 
  suppose
  event1 + event2 +event 3 occured then
  total score =20+35+45=100 strong uptrend occured
  time to initiate longs
  suppose
  event2 +event4+event6 occured,
  we get total score =-100 strong downtrend-time to initiate shorts
 
  the score summation was used in,Mr Hiutels against all odds. afl
 
  I just gave the line of my thinking
  please give some help
 
  regards
  thanks
  ford
 
 









Re: [amibroker] Re: req afl code for finding score for each stock find best score stocks by explore

2010-08-18 Thread Keith McCombs
BTW, you're going to have a similar problem when totalscore is exactly 
40 or -40.
Also I would use  -100 and  100, just to cover all possibilities (if 
later code modifications make fractional totalscores possible).


On 8/18/2010 21:29, Mubashar Virk wrote:


:-)

On 8/19/2010 6:15 AM, Keith McCombs wrote:


DownTrend = (totalscore  -40 AND totalscore **= -99);

On 8/18/2010 20:32, Mubashar Virk wrote:


Hi All,

There is an error in the following code that I am somehow not able 
to fix. While running the explorer The Score and Trend columns 
match till I get a score of -60. the corresponding Trend colums 
show a blank instead of showing downtrend.


I have highlighted the possible error area in bold. Please help.



//uptrend
event1 = IIf(C  MA(C,20),20,0);
event3 = IIf(CMA(C,50),35,0);
event5 = IIf(CMA(C,200),45,0);

// downtrend
event2 = IIf(C  MA(C,20),-20,0);
event4 = IIf(C  MA(C,50),-35,0);
event6 = IIf(C  MA(C,200),-45,0);

totalscore = event1 + event2 + event3 + event4 + event5 + event6;

//Plot(totalscore,  , colorRed);

Filter = 1;

AddColumn (totalscore , Score, 1.0);

*StrongUpTrend = totalscore == 100;
Neutral = (totalscore  -40 AND totalscore  40);
Uptrend = (totalscore  40 AND totalscore = 99);
DownTrend = (totalscore  -40 AND totalscore = -99);
StrongDownTrend = totalscore == -100;*


Trend =
WriteIf(StrongUpTrend , Strong UpTrend ,
WriteIf(Neutral , Neutral ,
WriteIf(Uptrend , Uptrend ,
WriteIf(DownTrend , DownTrend ,
WriteIf(StrongDownTrend , Strong DownTrend,
);

AddTextColumn(Trend, Trend, 5.6);
//


On 8/8/2010 4:35 PM, Mubashar Virk wrote:


Hi Ford,
I think I have removed the silly error now. Please see the attachments.
I am an EOD Trader and this scoring idea seems nice to me.
Mav


On 8/8/2010 2:32 PM, ford7k wrote:


Mr Mubashar virk

Many thanks for this superfast reply.
Real kind of you to provide me the code
you have separated trend in a good way
warm regards
keep your spirit up
ford
ps
please refer to
following
I am sure you must be well aware of it.
==
/* Formula Name: Trend Exploration: Slope Moving Average
Author/Uploader: marcus - marcusdavidsson
Date/Time added: 2009-09-20 06:38:06
Origin:
Keywords:
Level: basic
Flags: exploration
==
take care

--- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, Mubashar Virk mvir...@... 
wrote:


 //uptrend
 event1 = IIf(C  MA(C,20),20,0);
 event3 = IIf(CMA(C,50),35,0);
 event5 = IIf(CMA(C,200),45,0);

 // downtrend
 event2 = IIf(C  MA(C,20),-20,0);
 event4 = IIf(C  MA(C,50),-35,0);
 event6 = IIf(C  MA(C,200),-45,0);

 totalscore = event1 + event2 + event3 + event4 + event5 + event6;

 // Plot(totalscore,  , colorRed);

 Filter = 1;

 AddColumn (totalscore , Score, 1.0);

 Trend =
 WriteIf(totalscore == 100, Strong Uptrend,
 WriteIf(totalscore = -40 OR totalscore = 40 OR totalscore  0 AND
 totalscore = 40, Neutral, // this argument needs to be 
written more

 accurately.
 WriteIf(totalscore  40 AND totalscore = 99, Uptrend,
 WriteIf(totalscore  -40 AND totalscore = -99, Downtrend,
 WriteIf(totalscore == -100, Strong Down Trend,
 );

 On 8/8/2010 10:43 AM, ford7k wrote:
 
 
  Hi afl experts
 
  I am trying to make an afl code.
  This code uses points alloted to each event like
  price above 20dma =20,
  price above 50dma=35 pointr,
  price goes above 200=45 points.
 
  if the opposite happens,score is negative,
  price cross below 20ma= -20 points
  price cross below 50ma = -35 points
  price cross below 200dma = -45 points
 
  I like to see the total score at current time or current day 
or anyday

  on screen or in exploration
 
  Can I try this way
  event1
  iif(c  ma(c,20),20,0);
  event3
  iif(cma(c,50),35,0);
  event5
  iif(cma(c,200),45,0);
 
  event2
  iif(c  ma(c,20),-20,0);
  event4
  iif(c  ma(c,50),-35,0);
  event6
  iif(c ma(c,200),-45,0);
 
  total score =
  example
  currently event1 occured,event3 occured and event6 occured
  the score is =5
  current total score = 20+30+(-45) =5 means mild uptrend or neutral
 
  suppose
  event1 + event2 +event 3 occured then
  total score =20+35+45=100 strong uptrend occured
  time to initiate longs
  suppose
  event2 +event4+event6 occured,
  we get total score =-100 strong downtrend-time to initiate shorts
 
  the score summation was used in,Mr Hiutels against all odds. afl
 
  I just gave the line of my thinking
  please give some help
 
  regards
  thanks
  ford
 
 











[amibroker] Specified Optimizer Engine not found

2010-08-18 Thread Keith McCombs
Using AB 5.30.4 32bit, I get an error message, /Specified Optimizer 
Engine not found/, when I specify, |OptimizerSetEngine(cmae);|.

However, no problem with either trib or spso.
I also have two CMAE.dll files (recent, 34,304bytes and older, 
60,416bytes).  Both are versions 1.0.0.1.


Any help would be greatly appreciated.
Thank you,
-- Keith


Re: [amibroker] Specified Optimizer Engine not found

2010-08-18 Thread Keith McCombs

Oops, forgot to mention that OS is XP 64bit SP2.

On 8/18/2010 23:12, Keith McCombs wrote:


Using AB 5.30.4 32bit, I get an error message, /Specified Optimizer 
Engine not found/, when I specify, |OptimizerSetEngine(cmae);|.

However, no problem with either trib or spso.
I also have two CMAE.dll files (recent, 34,304bytes and older, 
60,416bytes).  Both are versions 1.0.0.1.


Any help would be greatly appreciated.
Thank you,
-- Keith




Re: [amibroker] Re: Specified Optimizer Engine not found

2010-08-18 Thread Keith McCombs
I know.  They were originally in two different directories.  I rename to 
avoid conflict and so that I will know what one AB is looking for as in: 
CMAE.dll vs CMAE.dll.no


On 8/19/2010 01:42, amiuser999 wrote:


I don't think you can have more than 1 dll with the same name in the 
plugin directory ...


--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Keith McCombs kmcco...@... wrote:


 Oops, forgot to mention that OS is XP 64bit SP2.

 On 8/18/2010 23:12, Keith McCombs wrote:
 
  Using AB 5.30.4 32bit, I get an error message, /Specified Optimizer
  Engine not found/, when I specify, |OptimizerSetEngine(cmae);|.
  However, no problem with either trib or spso.
  I also have two CMAE.dll files (recent, 34,304bytes and older,
  60,416bytes). Both are versions 1.0.0.1.
 
  Any help would be greatly appreciated.
  Thank you,
  -- Keith
 
 





Re: [amibroker] Max. Drawdowns greater than L. Tot. Loss?

2010-08-16 Thread Keith McCombs

Michael --
If you invest $10,000 in a stock and it drops to $6,000, but then 
returns to $9,000, and then you sell it, that stock has experienced a 
$4,000 MDD, but only a $1,000 loss.


-- Keith

On 8/16/2010 16:25, michaels_musings wrote:


Hi All,

This has me baffled. I run an optimization and I end up with the Max. 
System Drawdown greater than the listed Losers Total Loss. Here's the 
fields in question.


Capital 100,000.00
Trade Size 10,000.00

Net Profit 5,315.42
Max. Trade Drawdown -2,615.84
Max. Trade % Drawdown -26.15
Max. Sys Drawdown -2,615.84
Max. Sys % Drawdown -2.49
# Trades 17.00
Avg Profit/Loss 312.67
Avg % Profit/Loss 3.13
# of winners 11.00
% of Winners 64.71
W. Tot. Profit 6,548.24
W. Avg. Profit 595.29
W. Avg % Profit 5.95
# of losers 6.00
% of Losers 35.29
L. Tot. Loss -1,232.81
L. Avg. Loss -205.47
L. Avg % Loss -2.05
Percent Profit 0.06
Percent Stop Loss 0.02

Net Profit calculates correctly from # Trades, # of winners, W. Avg % 
Profit, # of losers, and L. Avg % Loss.


So why are Max. Trade Drawdown and Max. Sys Drawdown greater than 
Losers Total Loss??? Isn't that technically impossible?


Regards,
Michael

From AB Guide:
Max. trade drawdown - The largest peak to valley decline experienced 
in any single trade
Max. system drawdown - The largest peak to valley decline experienced 
in portfolio equity
L. Tot. Loss - No Entry. Expected definition: Total loss from all 
losing trades.





Re: [amibroker] Re: Don't use AmiQuote ver 2.12 for Fundamental Data

2010-08-16 Thread Keith McCombs
The wish list is not the correct place to report the problem.  Real 
problems should be submitted to Support.


On 8/16/2010 16:00, donangiecarlson wrote:


Have documented and submitted the fact the AmiQuote is retrieving 
incorrect data into AB.guess it goes into the infamous Wish 
List. I had thought more people than myself were using Yahoo 
fundamental data, guess not. Thanks all for your suggestions.


--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
wavemechanic olesmi...@... wrote:


 I'm sure that if you document the errors they will be fixed.
 - Original Message -
 From: TA
 To: amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com
 Sent: August 16, 2010 2:20 PM
 Subject: RE: [amibroker] Re: Don't use AmiQuote ver 2.12 for 
Fundamental Data






 There are significant differences between the fundamental data shown 
on yahoo web site and what stores in AB for Certain tickers. In my 
case it is about 5% of the tickers in my database. From the response 
to this thread, I am guessing not many people use fundamental fields 
in AB. Or perhaps they use fundamental fields but they don't use yahoo 
as data source! If there would have been a big uproar TJ would have 
fixed it by now.




 From: amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com 
[mailto:amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com] On Behalf Of wavemechanic

 Sent: Monday, August 16, 2010 10:13 AM
 To: amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com
 Subject: Re: [amibroker] Re: Don't use AmiQuote ver 2.12 for 
Fundamental Data






 You indicated concern that there might be a problem with 'ticker' 
quotes which is why I brought up the difference between servers.




 I don't use fundamental data but looking at the AQ literature there 
is a difference in the type of data that is downloaded between basic 
and extended modes. For example, one of the differences that you note 
is the 'current dividend'. This is the annual dividend/share which 
basic downloads as 'Dividend Per Share' and is correctly shown as 
$1.92 for KYN. According to the same AQ literature 'Dividend Per 
Share' is not included in the extended download so the download 
correctly shows nothing for this category.




 I have not gone through the other categories but after taking into 
account the differences in data that is downloaded between the two 
modes as specified in the AQ literature do you still see unexplained 
differences?




 Bill

 - Original Message -

 From: donangiecarlson

 To: amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com

 Sent: August 16, 2010 12:07 PM

 Subject: [amibroker] Re: Don't use AmiQuote ver 2.12 for Fundamental 
Data




 Bill: I don't believe the problem is looking at different Yahoo 
servers; because you can use AmiQuote on different days...downloading 
Basic and Fundamental info and the same errors exist in AB. Here is an 
example of some fundamental info for just one ticker KYN... there 
are many such data descripencies problems that can be found:


 Yahoo AmiQuote AmiQuote
 KYN Basic Extended
 1.92 1.92 0 Current Dividend
 N/A 275,140 275,140 Forward Dividend
 0.18% 582,600,000% 582,600,000% % Held by Insiders
 17.50% 0.18% 0.18% % Held by Institutions
 7/2/2010 7/2/2010 7/8/2010 Ex-Dividend Date
 7/8/2010 7/9/2010 7/9/2010 Dividend Date

 o The first column are the value in Yahoo.
 o The second column are the values in AB after downloading Basic 
Fundamental data using AmiQuote.
 o The third column are the values in AB after downloading Extended 
Fundamental data using AmiQuote.


 Ton: Since you seem to use a different download program for 
retrieving Yahoo fundamental data for AB...what are your results for 
the above example. Also, what is the alternative program you are using 
to download yahoo fundamental data into AB?


 Don




 --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, wavemechanic olesmithy@ wrote:

 
  This could happen if the downloader and the viewed data are not 
looking at the same server - current and historical. Are apples and 
apples be compared or apples and oranges?

 
  Bill
  - Original Message -
  From: Ton Sieverding
  To: amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com
  Sent: August 16, 2010 3:54 AM
  Subject: Re: [amibroker] Don't use AmiQuote ver 2.12 for 
Fundamental Data

 
 
 
 
 
  Hi. If AmiQuote is unreliable and if Yahoo gives the correct data 
than I should not have the same errors when downloading Yahoo data 
with other downloaders. But I do ... Please prove me why AmiQuote is 
unreliable just by showing that downloading the same data from Yahoo 
and a different downloader gives different results. Not by just 
telling me that AmiQuote is unreliable ...

 
  Regards, Ton.
 
  - Original Message -
  From: donangiecarlson
  To: amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com
  Sent: Monday, August 16, 2010 2:21 AM
  Subject: 

Re: [amibroker] barcount help please

2010-08-07 Thread Keith McCombs

M D --
In the phrase for (i=startbar; iendbar;i++) neither startbar nor 
endbar can be arrays.  I believe that, so far, both of them are arrays.


You might want to redefine startbar and endbar to be something like this:
startbar = 
LastValue((Lookbackperiodindays*6.5*units)+nbarssinceopen(intradaytimeframe));

endbar = LastValue(nbarssinceopen(intradaytimeframe) +1);

However, I do not believe the above changes will help you in this 
particular case:  If you want to make calculations using different 
intraday time frames, you should use TimeFrameSet() and related 
functions.  See page 798 of Users Guide.


Then, more than likely, you should be able achieve your desired result, 
without the use of looping.


-- Keith

On 8/7/2010 11:00, mdkumar kumar wrote:


Thanks for the reply. I will post my problem directly. I am trying to 
find the highest 5-min volume bar


for the last n days excluding today. To that end, I wrote this code:
---
// to count number of bars since morning open. example 
NbarsSinceOpen(5) gives 12 at end of 1st

// 1 hour of trading. timeframe parameter is in minutes.

function NbarsSinceOpen(timeframe)
{
 Currentbar = 0; Openbar = 0; //initializing local variables
 n = 60/timeframe; //60 min/ timeframein min
 Openbar = 9 * n;
 Currentbar = round(Hour()*n + (Minute()/timeframe));
return (Currentbar-Openbar);
}

// gives highest volume bar for the last 'Lookbackperiodindays' days;
//highestvolume(3,5) gives highest 5-min volume for the last 3 days 
excluding today.


function Highestvolume(Lookbackperiodindays,intradaytimeframe)
{
 units = 60/intradaytimeframe;
 startbar = 
(Lookbackperiodindays*6.5*units)+nbarssinceopen(intradaytimeframe);

 endbar = nbarssinceopen(intradaytimeframe) +1;
 Highestvol = 0;
 i=O;
 for (i=startbar;iendbar;i++)
{
startbar-=1;
Highestvol = Max(Ref(Volume,-startbar),Ref(Volume,-startbar+1));

}

  return Highestvol;
}


printf(highestvolume is:+Highestvolume(2,5));
--


when i run this i get error 6 saying in line 21 column 6.
Error 6. Condition in IF, WHILE, FOR statements has to be Numeric or 
Boolean type. You can not use array here, please use [] (array 
subscript operator) to access array elements


Thanks in advance,

Regards,
M D KUMAR
On Sat, Aug 7, 2010 at 6:55 PM, reinsley reins...@yahoo.fr 
mailto:reins...@yahoo.fr wrote:



Hi,

Many topic about that. I kept these lines in my AB bible.

Best regards

Barcount vs BarIndex()

BarCount is a numeric variable that holds just one number (the
count of elements in array).
On the other hand BarIndex() is a function that returns ARRAY
representing consecutive index of each bar.

BarCount IS DYNAMIC, DEPENDENT on ZOOM.

Short advice:
DO NOT use BarCount for ANYTHING else than building a for loop that
iterates through array elements like
this:
for( i = 0 ; i  BarCount; i++ )
{
array[ i ] = H[ i ] + L[ i ];
}

Visible Bars Count

VisibleBars = Status( LastVisibleBarIndex ) -
Status(FirstVisibleBarIndex );// gives a wrong count

With the function GetVisibleBarCount result is correct

function GetVisibleBarCount()
{
lvb = Status(lastvisiblebar);
fvb = Status(firstvisiblebar);

return Min( Lvb - fvb, BarCount - fvb );
}

VisibleBars = GetVisibleBarCount();
_TRACE(VisibleBars = + VisibleBars );




Le 07/08/2010 14:13, mdkumarz a écrit :


Hi,
my understanding is this:
barcount counts all the bars in the chart (not just visible);
so, i have written
printf(bars in the chart:+barcount);
it's giving different number of bars when zoomed in and zoomed out.
Does barcount look at visible bars only?

Regards,
M D KUMAR






--
Yours sincerely,

M D KUMAR
786533
Mumbai



Re: [amibroker] Segregating AB files for 32bit and 64bit?

2010-08-07 Thread Keith McCombs

Dennis --
When you do a full install (not an upgrade), AB first asks where to 
install AB, and then asks where to install support files (including all 
.afl code, data bases, etc.).  Ideally, you would put AB32 in one 
folder, AB64 in a second one, and AB support files in a third.  The AB 
support files would be shared by AB32 and AB64.


That's very easy, if you do it from the very start.  I have found it to 
be more difficult, because I wanted to preserve many years of historical 
work, programs, layouts, watch lists, results, etc..  This is what I did 
on my PC after upgrading from Win2k (32bit) to XP64:

1.  Saved all of C:\Program Files\Amibroker\ from Win2K system.
Remaining operations all performed on new XP64 system:
2.  Did a fresh install of AB32 into c:\Program Files\Amibroker\, 
including AB32 and all support files.

3.  Copied saved Win2K AB right over AB32 installed in step 2 above.
4.  Did a second fresh install of AB32 on XP64 into c:\Program Files 
(x86)\Amibroker\, but with support folder as c:\Program Files\Amibroker\.

5.  Did a fresh install of AB64 into c:\Program Files\Amibroker\.

This works for me.  I run both AB32 and AB64 interchangeably, though not 
simultaneously.


I would much prefer to have AB support folder outside of any c:\Program 
Files \.  But have not been able to do so, after many tedious 
efforts, including correspondence with AB support.


BTW, according to TJ, AB32 and AB64 can be installed in any folders.  
They do not have to be in c:\Program Files ...\.


Hope this helps.
-- Keith

BTW, if you manage to somehow set up three different folders, with all 
your history preserved in an independent support one, please let me know 
how you did it.


On 8/7/2010 12:20, Dennis Brown wrote:


Hello,

I just installed a clean upgrade of Windows 7 64 bit as a new virtual 
machine in Parallels on my Mac Pro. I also have an XP 32 bit virtual 
machine that I was upgrading from which contains my AmiBroker folder 
with all the associated files.


I did a full install of AB 64 bit on the new VM. I also have the 64 
bit IQFeed installed. Everything seems to work fine.


I can run the XP 32 bit or the W7 64 bit system alternately. I have 
attached the XP virtual C: disk drive to the 64 bit system as another 
drive, so the 64 bit system can read or copy over anything from the 
old system, just like it was an external backup drive.


This made for a very easy upgrade in just a couple of hours last night.

However, I realized, that I am setting myself up for duplicating the 
data for AB which will take a lot of extra disk drive space (I really 
only have one disk drive that I run from, even though it is broken up 
into several virtual drives). So, I want to clean up my act and make a 
separate virtual hard drive just for the AB stuff. Tomasz has stated 
that he has a drive F: for all his program files, so that he can share 
them more easily between systems. That would be very easy for me to 
set up.


My question then becomes one of organization of the AB folder so that 
I can have both a 32 bit and a 64 bit version installed, but have 
common files between them whenever possible.


I want to be able to run each alternately, not at the same time. This 
will give me a way to compare performance. It also seems that my 
previously written very simple DLL for my Flexible Parameters does not 
run on the 64 bit W7. So, I will have to work on reinventing the wheel 
from two years ago again to move forward.


Another advantage of putting the AB stuff in a different virtual drive 
from the rest of the VM is that incremental backups on my Mac will be 
more efficient. It might even make sense from that point of view, to 
break the AB stuff up into two virtual disks -- a separate disk for 
the databases which could be recovered from a backfill if needed, so 
it would not need multiple incremental backups.


Can this be done?
Which files can be common between 32 and 64 bit AB?
Where do I put the 32bit and 64 bit programs so that they can each run 
with the same layouts and formulas and databases?


Best regards,
Dennis




Re: [amibroker] EOD exit

2010-08-06 Thread Keith McCombs

I have some questions:
I thought that TimeNum() returned the time stamp of an existing bar, so 
that if you were using 1 minute bars, you would not get the signal until 
125600, or with 5 minute bars until 13.  Is that not correct?


Wouldn't it be better to use either TimeNum() = 125500 (for 
backtesting); and Now(4)  125500 (for real time trading)?


-- Keith

On 8/6/2010 10:24, Sidney Kaiser wrote:


Thanks, so simple..I just wasn't seeing the answer.  Sid

--- On *Fri, 8/6/10, reinsley /reins...@yahoo.fr/* wrote:


From: reinsley reins...@yahoo.fr
Subject: Re: [amibroker] EOD exit
To: amibroker@yahoogroups.com
Date: Friday, August 6, 2010, 12:22 AM




Hi,

Buy = âEUR¦your conditionsâEUR¦.
Sell = âEUR¦.your conditionsâEUR¦. OR TimeNum()  125500;

For example - MACD crossover :

Buy = Cross( MACD(), Signal() );
Sell = Cross( Signal(), MACD() ) OR TimeNum()  125500;


Best regards

Le 06/08/2010 05:45, Sidney Kaiser a écrit :

Hi Gang,
I'm evaluating a simple day trading concept and I need a quick
and easy way to exit the trade at 1255 hours.  What code do I
need to exit either short or long near EOD.
TIA
SId








Re: [amibroker] EOD exit

2010-08-06 Thread Keith McCombs

AB Users Guide says of TimeNum,
Returns the array with numbers that represent quotation time coded as 
follows:


So I guess that means what it says, 'quotation' time.

Thanks to Ed and reinsley for putting me back on track.
-- Keith

On 8/6/2010 13:22, Edward Pottasch wrote:


funny I just ran into that problem yesterday. I also thought this 
would be the case. For my auto system I used Hermans code for a new 
bar, like:

PrevTN = StaticVarGet(TimeNumber + Name() + combiSys);
TN = LastValue(TimeNum());
NewBar = TN != PrevTN;
StaticVarSet(TimeNumber + Name() + combiSys,TN);
however,
if (NewBar)
{
}
inside a 5 minute chart will give a true value each minute.
I needed to use:
if (NewBar AND LastValue(round(Minute()/(Interval()/60)) - 
Minute()/(Interval()/60)) != 0)

{
}
this will give a true value every 5 minutes inside a 5min chart.
regards, Ed

*From:* Keith McCombs mailto:kmcco...@engineer.com
*Sent:* Friday, August 06, 2010 7:06 PM
*To:* amibroker@yahoogroups.com mailto:amibroker@yahoogroups.com
*Subject:* Re: [amibroker] EOD exit

I have some questions:
I thought that TimeNum() returned the time stamp of an existing bar, 
so that if you were using 1 minute bars, you would not get the signal 
until 125600, or with 5 minute bars until 13.  Is that not correct?


Wouldn't it be better to use either TimeNum() = 125500 (for 
backtesting); and Now(4)  125500 (for real time trading)?


-- Keith

On 8/6/2010 10:24, Sidney Kaiser wrote:


Thanks, so simple..I just wasn't seeing the answer.  Sid

--- On *Fri, 8/6/10, reinsley /reins...@yahoo.fr/* wrote:


From: reinsley reins...@yahoo.fr
Subject: Re: [amibroker] EOD exit
To: amibroker@yahoogroups.com
Date: Friday, August 6, 2010, 12:22 AM




Hi,

Buy = âEUR¦your conditionsâEUR¦.
Sell = âEUR¦.your conditionsâEUR¦. OR TimeNum()  125500;

For example - MACD crossover :

Buy = Cross( MACD(), Signal() );
Sell = Cross( Signal(), MACD() ) OR TimeNum()  125500;


Best regards

Le 06/08/2010 05:45, Sidney Kaiser a écrit :

Hi Gang,
I'm evaluating a simple day trading concept and I need a quick
and easy way to exit the trade at 1255 hours.  What code do I
need to exit either short or long near EOD.
TIA
SId









Re: [amibroker] The Speed of Optmization

2010-08-05 Thread Keith McCombs

Howard --
There are two problems with your solution:
1.  You still get 400 optimizations instead of desired 210.
2.  Secondvar is not conveniently numbered.

-- Keith

On 8/5/2010 11:13, Howard B wrote:


Hi Kusnadi --

For an alternative method to insure that the second variable is always 
greater than the first, change this code:

///

firstvar = Optimize(Firstvar,1,1,20,1);
Secondvar = Optimize(Secondvar,1,1,firstvar,1);

Buy = Sell = True;
/

to this code:
///
firstvar = Optimize(Firstvar,1,1,20,1);
VarIncrement = Optimize(VarIncrement,1,1,20,1);

Secondvar = firstvar + VarIncrement;

Buy = Sell = True;
/

Thanks,
Howard




On Thu, Aug 5, 2010 at 12:17 AM, Kusnady saw...@yahoo.co.id 
mailto:saw...@yahoo.co.id wrote:


Dear friends,

is there anyone having some experiences with parameter of
optimization?

Look at the afl below:

/
firstvar = Optimize(Firstvar,1,1,20,1);
Secondvar = Optimize(Secondvar,1,1,firstvar,1);

Buy = Sell = True;
/

I need the Secondvar is always less than firstvar, so above I put
firstvar as the maximum of SecondVar optimize definition.

But once optimized, the SecondVar can be bigger than firstvar

This slowdown the optimization process.do you think so?

Could you help me how to code efficiently, so the engine just take
the firstvar as the maximum for secondvar instead of 20.

Regards
Kusnadi





Re: [amibroker] Re: Trading Systems, Position Sizing and Monte Carlo Analysis

2010-07-31 Thread Keith McCombs

Howard --
I take issue with your statement, /Think about it this way --  You have 
a profitable system.  If you reduce your position size when trades have 
some profit and, on average, the trades go on to be more profitable, you 
forfeit some of the potential profit.  If you reduce your position size 
when trades have some profit and, on average, the trades go on to become 
losers, your exit logic needs to be revised./.


Nobody HAS a profitable system.  One may have traded or tested a system 
that WAS profitable.  But that does not mean the system IS profitable.  
Therefore, the fact that profits were reduced in the past from a 
historically profitable system, has very little meaning, as to what it 
tells us about the future, if/when it bites the dust.  If a system that 
was profitable in the past becomes unprofitable when it is traded in the 
future, scaling (and for that matter using stops) may protect one from 
larger losses, or even complete financial calamity.


In order to test if a system might be helped by scaling or stops, one 
should, I guess, test one that was unprofitable in the past.  Of course, 
nobody wants to test a loosing system!


The purpose of scaling and stops is to protect ones financial well being 
from what we do not know.  No matter how well we design anything, 
including especially trading systems, there are always unknowns.


Please realize that I am not saying that scaling and/or stops are 
advisable.  I am just saying that it is very difficult to prove that 
they are not useful.


Personally, I rarely use either scaling or stops.  And when I do, it is 
not because of any analysis.  But only because it makes me feel safer.

-- Keith

On 7/30/2010 10:37, Howard B wrote:


Greetings --

Sohamdas wrote:
Dr Bandy, what you said is true, about the second alternative. The 
risk conditions are violated, with further scale-ins,when we double up 
etc.


But consider, if with each scale-in, we also move the stop loss 
point.In that scenario, the situation can morph into one, where the 
risk doesnt increase linearly with position,it increases slower than 
the growth of positions.


---

I agree that the risk calculations change as the price moves in the 
direction that gives profit.  But in order to keep to the original 
risk profile, the amount of the scale in is limited to the amount of 
the gain.  That is, before scaling in, recalculate the position size 
permitted and scale in by that amount.  The amount of additional 
position size allowed is usually much less than the original position 
was.


My argument against scaling in is with schemes that take a full 
position at entry, then add an amount that is large relative to the 
initial position (100%, 50%, 33%, or 25% are typical).  Unless the 
open profit supports the new position size of 200%, 150%, etc, the 
risk is now higher than originally permitted.  It is OK to do this if 
you realize that by doing so you are using aggressive position sizing 
and have worked through the consequences.


The original position could be taken at a position size that 
anticipates all of the scale in trades will be taken.  This assures 
that risk will remain limited.  But for those trades when the 
conditions necessary to add a scale in position do not occur, only a 
portion of the funds have been committed to the trade and the profit 
is less than it would have been if a full position was taken at the 
original signal.


I think it is better to treat each signal -- the original and each 
scale in -- as a unique trading system.  Work through the design, 
testing, and validation of each separately, then apply position sizing 
to each and to the portfolio that results from trading all of them.  
Be aware that all of these systems will be trading the same data 
series in the same direction, and an adverse price move will effect 
them all the same, increasing the risk rather than diversifying it.


Think about it this way -- You have a profitable system with logic 
that gives you good entry signals.  If you wait until the trade shows 
a profit to add to the position, you forfeit the profit from the funds 
that were not used at the initial signal.  If the scale in portion 
gives better results than the original signal, then the entry logic 
needs to be revised.




The same situation occurs at scale out.  A commonly described 
technique is to take partial profits and reset the stop when some 
condition is met.  In almost all of the tests I have run using this 
technique, the performance of the system over a period of many trades 
is poorer than if the entire position is held until the final exit 
signal.


Think about it this way --  You have a profitable system.  If you 
reduce your position size when trades have some profit and, on 
average, the trades go on to be more profitable, you forfeit some of 
the potential profit.  If you reduce your position size when trades 
have some profit and, on average, the trades go on to 

Re: [amibroker] Running backtest in an indicator

2010-07-27 Thread Keith McCombs

Bruce --
I'm not Ed, but I sure would like to see this.  I usually use equity 
charts when debugging code, and many times Equity() just adds to my 
confusion and I have to run a backtest and add the ~~~Equity chart to my 
display.

-- Keith

On 7/27/2010 15:10, Bruce wrote:


Ed -

I hesitated posting this because your original question was related to 
just lack of scaling support in the Equity() function, AND what I'm 
about to descibe is, IMHO, a topic that is probably not for everyone. 
But let me explain, and pose a question or two, and then we'll decide 
if its worth it.


FIRST, let's define the problem. The Equity() function is, as Tomasz 
calls it, a backtester in a box. IT HAS LIMITATIONS. You ran into 
one of them in scaling. There are a few others.


Some time ago I ran into the need to run a portfolio backtest based on 
info entered on a chart, and to plot the result. As you know, this 
can't be done directly from an indicator, and Tomasz has voiced 
concerts about doing lengthy calculations like this in an indicator 
that should execute quickly.


Sometimes, though, a need forces one to get creative. There are a 
couple of ways to do this, but the bottom line is this -


1. There is a way to do it.
2. It is probably best run on a mouse click but could also be done on 
a timed basis.

3. Running a portfolio backtest can impact real-time charting.
4. It is not practical to do it with tick, 1 second, 5 second, etc. 
charts.


SO, you have to REALLY want to do this. In my case, I needed the 
results of a watchlist portfolio backtest to chart on demand. If your 
use fits these constraints, then I'll post an article on how to do 
this on AmibrokerU.


-- Bruce




Re: [amibroker] Shortcut keys

2010-07-25 Thread Keith McCombs

You might also try X-Keys by PI Engineering at http://xkeys.com.
They make specialty key boards to use in addition to your normal 
keyboard.  Very easy to setup and use.

I highly recommend, for a very speedy operation.

From time to time, you will see some for sale on ebay.com.  But only at 
small discounts from retail price.

-- Keith

On 7/25/2010 10:38, Tomasz Janeczko wrote:


Hello,

Keyboard shortcuts should never use plain letters. You must always use 
Alt+ , Ctrl+ combinations.
Only function keys (Fx and special purpose keys (page up/down) can be 
used alone.


Best regards,
Tomasz Janeczko
amibroker.com

On 2010-07-25 14:57, Vishvesh wrote:


Greetings Tomasz,

How it would be that while someone is typing text, the customized 
keyboard shortcut keys should be disabled?

Hope to get positive response.

Vishvesh

On Sun, Jul 25, 2010 at 6:24 PM, Vishvesh vishvesh.chau...@gmail.com 
mailto:vishvesh.chau...@gmail.com wrote:


Well you know what, i do not wanna do that, pressing one key is
much better than pressing three keys. Any other option guys??

Thanks any ways,

Regards,
Vishvesh


On Sun, Jul 25, 2010 at 4:02 PM, Inquisitive Voyager
hedonist2...@gmail.com mailto:hedonist2...@gmail.com wrote:

try using combinations including modifier keys-
instead of b use ctrl+shift+ b as short cut.

On Sun, Jul 25, 2010 at 11:41 AM, Vishvesh
vishvesh.chau...@gmail.com
mailto:vishvesh.chau...@gmail.com wrote:

Hello Group,

I have customized entire keyboard for different-different
command. Now the problem occurs when i try to put text on
chart (Elliott marking). For example i have used b for
bar chart, and now when try to type b, it doesn't type
b but it executes the command. Can anyone of you give
an idea how can i have both working at same time. Or
while i type the command does not execute. It sounds
little weird but that is what my requirement is.

Thanks  Regards
Vishvesh








Re: [amibroker] Re: New System Question

2010-07-24 Thread Keith McCombs
Perhaps the eVGA driver is compressing the data before transmitting on 
USB 2.0, followed by decompression in eVGA hardware?


The specs for the card say,
Features
FeaturesLossless compression
High-performance DDR Memory
Ultra low power (Works off USB - USB Powered)
No GPU / uses virtual driver
USB Power / Plug in and Play
Up to 1600x1200 resolutions
Multiple displays up to 8
Specifications
Video SystemMin: 1024 x 786
Max: 1600 x 1200
Specifications  CRT, LCD, Projector Displays
VGA, DVI Display support
32-bit Color Depth
Ability to Clone or Extend an all directions
Standard and Widescreen ratio aspects


BTW, it is available at newegg.com for $70 plus shipping, or Recertified 
for $20 (after mail in rebate, if you remember to send it in) plus shipping.


-- Keith

On 7/24/2010 10:32, Tomasz Janeczko wrote:


Hello,

USB 2.0 for video? It is too slow. 1280x1024x32 bits @ 30 frames per 
second means 1258 Mbit/sec.

USB 2.0 speed limit is 480Mbit/sec.

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-07-24 12:09, Neil Wrightson wrote:


Hi,
A great option that I use for additional monitors is a video card 
that uses DisplayLink technology, such as the EVGA box (that's what 
I'm using) http://www.digitalyes.com.au/prodView.asp?idproduct=49733 
http://www.digitalyes.com.au/prodView.asp?idproduct=49733
This allows you to run multiple monitors using a USB connection. No 
internal video cards (other than the primary monitor).

Great for charting etc. Do a search for Displaylink on YouTube.
I started with the 
http://www.digitalyes.com.au/prodView.asp?idproduct=31378 
http://www.digitalyes.com.au/prodView.asp?idproduct=31378 but found 
they did not work to well with my layout.


Regards,

*Neil Wrightson.*



*From:* amibroker@yahoogroups.com
[mailto:amibro...@yahoogroups.com] *On Behalf Of *Rob
*Sent:* Saturday, 24 July 2010 7:48 PM
*To:* amibroker@yahoogroups.com
*Subject:* [amibroker] Re: New System Question

Paul,

That was super helpful. Thank's very much.

Yeah, the little bit I'm stuck on at the moment is the video
card. I need to run 3 monitors so I guess I need two cards. I
don't need anything spectacular on the 3D front clearly. Just a
fast an solid card for charting etc. Any suggestions...? Or does
your original choice still apply.

I notice you put in 12Gb of memory!!! Wow. I thinking of reducing
the memory of my new system. I have been running an 8Gb memory
Mac Pro and the most memory I have seen myself use if about 2.7Gb
of physical memory... so I'm thinking 6Gb will be enough. Maybe
you have some very large AB databases or lots of symbols...? (I
only look at about 30).

Thanks again

Rob

--- In amibroker@yahoogroups.com
mailto:amibroker%40yahoogroups.com, Paul D notanaiqgen...@...
wrote:

 Hi Rob and other system builders,

 In 2009 I built my own i7 920 and overclocked it to a very very
stable 3900
 megahertz. I have XP 64 bit on it.

 In a Tradestation forums thread I posted a very detailed
shopping list from
 Newegg of all the parts I used (more or less) and show that it
can be done very
 cheap. In my opinion, the 920 version is (or at least was) the
most affordable
 in terms of bang for your buck once overclocked. I had some
problems getting
 things cool enough with all 8 virtual cores going, so I turned
off the
 hyperthreading and just run with 4 cores.


 Attached is a PDF of my shopping list complete with colorful
pictures of my i7
 920 build during and after. FYI, I was going for lowest price
rather than the
 very nicest stuff, though I did not skimp on mobo, power
supply, CPU, or memory.
 The case, graphics card, and fans were not the best (or quietest).



 Hope this helps.

 Paul



 
 From: Rob sidharth...@...
 To: amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com
 Sent: Thu, July 22, 2010 2:38:22 AM
 Subject: [amibroker] New System Question


 Hi TJ,

 I am considering building myself a new computer system.
Basically I am running
 AB on a Mac Pro right now. 8GB Ram (ram is not one my
constraints). I am running
 2 x quad core Intel Xeon X5365 2.99 Ghz processors.

 I use AB for real time day trading... (not backtesting)... but
I am pushing the
 core I run AB on to the max pretty much (My performance
indicator in AB runs
 pretty consistently between 200 - 260%... I also have another 4
charts running
 on another instance of AB to utilise another core.

 Question is, in building a new system, what should I be looking
for maximise AB
 performance? Obviously I am looking at the i7 range of
processors. However,
 

Re: [amibroker] Re: Backtest Report Long/Short trades columns?

2010-07-23 Thread Keith McCombs

Ron --
Try running your system below over a period of time which starts on a 
Monday, ends on a Friday, and has no holidays in between.  For example, 
4/12/2010 - 5/28/2010.  You should get integer values then.


Now back to your original question.  I think I understand where you are 
coming from.  And that you have some valid concern.  Consider your 
following results.

The Long  Short backtest gives,
1.  Initial capital 10.00 10.00 10.00
2.  Ending capital 921758.81 712441.67 315904.12
3.  Net Profit 821758.81 612441.67 215904.12
4.  Net Profit % 821.76 % 612.44 % 215.90 %

It appears that AB just uses lines 1 and 2 to calculate lines 3 and 4 
above.  Those values are at least self consistent.  However, they do not 
really tell you much, if anything, about how well either the long or the 
short positions did.


More than likely, the long trades did NOT produce a profit of 612.44% on 
long invested capital nor did short trades produce a profit of 215.90% 
on short invested capital.  If they had, and the trades did not overlap 
in time, and all earnings were reinvested, then the total net profit 
would have been more like:
  (1 + 6.1244) * (1 + 2.1590) - 1 = 21.5059 or 2150.59% instead of a 
mere 821.76%


Note that your long only of 458.76% and short only of 75.89% when 
combined geometrically (as above) produce a total of 882.80% which is 
much closer to the 821.76% for the combined long and short systems.  If 
you were to retest your long, short, and combined systems; with no long 
and short overlap, round lot size was 0.0001, and no interest was paid 
on cash, you would probably get a much closer match for those two numbers.


-- Keith

On 7/22/2010 20:09, Ron wrote:


Okay, I do understand there is interaction between the longs and 
shorts but the results I'm seeing don't 'feel' right to me.


Here is a even simpler example involving Avg. Bars Held. I don't 
believe there should be an interaction with this metric.


I ran this afl,

SetOption(MaxOpenPositions, 2);
SetOption(MaxOpenLong, 2);
SetOption(MaxOpenShort, 2);

PositionSize = -25;

Buy = DayOfWeek() == 1; //Monday
Sell = DayOfWeek() == 2; //Tuesday

Short = DayOfWeek() == 3; //Wednesday
Cover = DayOfWeek() == 5; //Friday

from 1/1/2009 to 1/1/2010 on a watchlist containing two stocks (X and T).

The long/short run reports the following for Avg Bars Held,
All: 2.51
Long: 2.00
Short: 2.98

The long only run reports,
All: 2.00
Long: 2.00
Short: N/A

The short only run reports,
All: 3.22
Long: N/A
Short: 3.22

Can someone explain why the long/short Avg Bars Held of 2.98 is not 
equal to the short only of 3.22. Any the bonus question - isn't the 
correct answer 3.00?


I know I'm being hardheaded here but I really need to understand this 
report to have confidence in what they are telling me.


Thanks to all that have read to here.

Ron

P.S. Here is the settings for the script run,

Settings

Initial Equity: 10 Periodicity/Positions: Daily/ Short
Commissions: 0.00 per trade Annual interest rate: 0.00%
Range: 1/1/2009 00:00:00 - 1/1/2010 Apply to: Filter
Include Filter Exclude Filter
Market - Market -
Group - Group -
Sector - Sector -
Industry - Industry -
GICS - GICS -
Watch list t and x Watch list -
Index - Index -
Favourite - Favourite -
Account margin: 100 Futures mode: No
Def. round lot size: 1 Def. Tick Size 0
Drawdowns based on: High/Low prices
Long trades
Buy price: Close Sell price: Close
Buy delay: 0 Sell delay: 0
Short trades
Short price: Close Cover price: Close
Short delay: 0 Cover delay: 0
Stops
Maximum loss: disabled Profit target: disabled
Value: 8.00 Value: 4.00
Exit at stop? no Exit at stop? no

Trailing stop: disabled
Value: 8.00
Exit at stop? no

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Mike sfclimb...@... wrote:


 It might help to review how AmiBroker handles signals:

 http://www.amibroker.com/guide/h_portfolio.html

 Any time you add more signals, you change the outcome, since holding 
a position will prevent acting on new signals until the original 
position is exited (unless coded otherwise).


 long and short = more signals = different positions taken = 
different redundant signals skipped = different outcome.


 Mike

 --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, Keith McCombs kmccombs@ wrote:

 
  Ron --
  You are using portfolio back testing. So, when your system goes long,
  it is reinvesting profits from previous long AND short trades.
  Likewise, when your system goes short, it is reinvesting profits from
  previous short AND long trades. Life is good.
  -- Keith
 
  On 7/22/2010 10:02, Ron wrote:
  
  
   Let me attempt to be more clear,
  
   When I run my system in long only I get the total and long 
columns on

   the report for Net Profit of 458.76%,
  
   Net Profit % 458.76 % 458.76 % 6.59 %
  
   When I run it short I get the total and short columns on the report
   for Net Profit of 75.98%,
  
   Net Profit % 75.89 % 6.59 % 75.89

Re: [amibroker] Re: Need help with understanding the logic behind an Amibroker code

2010-07-23 Thread Keith McCombs

Why don't you just post that part of the code that you don't understand?

On 7/23/2010 16:05, perfecttip wrote:


Anybody willing to offer some help ?

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
perfecttip perfect...@... wrote:


 I have a code in Amibroker which I am not being able to understand. 
I need to find out the logic behind the code. Experienced user and 
experts please help me out.

 Thanks.





Re: [amibroker] Re: Backtest Report Long/Short trades columns?

2010-07-22 Thread Keith McCombs

Ron --
You are using portfolio back testing.  So, when your system goes long, 
it is reinvesting profits from previous long AND short trades.  
Likewise, when your system goes short, it is reinvesting profits from 
previous short AND long trades.  Life is good.

-- Keith

On 7/22/2010 10:02, Ron wrote:



Let me attempt to be more clear,

When I run my system in long only I get the total and long columns on 
the report for Net Profit of 458.76%,


Net Profit % 458.76 % 458.76 % 6.59 %

When I run it short I get the total and short columns on the report 
for Net Profit of 75.98%,


Net Profit % 75.89 % 6.59 % 75.89 %

When I run it long and short I get Net Profit total of 821.76%, long 
of 612.44% and short of 215.90%,


Net Profit % 821.76 % 612.44 % 215.90 %

Why is long column for Net Profit% not the same for the long only and 
long and short run?


And same question for the short column on the short only and long and 
short run?


Ron
--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Matthias K. meridian...@... wrote:


 Hi,

 It's very hard to understand the system's logic only by numbers. But 
as a
 matter of fact you identified the problem already: when you're 
testing long
 only, the shorts are skipped, thus it'll result in a very different 
equity

 curve as compared to the result when trading long and short together. So
 far, if everything went right, you just figured out the difference of
 trading a long-only system and a short-only system.



 If trading stocks, one might consider the long-side only because the 
indices
 and stocks sort of have a long-bias. In order to smoothen your 
equity curve,
 you might want to combine a short and a long system. The result is 
something

 like you're showing here. It'll pretty much enable you to make money in
 both bull and bear markets and ideally smoothens out the equity 
curve and
 reduces drawdowns and flat periods. Looks good to me if your coding 
has been

 right and doesn't look into the future.



 Always:



 CAR/MDD ratio: above 1,5 over 10 years time is outstanding, as it's 
a risk
 adjusted measure, it'll equal/weigh up profits versus 
losses|drawdown and

 will not consider net profit only



 To sum it up: the more trades you have, the longer your backtesting 
period
 is, the higher your CAR/MDD ratio: the better your system. Don't 
forget to

 include commissions/ spreads, anyhow. They might deteriorate your big
 picture. Especially with mid-caps.



 A good custom backtest metric might be a combination of number of 
trades and
 CAR/MDD, so to say, make 50 Trades per year and still give a CAR/MDD 
ratio

 above 1.



 Greetings



 M



 From: amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com 
[mailto:amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com] On Behalf

 Of Ron
 Sent: Donnerstag, 22. Juli 2010 06:31
 To: amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com
 Subject: [amibroker] Backtest Report Long/Short trades columns?





 I have a strategy that over time is either long or short but not 
both at the

 same time. I'm having difficulty understanding the Long and Short trades
 columns in the back test report when I run the back test in Long and 
Short

 mode.

 Long only backtest gives (Net Profit 458.76%)

 Initial capital 10.00 10.00 10.00
 Ending capital 558757.12 558757.12 106586.98
 Net Profit 458757.12 458757.12 6586.98
 Net Profit % 458.76 % 458.76 % 6.59 %
 Exposure % 38.28 % 38.28 % 0.00 %
 Net Risk Adjusted Return % 1198.47 % 1198.47 % N/A
 Annual Return % 30.78 % 30.78 % 1.00 %
 Risk Adjusted Return % 80.42 % 80.42 % N/A

 Short only backtest gives (Net Profit 75.89%)

 Initial capital 10.00 10.00 10.00
 Ending capital 175889.18 106586.98 175889.18
 Net Profit 75889.18 6586.98 75889.18
 Net Profit % 75.89 % 6.59 % 75.89 %
 Exposure % 28.44 % 0.00 % 28.44 %
 Net Risk Adjusted Return % 266.88 % N/A 266.88 %
 Annual Return % 9.21 % 1.00 % 9.21 %
 Risk Adjusted Return % 32.38 % N/A 32.38 %

 The Long  Short backtest gives,

 Initial capital 10.00 10.00 10.00
 Ending capital 921758.81 712441.67 315904.12
 Net Profit 821758.81 612441.67 215904.12
 Net Profit % 821.76 % 612.44 % 215.90 %
 Exposure % 66.78 % 38.28 % 28.50 %
 Net Risk Adjusted Return % 1230.56 % 1599.91 % 757.56 %
 Annual Return % 41.40 % 35.84 % 19.65 %
 Risk Adjusted Return % 62.00 % 93.62 % 68.96 %

 Notice the Long Net Profit is 612.44% and Short is 215.90% which is 
quite a

 bit different then when I ran them independently. Other columns are
 different as well but I'll focus on Net Profit % for now.

 I expect there is some compounding thing happening here but if 
someone asked

 me I couldn't explain it. Does anyone out there have a explanation.

 Thanks in advance,

 Ron





Re: [amibroker] standard for average price

2010-07-12 Thread Keith McCombs

Then, it is probably better to ask your data vendor.

On 7/12/2010 05:45, Deepak Patade wrote:


Deepak Patade

Not what i was looking for.
I donot want the formula.
I am getting it as a ready feed from my data vendor.
I need to know what annotation does average price have in AMibroker

*From:* Lionel Issen lis...@sbcglobal.net
*To:* amibroker@yahoogroups.com
*Sent:* Sun, July 11, 2010 11:29:32 PM
*Subject:* RE: [amibroker] standard for average price

Some people use (H+L+C)3, others  use (H+L+O+C)/4.

You can use any other method that you think is better.

Lionel

*From:* amibro...@yahoogrou ps.com http://ps.com/ [mailto:amibroker@ 
yahoogroups. com] *On Behalf Of *Deepak Patade

*Sent:* Sunday, July 11, 2010 10:00 AM
*To:* amibro...@yahoogrou ps.com
*Subject:* [amibroker] standard for average price

Hi,

Just like

O= OPEN

C= CLOSE

H= HIGH

L= LOW

is there any such acceptalblity for average price like

average price = AVG price( ?)

Deepak Patade

i mean




Re: *[amibroker] Getting a license for AB 64 bit experimental

2010-07-10 Thread Keith McCombs
Yes, that is what it means.  If you upgrade your 'regular' 32bit edition 
to the 'professional' 32bit edition first, then you can try the 64bit 
'professional' edition.  There is no 'regular' 64bit edition.


On 7/10/2010 09:39, gmorlosky wrote:


This showed up in a past messege:
  AmiBroker 5.30.1 64-bit edition (experimental) is now available for
  download from:
  http://www.amibroker.com/x64/

And this is what shows up at that site regarding getting a license:
IMPORTANT: The LICENSE KEY for AmiBroker 64 bit version is different 
than for 32 bit. They are available separately and they must NOT be 
interchanged. The link to download 64-bit license key is provided in 
AmiBroker registration e-mail for Professional Edition users only. 
To get the dedicated 64-bit key you need to use lostkey retrieval form.


Does that mean that only people that already have the Professional 
Edition can get an experimental license ?


I have the regular version 32 bit and wanted to try the 64 bit ?




Re: [amibroker] Re: Optimizer and Backtester losing trades [1 Attachment]

2010-07-08 Thread Keith McCombs

Michael --
I compared your trades with your log file.  And observed that all of 
your 'missing' trades attempted to buy on the *same* day as you closed a 
previous trade.  That is only a hint.  See attachment.


However, there were two trades that were made in the trade list that did 
buy on the same day as you closed a previous trade.  These two trades 
were opened on 4/13/2010 and 6/14/2010.


Other comments:
I just briefly scanned your code.  And I notice that you use for loops a 
lot, and also there were no Ref() or ExRem() functions.  I am guessing 
that you could do without so many for loops and with somewhat simpler code.


Also, I noticed that iif() was not capitalized as IIf(), indicating that 
at least this part of your code had not been checked in AB's Editor.


It would be much easier to compare the log with the trades.html if the 
log file looked more like the trades file.  For example, open and close 
of trade on the same line.


That being said, based on your forum postings, you have been using AB 
for only about a month.  You're miles ahead of where I would expect one 
to be, after such a short time.


-- Keith

On 7/8/2010 11:51, michaels_musings wrote:


Sorry Keith,

I apparently didn't have non-logged in members able to view uploaded 
files :(


It's been fixed.

Michael

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Keith McCombs kmcco...@... wrote:


 Michael --
 I went to your web site. via your link below. However, I couldn't find
 any of the files you refer to. Do I need a secret password or handshake?
 -- Keith


 On 7/7/2010 16:57, michaels_musings wrote:
 
  Anyone know how to get the Backtester and Optimizer to include all
  trades in their results? The code below (firstSystemPostCopy.afl)
  initiates trades that get captured by the logfile, but they don't 
show

  up or get accumulated in the Backtester or Optimizer. The results are
  from ~six months of 1-minute bars of FAS. The Backtester shows 16
  trades with profit of $7,110.38. Per the logfile there were 24 trades
  with profit of $3,751.29.
 
  Anyone know why the extra 8 trades weren't included in the Backtester?
 
  Thanks,
  Michael
 
  First few trades from Backtester:
  Ticker Trade Entry Exit
  FAS Long 11/30/2009 2:53:00 PM 25.03 12/8/2009 7:32:00 AM 23.52
  FAS Long 12/23/2009 7:27:00 AM 25.03 1/5/2010 2:42:00 PM 27.03
  FAS Long 2/16/2010 2:31:00 PM 23.18 2/22/2010 1:24:00 PM 25.03
  FAS Long 3/5/2010 9:44:00 AM 27.03 3/10/2010 9:10:00 AM 29.19
 
  First few trades from Log File:
  Symbol, Action, Date, Time, Buy point, Entry, Exit
  FAS, Bought, 2009-11-30, 14:53:00, 5, 25.0300
  FAS, StopLoss, 2009-12-08, 07:32:00, 5, 25.0300, 23.5200
  FAS, Bought, 2009-12-23, 07:27:00, 5, 25.0300
  FAS, Profit, 2010-01-05, 14:42:00, 5, 25.0300, 27.0300
  FAS, Bought, 2010-01-05, 14:42:00, 6, 27.0300
  FAS, StopLoss, 2010-01-22, 06:11:00, 6, 27.0300, 25.4000
  FAS, Bought, 2010-02-16, 14:31:00, 4, 23.1800
  FAS, Profit, 2010-02-22, 13:24:00, 4, 23.1800, 25.0300
 
  [Since no one wants a 1,000 line email, full files are at:
  
http://michaels-musings.com/amibroker-optimizer-and-backtester-losing-trades.html 


  ]
 
  firstSystemPostCopy.afl - Script I'm running
  trades.html - Backtester trade list
  settings.html - Backtester settings
  stats.html - Backtester stats
  firstSystemLog.txt - Log File created by firstSystemPostCopy.afl
  AmiBrokerLostTrades.xls - Trade list from log file w/ computed Profit
 
 





Re: AB and TOS -- RE: [amibroker] Re: Here's how to integrate AmiBroker with thinkorswim via DDE for real-time streaming quotes of options, etc.

2010-07-08 Thread Keith McCombs

Ken --
You can have what ever ticks you want.  Use the Preferences Icon (looks 
like a gear).

PreferencesIntradayCustom N-tick/N-volume/range chart settings

-- Keith


On 7/8/2010 13:19, Ken Close wrote:


David:
Thanks for the doc file with instructions.  I just got my TOS data 
stream flowing into Amibroker.
Did you find any way to backfill?  Or did you just have to collect 
data each day until you had enough to make indicators useful, etc?
Any other tricks?  For example, I use 400 tick charts on TOS and want 
to use them in AB.  How do I set up a 400 tick chart.  I see the 
standard 10, 20, 50, 100 tick menu items.

Ken


*From:* amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] 
*On Behalf Of *David

*Sent:* Thursday, July 08, 2010 6:19 AM
*To:* chetan
*Cc:* amibroker@yahoogroups.com
*Subject:* Re: [amibroker] Re: Here's how to integrate AmiBroker with 
thinkorswim via DDE for real-time streaming quotes of options, etc.


Yes, live futures data such as /ES is accessible via thinkorswim 
thinkDesktop's DDE interface.


Warm regards,
David


On Wed, Jul 7, 2010 at 5:31 PM, chetan chetan.abm...@gmail.com 
mailto:chetan.abm...@gmail.com wrote:


Is it possible to download streaming live futures data (say for
ES) using this link to TOS; i would love that as that would save
me a bit more than 100$ every month that i have to pay to a data
vendor.

thanks in advance!

-gariki



On Fri, 28 May 2010 01:55:44 -0700, David
amibroker.ygro...@personalfreedom.com
mailto:amibroker.ygro...@personalfreedom.com wrote:

Sure thing, Lance.  I just posted my message, including the
screen shot, at

http://finance.groups.yahoo.com/group/amibroker/files/thinkDesktop%20integration/

http://finance.groups.yahoo.com/group/amibroker/files/thinkDesktop%20integration/.

Warm regards,
David


On Thu, May 27, 2010 at 9:46 AM, smoothtrader6171
growl...@yahoo.com mailto:growl...@yahoo.comwrote:



Hi David,

I am very interested in this. Would you mind posting the
image to the files
areas of the group? I was not able to view the attached
configuration image
from your message. I appreciate it!

Thank you,
Lance


--- In amibroker@yahoogroups.com
mailto:amibroker@yahoogroups.com
amibroker%40yahoogroups.com http://40yahoogroups.com,
David

amibroker.ygro...@... wrote:

 As one step along the path to determine whether I can
back test option
 strategies with AmiBroker even though AmiBroker isn't
designed for
options
 traders, I've integrated AmiBroker with thinkorswim via
DDE for real-time
 streaming quotes of every instrument you can trade via
thinkDesktop, e.g.
 options, futures, stocks, ETFs, forex.

 To do the same, just follow the instructions on
 http://www.amibroker.com/dde.html
http://www.amibroker.com/dde.html and copy this screen
after you click
the
 CONFIGURE button. These entries are case sensitive.

 [image: Capture.PNG]

 Since AmiBroker doesn't use the last two fields anyway,
I'm using them
for
 additional data I want. I used the first field for the
Strike of an
option
 so AmiBroker can find the option I'm looking for more
quickly than having
to
 parse the Ticker field for that info (I'm perhaps
incorrectly assuming
that
 AmiBroker indexes that first field). I used the second
field for the
 VIX-style Implied Volatility index of the underlying
stock, index,
future,
 etc. You can chose any of the thinkorswim DDE fields
below instead of the
 two I chose.

 52HIGH
 52LOW
 ASK
 ASKX
 ASK_SIZE
 AX
 BACK_VOL
 BA_SIZE
 BETA
 BID
 BIDX
 BID_SIZE
 BX
 CALL_VOLUME_INDEX
 CLOSE
 COVERED_RETURN
 CUSTOM1
 CUSTOM2
 CUSTOM3
 CUSTOM4
 CUSTOM5
 CUSTOM6
 CUSTOM7
 CUSTOM8
 CUSTOM9
 DELTA
 DESCRIPTION
 DIV
 DIV_DATE
 DIV_FREQ
 DT
 EPS
 EXCHANGE
 EXPIRATION
 EXTRINSIC
 FRONT_VOL
 

Re: [amibroker] Does Portfolio Backtester always use signal price?

2010-07-07 Thread Keith McCombs
You should not be using Stops at all for mutual funds.  A Stop means 
stop right NOW.  Do not wait one second more.


But for mutual funds you HAVE to wait.  So, just use Sell.

On 7/7/2010 11:39, graphman27 wrote:


I'm wondering if the Portfolio Backtester always uses signal price, 
regardless of what the settings/coding is for when to buy (next bar, 
etc.)?


When I look at a portfolio backtest report of trades, I notice that 
all my regular (no stop triggered) matched buys and sells actually 
bought and sold the securities on the proper date and at the proper 
price (in my case, CLOSE+1 or next bar - with EOD data). I get a 
signal to buy on Monday night and the trade is completed Tuesday at 
the close. This is perfect.


However, if I own a security and a stop gets triggered Wednesday night 
at the close and the security is sold NEXT BAR (in my case, with EOD 
mutual fund trades, the next day's close) or on Thursday at the close, 
I notice that the buy date and price is actually the signal date and 
price, NOT the next bar (Next day for mutual funds). This creates an 
enormous problem. I can't get an EOD signal to buy something, say on 
Monday NIGHT and then say that I purchased it Monday AT THE CLOSE! 
That's a physical impossibility. The market already was closed Monday 
night. Why are my stopped out trades, in Portfolio Backtester, using a 
buy date of CLOSE+0, but when I have a signal triggered sell (no stop 
triggered), the buy date and price is what it should be for me, which 
is CLOSE+1 bar delay? This doesn't make any sense.


If this is the case, which is obviously wrong, is there a simple fix?

Thanks!




Re: [amibroker] How to do multi-position scores to emulate multi-factor models ?

2010-07-07 Thread Keith McCombs

BGPL --
The 'elegant' and perhaps 'preferred' way to solve your problem is 
probably to use the CBT to do all the work.


However, two possible ideas for quick and dirty or for proof of 
concept might be:

1.  Use two different .afl programs.

The first does a Backtest with Buy/Sell based on 'n' only.  That 
produces a list of all potential trades, which you export to a .csv 
file.  Import .csv file into a spread sheet, convert to a list that 
looks something like this:

Date   SymbolClose
06/01/10   AAPL_A 1
06/03/10   AAPL_A-1
etc.
where AAPL_A differentiates it from AAPL and Close of 1 means buy and 
Close of -1 means sell.  Save result as a new .csv file.

Next ASCII import new .csv file into your data base.
Use second .afl program containing code something like this:

PositionScore = m;
sym = Name() + _A;
Buy = IIf(Nz(Foreign(sym, C)) == 1, True, False);
Sell = IIf(Nz(Foreign(sym, C)) == -1, True, False);


2.  Similar to 1. above, except that, using only one .afl, you add a 
metric 'm' to be add to backtest results (using CBT, high-level).  
Export results as .csv file and import into spread sheet, and sort and 
select trades based on the metric 'm'.


I would very much like to know how you make out.  I am facing the same 
problem, but have put it on my own back burner.  I would probably opt 
for 2. above, in that my present strategy trades all common stocks, 
ADRs, and ETFs, and I would rather not double my data base size.

-- Keith


On 7/6/2010 18:55, bgplmirror wrote:


Greetings,
I use AB quite a bit, but now am trying to use this for some 
additional systems currently running in wealth-lab.
Is there a simple way to handle two factor models where for example, i 
want to first rank n stocks using a first factor (same as the 
positionscore in AB), pick the top n, and use a second factor to rank 
the top m (out of the top n).

I can see that I could potentially do it using
(a) positionscore to do the first sort and rank
(b) the custom backtester and writing a sort among the top-n positions 
with the second factor to get the new top-m. To do this, I have to 
probably use static variables to keep track of the new sorted rank 
(second sort).
However, before embarking on this exercise, I wanted to throw it out 
to the users on this forums to see if you have this problem, or seen 
solutions etc., I spent some time going over the past posts, but could 
not find something like this.


regards
bgpl




Re: *[amibroker] Re: Does Portfolio Backtester always use signal price?

2010-07-07 Thread Keith McCombs
'Stops' are supposed to sell (or buy, short, or cover) on same bar.  
That is why they are called 'Stops'.  Stop right NOW, I'm out of here.  
If the police yell, Stop, or I'll shoot, they surely don't mean stop 
tomorrow.


On 7/7/2010 13:40, graphman27 wrote:


Keith: Well, let's say for example that I use exchange-traded funds 
that trade intraday. Let's also say I use hourly bars. If my code says 
to buy or sell NEXT BAR after the signal comes, then there is a delay. 
Now, if that purchase later gets stopped out, does Portfolio 
Backtester use the signal buy price OR the real buy price (which is 
next bar). For some reason, I think the portfolio backtester is 
changing the time stamp and price. No solid proof yet, but that's what 
it looks like. My regular (no stops) buys and sells are next bar, but 
any buy that eventually got stopped out has the buy price as same bar.


Steve.

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Keith McCombs kmcco...@... wrote:


 You should not be using Stops at all for mutual funds. A Stop means
 stop right NOW. Do not wait one second more.

 But for mutual funds you HAVE to wait. So, just use Sell.

 On 7/7/2010 11:39, graphman27 wrote:
 
  I'm wondering if the Portfolio Backtester always uses signal price,
  regardless of what the settings/coding is for when to buy (next bar,
  etc.)?
 
  When I look at a portfolio backtest report of trades, I notice that
  all my regular (no stop triggered) matched buys and sells actually
  bought and sold the securities on the proper date and at the proper
  price (in my case, CLOSE+1 or next bar - with EOD data). I get a
  signal to buy on Monday night and the trade is completed Tuesday at
  the close. This is perfect.
 
  However, if I own a security and a stop gets triggered Wednesday 
night

  at the close and the security is sold NEXT BAR (in my case, with EOD
  mutual fund trades, the next day's close) or on Thursday at the 
close,

  I notice that the buy date and price is actually the signal date and
  price, NOT the next bar (Next day for mutual funds). This creates an
  enormous problem. I can't get an EOD signal to buy something, say on
  Monday NIGHT and then say that I purchased it Monday AT THE CLOSE!
  That's a physical impossibility. The market already was closed Monday
  night. Why are my stopped out trades, in Portfolio Backtester, 
using a

  buy date of CLOSE+0, but when I have a signal triggered sell (no stop
  triggered), the buy date and price is what it should be for me, which
  is CLOSE+1 bar delay? This doesn't make any sense.
 
  If this is the case, which is obviously wrong, is there a simple fix?
 
  Thanks!
 
 





Re: [amibroker] Re: Speeding up AB with Windows Ready Boost

2010-07-07 Thread Keith McCombs
There was a good discussion of RAM DISKS, 12/15/09 - 12/17/09, on this 
forum.


Remember, there are two types of RAM disk, hardware, and software only.  
I would expect that the hardware ones would be considerably faster than 
software only.  But I don't have either.  So that is mere expectation on 
my part.  Also, I would expect that hardware SATA ram disk would be 
faster than any USB drive.


Also, unlike people, all USB drives are not created equal.  Some are 
faster than others.


On 7/7/2010 17:30, Herman wrote:


I have 8GByte of Ram but AB32 cannot take advantage of it - I am still 
running AB32bit under Windows 7 because last I heard not all 
plugins/APIs were available.


herman

* Maybe TJ can comment...?

 Generally is it worth trying to run AB from a ramdisk or
 via something like herman is suggesting...?

 One thing I do have plenty of is RAM... my CPU cores are
 getting short of spare cycles though!

 Thanks



 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/ http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

 For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
 http://www.amibroker.com/devlog/ http://www.amibroker.com/devlog/

 Yahoo! Groups Links


 (Yahoo! ID required)

 amibroker-fullfeatu...@yahoogroups.com 
mailto:amibroker-fullfeatu...@yahoogroups.com



*

* *
* *
**
* *


Re: [amibroker] Optimizer and Backtester losing trades

2010-07-07 Thread Keith McCombs

Michael --
I went to your web site. via your link below.  However, I couldn't find 
any of the files you refer to.  Do I need a secret password or handshake?

-- Keith


On 7/7/2010 16:57, michaels_musings wrote:


Anyone know how to get the Backtester and Optimizer to include all 
trades in their results? The code below (firstSystemPostCopy.afl) 
initiates trades that get captured by the logfile, but they don't show 
up or get accumulated in the Backtester or Optimizer. The results are 
from ~six months of 1-minute bars of FAS. The Backtester shows 16 
trades with profit of $7,110.38. Per the logfile there were 24 trades 
with profit of $3,751.29.


Anyone know why the extra 8 trades weren't included in the Backtester?

Thanks,
Michael

First few trades from Backtester:
Ticker Trade Entry Exit
FAS Long 11/30/2009 2:53:00 PM 25.03 12/8/2009 7:32:00 AM 23.52
FAS Long 12/23/2009 7:27:00 AM 25.03 1/5/2010 2:42:00 PM 27.03
FAS Long 2/16/2010 2:31:00 PM 23.18 2/22/2010 1:24:00 PM 25.03
FAS Long 3/5/2010 9:44:00 AM 27.03 3/10/2010 9:10:00 AM 29.19

First few trades from Log File:
Symbol, Action, Date, Time, Buy point, Entry, Exit
FAS, Bought, 2009-11-30, 14:53:00, 5, 25.0300
FAS, StopLoss, 2009-12-08, 07:32:00, 5, 25.0300, 23.5200
FAS, Bought, 2009-12-23, 07:27:00, 5, 25.0300
FAS, Profit, 2010-01-05, 14:42:00, 5, 25.0300, 27.0300
FAS, Bought, 2010-01-05, 14:42:00, 6, 27.0300
FAS, StopLoss, 2010-01-22, 06:11:00, 6, 27.0300, 25.4000
FAS, Bought, 2010-02-16, 14:31:00, 4, 23.1800
FAS, Profit, 2010-02-22, 13:24:00, 4, 23.1800, 25.0300

[Since no one wants a 1,000 line email, full files are at: 
http://michaels-musings.com/amibroker-optimizer-and-backtester-losing-trades.html 
]


firstSystemPostCopy.afl - Script I'm running
trades.html - Backtester trade list
settings.html - Backtester settings
stats.html - Backtester stats
firstSystemLog.txt - Log File created by firstSystemPostCopy.afl
AmiBrokerLostTrades.xls - Trade list from log file w/ computed Profit




[amibroker] Missing or broken links on UserKB

2010-07-07 Thread Keith McCombs

http://www.amibroker.org/userkb/2007/04/24/setting-up-your-tws/
contains two links:
http://www.amibroker.org/userkb/2007/04/24/setting-up-your-tws/trader-workstation-configuration/
and
http://www.amibroker.org/userkb/2007/04/24/setting-up-your-tws/tws-auto-export-setup/

These last two are supposed to show images, which unfortunately are missing.
Does anyone know how to get the images?  Or perhaps someone has them 
saved somewhere?


Either way, I would very much like to see them.
Thank you.
-- Keith

* *


Re: [amibroker] AmiBroker User's Guide in PDF format?

2010-07-01 Thread Keith McCombs

No answer yet.  This question is worth repeating!
-- Keith

On 6/4/2010 06:54, Paolo wrote:


Just wondering if and when the updated AmiBroker 5.30 PDF User's Guide 
will be released.


Paolo




Re: [amibroker] Re: How to mix systems

2010-07-01 Thread Keith McCombs
I've read a number of posts on the thread.  And it seems to me that not 
everyone has the same meaning in mind when they are talking about a 
'MIX' system.


What do you mean by a mix system?  I assume that two or more systems are 
supposed to share SOMETHING.  Is that SOMETHING,
1.  The same equities?  If so, what do you want to happen if two or more 
systems want to go in different directions, perhaps one holds while 
another sells, or even another shorts?  Once you have answered these 
questions, you might find that sigScaleIn and sigScaleOut will help you out.


2.  Available cash?  If so, to what extent?  If you know, then maybe use 
setPositionSize() and/or PositionScale can help you.


3.  Risk and rewards, but keeping money from profits and losses 
separate?  If so, try backtesting separately.  Then save ~~~Equity 
results with different names and add them in AB, with buy and hold for each.


4.  Or, maybe something else?

-- Keith

On 7/1/2010 17:29, Matthias wrote:


Sorry for the typo in the Backtesting-Paragraph:

Should read:

match buy1 and sell1 (NOT: buy1 and sell2)

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Matthias meridian...@... wrote:













 Hello,

 I am having trouble understanding the same issue. If anyone here has 
a solution I'd like to read up on it as well. Angelo, I have read 
literally every discussion in this forum regarding this topic and I 
understand why your reffering to TJ, and please: Yes, I did read the 
user manual and yes, I did read custom backtester procedure. I believe 
that I am not the only one who's facing this. Help appreciated. I'd 
like to post 3 sample strategies for better understanding (which won't 
work, btw).


 BASE-TIME: 5min; [ONLY 3 Strategies]

 Setpositionsize(number, spsshares) // number varies depending on 
which strategy gets the signal
 Setoption(maxopenpositions,3) //i.e. every strategy can open 1 
position at a time which is not reflected in this command



 / MA-Crossover //

 Ema1=ema(c,10);
 Ema2=ema(c,20);

 Buy1=cross(ema1,ema2);
 Sell1=cross(ema2,ema1);
 Short1=sell1;
 Cover1=buy1;

 /// Countertrend /

 BBupperiod1= 20;
 BBlowperiod1= 20;
 BBupSTD1= 2;
 BBlowSTD1= 2;
 BBtop1= BBandTop(C,BBupperiod1,BBupSTD1);
 BBbot1= BBandBot(C,BBlowperiod1,BBlowSTD1);

 MA1= ma(C,20);

 Buy2= Cbbandbot1;
 Sell2= cma1;
 Short2= Cbbandtop1;
 Cover2= Cma1;

 Buy2= exrem(Buy2,sell2);
 Sell2= exrem(sell2, buy2);
 Short2= exrem(short2,cover2);
 Cover2= exrem(cover2,short2);

 /// HH LL //

 TimeFrameSet(inhourly);

 period1high=20;
 period1low=20;

 nhigh=HHV(H,period1high);
 nlow=LLV(L,period1low);

 TimeFrameRestore();

 Buy3= timeframeexpand(ndayhigh,inhourly)  
timeframeexpand(ref(ndayhigh,-1), inhourly);
 Sell3= timeframeexpand(ndaylow,inhourly)  
timeframeexpand(ref(ndaylow,-1), inhourly);

 Short3=sell3;
 Cover3=buy3;


 REALIME TRADING:

 What do I need to do is to put these 3 into one AFL for real-time 
trading - that's what people were saying. How do I arrange the code?


 I do not trade a lot of underlyings, but say, this one needs to be 
run on the FDAX(German bluechip future) and on the FDAX only, allowing 
shorts and longs at the same time.

 I have read up on the

 if ( name==) idea.

 but I want to realtime trade this on ONE underlying only (Trying to 
express: I cannot change the name of the underlying in realtime 
trading, so that amibroker would think it's 3 differnt tickers, even 
though it's only one)


 Another suggestion was something with static variables, but I didn't 
grasp the concept.


 Another suggestion was from Keith Mccombs, suggestion one 
MASTER-AFL, to control the other afl's.


 #include afl1
 #include afl2


 === how do I match buy1 and sell2?

 BACKTESTING

 I believe that the issue above differs from the actual 
backtest-logic and has been vastly mixed causing a lot of confusion. 
The way I currently see it is, in order to get a proper backtest of 
multiple systems, one would either need custom backtest proc or --- in 
this (my case above) case with only one underlying traded --- name the 
same underlying differently e.g. FDAX1 for system #1 FDAX2 for system 
#2. Not so elegant, but if it works I'm fine with it.




 MONEY MANAGEMENT AND PORTFOLIO COMPOSITION

 Obviously, if you have figured out what and how much to trade, this 
one is already resolved. But maybe sometimes one would like to try 
different things or at least check different inputs. Such as:


 One Equity Pool
 Several equity pools,
 manipulate position size if one system is performing poorly,
 have a system ranking funtion (which system to trade now - based on 
equity curve, e.g.)

 do some sort of modern portfolio theory.


 I don't want to go in the details on MONEY MANAGEMENT AND PORTFOLIO 
COMPOSITION and for now I'd be delighted if someone could show me how 
to match my buy/sell signals for realtime trading

Re: [amibroker] Re: How to mix systems

2010-07-01 Thread Keith McCombs
, but you're right the topic is huge and 
some of it has been discussed some time ago. The thing that gives me a 
headache is that I couldn't find a practicle example that would gather 
together the conclusions out of the discussion. The idea to break this 
topic down into the 3 parts are a suggestion to make things easier, 
I'm not sure if it's the best solution due to overlapping. But come 
on, we shot a rocket to the moon, this little there needs to be possible.


Thanks,

M

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Keith McCombs kmcco...@... wrote:


 I've read a number of posts on the thread. And it seems to me that not
 everyone has the same meaning in mind when they are talking about a
 'MIX' system.

 What do you mean by a mix system? I assume that two or more systems are
 supposed to share SOMETHING. Is that SOMETHING,
 1. The same equities? If so, what do you want to happen if two or more
 systems want to go in different directions, perhaps one holds while
 another sells, or even another shorts? Once you have answered these
 questions, you might find that sigScaleIn and sigScaleOut will help 
you out.


 2. Available cash? If so, to what extent? If you know, then maybe use
 setPositionSize() and/or PositionScale can help you.

 3. Risk and rewards, but keeping money from profits and losses
 separate? If so, try backtesting separately. Then save ~~~Equity
 results with different names and add them in AB, with buy and hold 
for each.


 4. Or, maybe something else?

 -- Keith

 On 7/1/2010 17:29, Matthias wrote:
 
  Sorry for the typo in the Backtesting-Paragraph:
 
  Should read:
 
  match buy1 and sell1 (NOT: buy1 and sell2)
 
  --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com 
mailto:amibroker%40yahoogroups.com,

  Matthias meridian202@ wrote:
  
  
  
  
  
  
  
  
  
  
  
  
   Hello,
  
   I am having trouble understanding the same issue. If anyone here 
has

  a solution I'd like to read up on it as well. Angelo, I have read
  literally every discussion in this forum regarding this topic and I
  understand why your reffering to TJ, and please: Yes, I did read the
  user manual and yes, I did read custom backtester procedure. I 
believe

  that I am not the only one who's facing this. Help appreciated. I'd
  like to post 3 sample strategies for better understanding (which 
won't

  work, btw).
  
   BASE-TIME: 5min; [ONLY 3 Strategies]
  
   Setpositionsize(number, spsshares) // number varies depending on
  which strategy gets the signal
   Setoption(maxopenpositions,3) //i.e. every strategy can open 1
  position at a time which is not reflected in this command
  
  
   / MA-Crossover //
  
   Ema1=ema(c,10);
   Ema2=ema(c,20);
  
   Buy1=cross(ema1,ema2);
   Sell1=cross(ema2,ema1);
   Short1=sell1;
   Cover1=buy1;
  
   /// Countertrend /
  
   BBupperiod1= 20;
   BBlowperiod1= 20;
   BBupSTD1= 2;
   BBlowSTD1= 2;
   BBtop1= BBandTop(C,BBupperiod1,BBupSTD1);
   BBbot1= BBandBot(C,BBlowperiod1,BBlowSTD1);
  
   MA1= ma(C,20);
  
   Buy2= Cbbandbot1;
   Sell2= cma1;
   Short2= Cbbandtop1;
   Cover2= Cma1;
  
   Buy2= exrem(Buy2,sell2);
   Sell2= exrem(sell2, buy2);
   Short2= exrem(short2,cover2);
   Cover2= exrem(cover2,short2);
  
   /// HH LL //
  
   TimeFrameSet(inhourly);
  
   period1high=20;
   period1low=20;
  
   nhigh=HHV(H,period1high);
   nlow=LLV(L,period1low);
  
   TimeFrameRestore();
  
   Buy3= timeframeexpand(ndayhigh,inhourly) 
  timeframeexpand(ref(ndayhigh,-1), inhourly);
   Sell3= timeframeexpand(ndaylow,inhourly) 
  timeframeexpand(ref(ndaylow,-1), inhourly);
   Short3=sell3;
   Cover3=buy3;
  
  
   REALIME TRADING:
  
   What do I need to do is to put these 3 into one AFL for real-time
  trading - that's what people were saying. How do I arrange the code?
  
   I do not trade a lot of underlyings, but say, this one needs to be
  run on the FDAX(German bluechip future) and on the FDAX only, 
allowing

  shorts and longs at the same time.
   I have read up on the
  
   if ( name==) idea.
  
   but I want to realtime trade this on ONE underlying only (Trying to
  express: I cannot change the name of the underlying in realtime
  trading, so that amibroker would think it's 3 differnt tickers, even
  though it's only one)
  
   Another suggestion was something with static variables, but I 
didn't

  grasp the concept.
  
   Another suggestion was from Keith Mccombs, suggestion one
  MASTER-AFL, to control the other afl's.
  
   #include afl1
   #include afl2
  
  
   === how do I match buy1 and sell2?
  
   BACKTESTING
  
   I believe that the issue above differs from the actual
  backtest-logic and has been vastly mixed causing a lot of confusion.
  The way I currently see it is, in order to get a proper backtest of
  multiple systems, one would either need custom backtest proc or 
--- in
  this (my case above) case with only one

Re: [amibroker] sigScaleOut is not selling half position

2010-06-29 Thread Keith McCombs
Reread the manual regarding sigScaleIn and sigScaleOut.  sigScaleOut is 
used in Buy, not in Sell.  When Sell sells, it sells entire position.


On 6/29/2010 08:05, Prabu wrote:


I'm trying to sell half of the position it currently holds.
I've given ..

PositionSize = IIf(Buy, -100, -50);
Sell = sigScaleOut;

but still it sells the whole position...




Re: [amibroker] Re: AmiBroker running stinking slow on super fast new system ???

2010-06-29 Thread Keith McCombs

50 times faster, is that what they told you?

On 6/29/2010 09:49, gmorlosky wrote:


I'm using alien technology (top secret Area 51 stuff) :-)

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Keith McCombs kmcco...@... wrote:


 Where on earth did you get the 50 times faster from?

 On 6/27/2010 08:26, gmorlosky wrote:
 
  I am very disappointed in the speed I am getting running an 
Explore in

  AmiBroker 5.20. Here is my example:
 
  Both units are running the same 32 bit version of Amibroker 5.20,
  running the same Explore I created, with no other software other than
  basic antivirus running.
  ***
  Old system (about 7 years):
  Pentium D (single core) 2.4 mhz, 1 gig memory 233 mhz, 5400 rpm 
drive,

  Windows XP Pro
 
  Results of Explore (5500 sysmbols):
  CPU usage 100%, 8 minutes 5 seconds
  ***
  New system (about 2 months):
  i7-930 (quad core) 2.6 mhz, 6 gig memory 1600 mhz, 7200 high rpm
  drive, Windows 7 64 bit
 
  Results of Explore (5500 sysmbols):
  CPU usage 12%, 2 minutes 3 seconds
  ***
  Why so stinking slow ??? when the new system is roughly 50 times
  faster in overall processing ???
 
 





Re: [amibroker] Re: How to mix systems

2010-06-29 Thread Keith McCombs

rise --
I think you forgot to add a link to the blog.

On 6/29/2010 13:48, rise_t575 wrote:




Here is a blog from a system trader sharing his experience who started 
out with Traders Studio (because it was less expensive than Trading 
Blox), then switched to AmiBroker, and finally ended up buying Trading 
Blox Builder (I hope it's okay for Tomasz that I write this).


--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Gonzaga gonzag...@... wrote:


 Thanks a lot
 I am loooking that soft, seems interesting.
 3000$ though..
 And in the thread mentioned above, speak about Traders Studio. Could 
be an alternative?

 And trade Station?
 What a pity Amibroker can not do it.. Would be a very big improvement..



 --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, rise_t575 rise_t@ wrote:

 
 
 
  I'm pretty sure that TradingBlox Builder can do this. You code 
each system completely separately, and - as an overlay - in its GUI it 
has a convenient slider with which you can set the percent allocation 
for each system. On the risk management side, it has risk managment 
variables per system and for the system of systems, so that you can 
control the correlation of the multiple systems (e. g. that you don't 
have too much weight in one sector in the meta-system).

 
  But it's rather expensive and is not array based.
 
  --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, Gonzaga gonzagags@ wrote:

  
   Hi.
   I am lately trying to mix several systems in on meta-system, and 
I am observing that is not difficult to obtain good CAR's with low 
Draw Downs.
   For example, system 1 trade against 100 tickers of the 
NAsdaq-100 and system 2, against the same 100 tickers. Both systems 
'compete' for the money.

   This is a 'Meta-system', multi-system and multi-stock.
  
   Well, I see it's not very difficult to obtain profitable systems..
   I see also that a good filter to improve results is to filter 
every system with a volatility value of the index you are using, for 
example ATR of NQ, or ATR of SPX. So you trade any system in the best 
moment for the system.
   You have to filter all your systems, and then, mix them in one 
meta-system.
   I thing it's not very hard to obtain annualized CARs 30% and DD 
less than 20%.

   BUT, it's hard to programme and backtest.
   Amibroker backtests very easily many stocks, but to mix several 
systems is a mess.. difficult and easy to fail..
   Does anybody know a trading platform that creates this kind of 
meta-system easily? (perhaps trade station?)

   Or a way to mix and backtest 2 or 3 systems easily in Ami?
  
   Thanks
  
 





Re: [amibroker] AmiBroker running stinking slow on super fast new system ???

2010-06-27 Thread Keith McCombs

Where on earth did you get the 50 times faster from?

On 6/27/2010 08:26, gmorlosky wrote:


I am very disappointed in the speed I am getting running an Explore in 
AmiBroker 5.20. Here is my example:


Both units are running the same 32 bit version of Amibroker 5.20, 
running the same Explore I created, with no other software other than 
basic antivirus running.

***
Old system (about 7 years):
Pentium D (single core) 2.4 mhz, 1 gig memory 233 mhz, 5400 rpm drive, 
Windows XP Pro


Results of Explore (5500 sysmbols):
CPU usage 100%, 8 minutes 5 seconds
***
New system (about 2 months):
i7-930 (quad core) 2.6 mhz, 6 gig memory 1600 mhz, 7200 high rpm 
drive, Windows 7 64 bit


Results of Explore (5500 sysmbols):
CPU usage 12%, 2 minutes 3 seconds
***
Why so stinking slow ??? when the new system is roughly 50 times 
faster in overall processing ???





Re: [amibroker] Add to watchlist

2010-06-27 Thread Keith McCombs
But you can.  Right click on the watch list.  First item on the new menu 
is Add selected symbol.  What more do you want?


On 6/27/2010 22:20, AmiBroker wrote:


In spite of how much I like AB, I'm surprised that as of 5.3, one can 
still not click (right-click) on a chart and add it to the watchlist 
of one's choice.




Re: [amibroker] Re: Simulating a mouseclick from afl

2010-06-19 Thread Keith McCombs

Progster --
You bring up a point that has bugged me for years.  Not just with AB but 
with most commercial software.


When one is a beginner with any software package, unfamiliar 'features' 
are just 'bugs' for someone who doesn't need or want them (at least not 
yet).  For example, with AB, the 'feature' to be able to drag the 
relative positions of information panes, like Layers, Layouts, Notepad, 
etc.  drives me up the wall.  Every few weeks or so, I accidentally set 
one of these free, and spend at least a half hour getting it back in 
place.  But AB is not nearly as bad as M$ Word that has bullets, 
automatic paragraph indention, and capitalization of first letter in a 
sentence enabled, right out of the box.


Let's have all the features we can USE, but please don't ship new 
product with them all enabled.


-- Keith

On 6/19/2010 10:01, progster01 wrote:




--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Tomasz Janeczko gro...@... wrote:


  it doesn't remember collapsed/expanded states,
 It never supposed to remember that. By design they are expanded to make
 sure that novices are aware that there are parameters in the sections.
 Otherwise novice user may not know that it has to click to reveal
 underlying parameters.

So, have this behavior be the as-delivered default for novices, and 
then provide an optional config choice that turns on 
collapsed/expanded state memory for those who want it.


I can't agree that straight-jacketing the entire user base is ever the 
right answer to protecting novices - not when the functionality in 
question is itself simple, logical, desirable to many.


Further, I'd suggest to add a section to the Help specifically on 
Default Setting for Beginners (or similar) and offer all the 
explanation necessary right there in a living, growing section. Then, 
if novices trip-up and send a question, just refer them to the page 
(ideally without sarcasm, since these are _anticipated_ trip-ups, 
yes?). g


The tendency to simply lock things down in the least-capable 
configuration, and avoid adding config choices, supposedly in favor of 
limiting confusion for beginners is way overdone, IMO.


Besides, its' too late. AB is already overwhelming for beginners. A 
long steady climb up the learning curve is unavoidable.


  doesn't allow colors,
 It is also not a bug. Windows UI design guidelines say that UI controls
 should have consistent colors in entire system and all OS. The colors
 used are system colors set in Windows Control Panel.


Again, a great choice as a default, a terrible choice for users who 
have perfectly good reasons for wanting to color-code their parameter 
displays.


It boils down to No you can't do that, because I don't feel like 
letting you.


I know AB is created and viewed as a work of authorship and art - and 
it is that. However, it is purchased as a TOOL.


It's perfectly possible to offer a single setting which would 
configure the whole shebang into Art Mode, setting all config items, 
looks, behaviors, etc. to those most aesthetic of settings (in the 
creator's view). We could flip that bit and mouse around and admire 
whenever we like.


The rest of the time, IMO, it would be better to treat a tool as a 
tool and let it be used in the most efficient/effective manner as per 
the judgment of the customer who has their own job to get done (the 
perceptions of each customer being non-identical to other customers or 
to the creator).


Let's have less define, impose, require, and more suggest, allow, enable!




Re: [amibroker] (unknown)

2010-06-10 Thread Keith McCombs
Why are these kinds of messages being allowed on the AB Yahoo forum?  No 
subject, and no text, just a link.  Looks like some sort of scam to me.  
I wouldn't dare click on the link below.


BTW, this one came from ohneclue ohnec...@yahoo.com.

On 6/10/2010 10:24, ohneclue wrote:


http://ldavis6532se.webs.com




Re: [amibroker] (unknown)

2010-06-10 Thread Keith McCombs

Prashanth --
You make a good point.  As Millowena pointed out, the sender may have a 
virus and it is out of their control.  I did notice that the originator, 
'ohneclue', was active (and not spamming) on this board in the past.  
But last heard from over a year ago.


-- Keith

On 6/10/2010 12:21, Prashanth wrote:


Keith,
Since the member is un-moderated, all mails that seem to be supposedly 
sent using that mail Id is automatically passed to the group. There 
are 2 ways to take care of the problem
In the group, TJ can moderate such members but risk is that since the 
member may also be a vastly contributing member, his posts will be 
delayed. This also adds to the work of TJ
Alternative is for members to Ignore such messages since its pure SPAM 
/ Virus infecting idea. I have received various such mails from many 
other groups as well and the best thing to do is not to click since we 
know that this is a SPAM attack and not a genuine message.

Cheers
Prashanth

- Original Message -
*From:* Keith McCombs mailto:kmcco...@engineer.com
*To:* amibroker@yahoogroups.com mailto:amibroker@yahoogroups.com
*Sent:* Thursday, June 10, 2010 20:32 PM
*Subject:* Re: [amibroker] (unknown)

Why are these kinds of messages being allowed on the AB Yahoo
forum?  No subject, and no text, just a link.  Looks like some
sort of scam to me.  I wouldn't dare click on the link below.

BTW, this one came from ohneclue ohnec...@yahoo.com.

On 6/10/2010 10:24, ohneclue wrote:


http://ldavis6532se.webs.com http://ldavis6532se.webs.com





Re: [amibroker] Re: Portfolio backtests are not valid?

2010-06-05 Thread Keith McCombs

Brenton --
Great idea.  I'm just starting to get my brain around it.  It will take 
me some work and time to implement.  But I do want to give it a go.


Thanks so much.
-- Keith

On 6/5/2010 07:13, Brenton Hill wrote:


Keith said: I want to score the Setups and not the Trades.

I have a method I use to do just this.

For example:

Lets say you have a system that buys at limit on the day after some 
setup criteria have been met.


The system gives a lot of setups on a given day (for example 12 
setups), but you don't want to place orders for all of them, you only 
want to place the top 5 ranked by some criteria.


Now because the system buys at limit not all the 5 orders you placed 
will necessary be filled, as the price may not fall to the limit buy 
price.  Lets say for example only 3 of the 5 orders you place actually 
reach their limit buy price.  But out of the 7 setups that there were 
that you didn't place orders for another 2 reach the limit buy price.


If you just use positionscore the way Amibroker natively does it, and 
set max positions to 5, it will enter the 3 trades that you placed 
orders for, but will also enter the 2 trades that you didn't place 
orders for, as it ranks the trades, not the setups, and allows 5 
trades to be taken.


I have worked around this problem as follows, using a custom backtest 
procedure.


For every setup, I assign Buy to true.  This passes all the setups to 
the custom backtest procedure.


Now for the setups that don't become actual entries (the ones that 
don't reach their limit buy price) I assign PositionSize = 0;  The 
ones that do reach their limit buy price get assigned the real 
PositionSize.


Then in the CBT, I loop through the entry signals one by one, keeping 
count of how many signals I've checked so that I only check the first 
5, and if the positionsize is equal to 0, I don't enter the trade, if 
the position size is grreater than zero, I enter the trade.


Doing it this way I have ranked the setups, not the trades.  And I 
have backtested exactly as I trade.


Regards
Brenton

Keith McCombs wrote:


Gonzaga --
Don't worry, we're not alone.  Our problems are a very natural result 
of trying to model Mean Reversion type systems.


Now for more specific comments:
I've thought a bit about using PositionScore.  However, I haven't 
been able to get my thinking past the fact that I want to score the 
Setups and not the Trades.


You said, /perhaps I see a solution:  If the signal is day 1, and 
the stock's purchase in the day 2, perhaps using the positionscore, I 
can purchase in the day 2 just the best stocks under my algorithm 
conditions of the day 1./  I presently do something similar, but 
without using PositionScore.  I divide my system into two separate 
.afl programs, SetupDay followed by TradeDay.  On SetupDay, I Explore 
the 5000 stock EOD data base to find potential stocks and their 
respective LimitPrices for TradeDay.  This results in anywhere from 0 
to 1000 potential trades for TradeDay.  I then randomly select less 
than 100 stocks from the setup list to trade on trade day using 1min 
data.  Why less than 100?  Because I use InteractiveBrokers for my 
1min data source.  IB limits the number of real time quotes to 100.  
Why random?  I haven't discovered anything better (but I am trying).


BTW, I am not suggesting that you use my approach above.  It has 
definite short comings.
One approach, which I have thought about, but not enough to attempt 
implementation, is to run the SetupDay program over a long period of 
EOD data.  It would either produce a file of setups or an enormous 
number of StaticVars.  Then use those results for filtering in the 
TradeDay program.  This approach, might even make WalkForward testing 
feasible for what we are doing.  Again, this would require a very 
large data base of 1min data.


BTW2, PItrading 1min data for 1100 stocks, including all of SP 500, 
costs only $159.  I said 'only'.  Compare that to real trading losses 
or development time of several months.


BTW3, I'm still hoping someone will enlighten me on the practicality 
of downloading, non-realtime, 3 years of 1min data for 6000 US 
stocks, ADRs and ETFs.  Perhaps this will require a separate thread.


-- Keith



On 6/4/2010 08:26, Gonzaga wrote:



Keith, I feel happy seeing that there is one person around the world 
with the same problems as me!

Although I don't want you to have problems, of course ;-)

But I see you have worked on our problems.
I think, same as you, that the real solution is buying many 1 minute 
data. I also use common stocks, and the backtesting time is a 
problem. And worse, I usually perform walk forward tests.
I can not even imagine the time involved in a long walk forward 
backtest!!

The Mike's points 2 and 3 are also very difficult and slow to execute.
I am not sure to begin such a hard investigation with my system. 
Mainly, because I feel I am going to obtain bad results..

mm.. I am not sure what to do

Re: [amibroker] Re: Portfolio backtests are not valid?

2010-06-05 Thread Keith McCombs

Mike --
The second link, Maximizing Backtesting Performance on Large Data Sets 
appears to supply a quantitative answer to some of our backtesting 
questions.  Though I'm not sure I understand how to use it.  But let me 
give it a try.


According to TJ, every bar of data requires 40 bytes.  So 1 year of 1 
minute data for one stock would requite:

252days/year * 390bars/day * 40bytes/bar = 3,931,200 bytes.
I presently have an Intel Core 2 Quad Q6600 CPU, with L2 = 2 x 4Meg Bytes.
So, 1 year of data would require half the L2, leaving the other halve 
for whatever other arrays my .afl strategy requires.  Assuming every 
additional array requires 4 bytes/bar, that would allow for about 10 
additional arrays.


But, why is the L2 described as being 2 x 4Meg, instead of just 8Meg or 
4 x 2Meg?  I'm guessing that perhaps the four cores do not have equal 
access to the same L2 segments.  Perhaps cores 0 and 2 use only one 4meg 
segment, while cores 1 and 3 use the other 4meg?  If this is indeed the 
case, then to make optimum use of cores and L2 memory, might one use MCO 
with two cores only?  Or perhaps, I should be think in terms of 6 
month's of data instead of a year's worth?  Should I even be thinking 
about about these kinds of details to achieve sorta of optimum 
performance?  I say sort of because I consider performance increases 
of 10% or less to be meaningless.


As for 64bit AB, I was thinking of available RAM and avoiding disk 
swapping as much as possible.  I have 8GB RAM on my computer, so it 
seems to me that in order to avoid swapping I should limit my data plus 
arrays to say 6GB.  For example, if my .afl system required 10 arrays, 
then one year of 1minute bars would require about 8MB.  So more than 
about 750 stocks would invite swapping.  BTW, when RAM becomes full and 
swapping becomes necessary is the RAM treated as if it were a first on 
first off memory.  If so, once one has even just a little more data than 
can be held in RAM at one time, the entire swapping process will take 
over completely (like a juggler with just one too many balls in the 
air).  And process times will increase tremendously (by some orders of 
magnitude?).


As for 32bit AB, with perhaps only 2GB RAM available, the limit would be 
closer to 250 stocks rather than 750.


Thank you very much for pointing out the two links, and especially the 
availability of MCO.

-- Keith

On 6/4/2010 04:18, Mike wrote:


Keith,

I wouldn't put too much faith in 64 bit over 32 bit.

http://finance.groups.yahoo.com/group/amibroker/message/125775

Better, perhaps, to look at a newer CPU with more cache.

http://finance.groups.yahoo.com/group/amibroker/message/140718

Meanwhile, have a look at MCO in the Files section of the group. Using 
all 4 cores of your machine may reduce your optimization time to a 
more manageable level, assuming that you don't overwhelm your cache ;)


Mike

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Keith McCombs kmcco...@... wrote:


 I have been dealing with this very same problem for a few months now.
 My comments on Mike's three suggestions below.

 1. This is the best suggestion for an accurate solution. Because you
 can actually test whether or not time order matters. Historical 1
 minute data is available. You can buy a very large assortment for
 stocks, indexes, futures, and forex from PITrading.com. Also, some
 brokers allow fairly large back fills, Fidelity Wealth Lab Pro and
 TradeStation come to mind. It appears that IQfeed, has 1minute stock
 data going back only 3 years. I'm guessing that there are many others.
 For backtesting large amounts of 1minute data, you should probably be
 using AB 64 bit with lots of RAM. I have done some of this type testing
 with AB 32bit. But found it to be too time consuming. I will probably
 try again, when I can dedicate a 64 bit system to it. Yes, all of these
 cost money. There is no free lunch.

 2. This is an approach that I am using right now for backtesting, using
 EOD data. AA is set to buy $100 of any stock, with Round lot size and
 Min Shares set for 0.0001 shares, Initial equity set to $1,000,000,
 no other limits, position scoring, commissions, or slippage. Then
 %return = $return for each trade. I run Explore. Then export results
 to a spreadsheet to calculate average return per trade, and some what
 ifs. I find the spread sheet to be tedious and therefore error prone.
 And I have recently hired a programmer to automate that part of the
 process for me. Still no free lunch.

 3. I also use this system and compare results with system 2 above for
 'believability'. Here, I do use realistic numbers for Initial equity,
 minimum and round lot size, commissions and slippage. I do not need to
 use CBT to do it. But instead use Optimize with Random values for
 Position Score. And for my present system, using all common US stocks
 (~5000), it takes about 1 hour per 100 Optimize iterations with AB 5.26
 32bit and 2.63GHz Quad core

Re: [amibroker] Re: Portfolio backtests are not valid?

2010-06-04 Thread Keith McCombs
I have been dealing with this very same problem for a few months now.  
My comments on Mike's three suggestions below.


1.  This is the best suggestion for an accurate solution.  Because you 
can actually test whether or not time order matters.  Historical 1 
minute data is available.  You can buy a very large assortment for 
stocks, indexes, futures, and forex from PITrading.com.  Also, some 
brokers allow fairly large back fills, Fidelity Wealth Lab Pro and 
TradeStation come to mind.  It appears that IQfeed, has 1minute stock 
data going back only 3 years.  I'm guessing that there are many others.  
For backtesting large amounts of 1minute data, you should probably be 
using AB 64 bit with lots of RAM.  I have done some of this type testing 
with AB 32bit.  But found it to be too time consuming.  I will probably 
try again, when I can dedicate a 64 bit system to it.  Yes, all of these 
cost money.  There is no free lunch.


2.  This is an approach that I am using right now for backtesting, using 
EOD data.  AA is set to buy $100 of any stock, with Round lot size and 
Min Shares set for 0.0001 shares, Initial equity set to $1,000,000, 
no other limits, position scoring, commissions, or slippage.  Then 
%return = $return for each trade.  I run Explore.  Then export results 
to a spreadsheet to calculate average return per trade, and some what 
ifs.  I find the spread sheet to be tedious and therefore error prone.  
And I have recently hired a programmer to automate that part of the 
process for me.  Still no free lunch.


3.  I also use this system and compare results with system 2 above for 
'believability'.  Here, I do use realistic numbers for Initial equity, 
minimum and round lot size, commissions and slippage.  I do not need to 
use CBT to do it.  But instead use Optimize with Random values for 
Position Score.  And for my present system, using all common US stocks 
(~5000), it takes about 1 hour per 100 Optimize iterations with AB 5.26 
32bit and 2.63GHz Quad core (though I doubt Quad core has much if any 
effect on speed).  I typically run a total of 1000 iterations 
overnight.  I can then export results to spread sheet to calculate min, 
max, average, and standard deviations of all metrics output by 
Optimize.  If you want custom metrics, only then will you have to use 
CBT as well.  BTW, observed optimize time, for my system, is almost 
independent of total time period, from a few days to 10+ years.


Hopefully, someone who uses IQfeed can chime in here, regarding using it 
for back testing 3 years of 1minute data for large number of stocks, all 
US Common stocks, ADRs, and ETFs (approx 5,950 individual equities).  I 
don't care how much space it takes, with today's almost free hard 
drives.  But how practical is it to back fill that much data (I don't 
mind committing a single computer to do, say 12 hours a day, if that 
would do the job)?  Some quick calculations, assuming 3years of 1minute 
data for 6000 equities, is only about 70GBytes of data, possibly only 
25GBytes using compression.  Assuming 100KBytes/sec download speed, that 
is about 65 hours, or 5+ days at 12 hours/day.  Updating (_not real 
time_) one days worth of 1 minute data for 6000 equities would only take 
about 5 minutes.  The numbers are quite practical, depending of course 
on IQfeed throttling.


-- Keith


On 6/3/2010 17:21, Gonzaga wrote:



Interesting suggestions, Mike,
I'm not using conditional entries.
And, about what you say:
1) Intra-day data: I use too many stocks to obtain them easily. And 
the backtest would last so much that it 'd be impossible.
2)Remove maxpositions. Yes, but in any day, I don`t know how many 
signals I can have, so I don't know how much do I have to reduce the 
position size.
3) Randomly select from the entry signals and run your backtest many 
many times: yes that's interesting. I have to try to see the real 
robustness of my system. Although I am not sure how to do it. I 
suppose I have to use the custom backtester interface.


And also, these messages has given me new ideas. Perhaps I can change 
it and buy in the next day, using delay 1, as Thomas said.

It`ll be a different system, but perhaps it is profitable..

I'll try it all. Any other suggestion would be appreciated..

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Mike sfclimb...@... wrote:


 Are you using conditional entries?

 e.g. If the Close has fallen 3 days in a row, then place a limit 
order tomorrow 5% below today's Close


 If not, then see Tomasz's last reply. Otherwise, a couple of 
alternatives would be:


 1. Get intra-day data as Herman suggested.

 2. Remove the max position restriction and take all entries, 
reducing position size accordingly. You would have to divide your 
funds between all candidates, else use probability to estimate the 
number of candidates that might get filled and divide using that 
lesser number.


 3. Randomly select from the entry signals and run your backtest 

[amibroker] Missing data for one stock from IB.

2010-06-01 Thread Keith McCombs
I entered 11 stocks into one of my AB watch lists.  For most of the 11, this 
was the first day for them to be in my IB data base.  I started an explore.  
But only 10 of the eleven were listed.  The eleven stocks were: ATPG, AUXL, CM, 
COCO, DV, HOS, LOPE, NE, OII, SMTC, TTEC.  The one that was not list by Explore 
was COCO.  The only condition for being listed is:
Filter = inWatchList(1), and COCO is indeed in the watchlist with the other 10.

The .afl for running Explore also plots prices for stocks.  It worked for all 
but COCO.  I even entered COCO on the API tab in the TWS trading platform.  TWS 
plotted a 1min chart for COCO just fine.  And BTW, the Explore displayed the 
Last Close and Time of Last Close throughout the day and both were kept right 
up to date, with Run every set for 2min.

I have also tried entering COCO-STK, COCO-NASDAQ, and COCO-NASDAQ-STK.  But 
that didn't help.

Does anyone have any idea what might be going on here?
Any suggestions on how I might go about debugging this problem?

Thanks for any help coming my way,
-- Keith


Re: [amibroker] Missing data for one stock from IB.

2010-06-01 Thread Keith McCombs
No, I ran Explore many, many times.  I ran it manually a few dozen 
times.  And also set Run every at different intervals, 1, 2, and 
5minutes.  With Run every set, I could observe, new times and prices 
displayed in AA spread sheet for all other symbols.  In the IB status 
box, lower right corner of AB, I saw message suggesting the I check 
symbology once.  That is why I tried the other symbols.  I'm using 
ib.dll 2.0.2, AB 5.26, and TWS 901.8.


Perhaps someone who uses IB for data, can try COCO for me?
If someone using IQfeed could NOT get COCO, that would be interesting 
(or a coincidence).


Thanks for your response,
-- Keith

On 6/1/2010 16:05, Herman wrote:


Did you run the explore just once?

Nw symbols that on the first pass do not have any data yet will NOT be
included in the report. For example, if I Explore 500 new tickers in a
new database less than half will be listed, the others did not have
any data yet. When this happens I just run the explore again, on the
same list, and then all tickers will be there.

This only happens during the first pass for new symbols.

herman

 I entered 11 stocks into one of my AB watch lists. For most of the
 11, this was the first day for them to be in my IB data base. I
 started an explore. But only 10 of the eleven were listed. The
 eleven stocks were: ATPG, AUXL, CM, COCO, DV, HOS, LOPE, NE, OII,
 SMTC, TTEC. The one that was not list by Explore was COCO. The
 only condition for being listed is:
 Filter = inWatchList(1), and COCO is indeed in the watchlist with 
the other 10.


 The .afl for running Explore also plots prices for stocks. It
 worked for all but COCO. I even entered COCO on the API tab in the
 TWS trading platform. TWS plotted a 1min chart for COCO just fine.
 And BTW, the Explore displayed the Last Close and Time of Last Close
 throughout the day and both were kept right up to date, with Run 
every set for 2min.


 I have also tried entering COCO-STK, COCO-NASDAQ, and
 COCO-NASDAQ-STK. But that didn't help.

 Does anyone have any idea what might be going on here?
 Any suggestions on how I might go about debugging this problem?

 Thanks for any help coming my way,
 -- Keith

 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

 For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
 http://www.amibroker.com/devlog/

 Yahoo! Groups Links




Re: [amibroker] AmiBroker 5.30.1 64-bit edition (experimental)

2010-05-31 Thread Keith McCombs

TJ --
Does this mean that 64-bit version may be installed in any folder in a 
64bit system, not just c:\Program Files\?


If so, is that true for all 64bit programs or is AB64 a special case?
Sorry, yes, I know its a bit off topic.  And you're not here to support 
anything other than AB.  But, I don't know who I could trust more.


Thank you.
-- Keith

On 5/31/2010 08:20, Tomasz Janeczko wrote:


Hello,

AmiBroker 5.30.1 64-bit edition (experimental) is now available for
download from:
http://www.amibroker.com/x64/

This is experimental version *only* for people running 64-bit Windows
and wanting to utilise *more* than 4GB of memory. 64-bit version does
NOT offer anything more, just ability to access more memory. It can
(and should) be installed into *separate* folder, so it does not
overwrite 32-bit edition (if installed). This version includes only 2
plugins: CMAE and IB (interactive brokers) plugin. 64-bit version of
IQFeed plugin is in the works
and it will arrive later.

Note that regular users, even running 64-bit Windows should rather run
regular, 32-bit version of AmiBroker as it offers more compatibility and
was tested on way more installations.

Please note that 64-bit version has BETA/experimental status and in case
of problems you should use 32-bit version instead.

Best regards,
Tomasz Janeczko
amibroker.com




Re: [amibroker] Re: new TWS, problems auto trading

2010-05-28 Thread Keith McCombs

This was released by TJ on 5/26/2010.  See:
http://www.amibroker.com/at/index.html
http://www.amibroker.com/at/at1320beta.exe
On 5/25/2010 13:22, Gray Bohon wrote:
Any thoughts on when the IB Autotrading Interface might be updated for 
the latest version of TWS?  They are currently on build 905.
Also, does anyone know what is the latest version of TWS that will 
still work with the AI?  It's been reported that 901.3 will, 904.5 
won't.  I'm wondering about 903...

Thx. GB.



[amibroker] User's Guide 5.30 in PDF format?

2010-05-27 Thread Keith McCombs
When should we expect to see the AB 5.30 User's Guide available in PDF 
format?

I'm looking forward to it.
Thank you,
-- Keith


Re: [amibroker] 64-bit IQFeed / Interactive Brokers plugins

2010-05-22 Thread Keith McCombs
Personally, I don't see much of an advantage for having AB-64 for IB.  I 
would be using it primarily for trading, and I need a relatively small 
database to do that.


However, if one can acquire a very large data base with IQFeed, perhaps 
IQFeed should have preference over IB, for 64-bit implementation.


On 5/20/2010 18:12, Tomasz Janeczko wrote:


Hello,

I would like to learn how many of you are already using Windows 64-bit
edition
and are interested in running native 64-bit IQFeed and Interactive
Brokers plugins.

Note that primary advantage of 64-bit Windows and apps is ability to 
address

way more virtual memory than 32-bit system.

Best regards,
Tomasz Janeczko
amibroker.com




[amibroker] InCategory()

2010-05-22 Thread Keith McCombs
I would like to be able to code,
Filter = InCategory(2) OR InCategory(5);

AB has an InWatchList(), but no InCategory() function.
I know I can copy all symbols from category 2 and 5 into a watch list 
and then use InWatchList(), or even use separate watch lists for each 
category.  Either option seems a bit inelegant.

Can anyone suggest a better way?

Thanks,
-- Keith


Re: [amibroker] Backtesting vs. Live Trade Reports

2010-05-21 Thread Keith McCombs

Steve --

You can set delays in your program which override the ones in 
'Settings', by using SetTradeDelays(0,0,0,0);.


There are many other 'Settings' that you can override programmatically 
as well.  Go to AmiBrokerU.com, register for free, and download 
BoilerPlate.afl.


You might also try,
AB = CreateObject(Broker.Application);
AA = AB.Analysis;
AA.LoadSettings(path and filename.abs);
But this is more advanced.

-- Keith

On 5/19/2010 18:00, graphman27 wrote:


As I complete the creation of Amibroker signals and their subsequent 
portfolios, I'm having a logistical problem. When I am creating and 
backtesting portfolios, I use Buy and Sell Delays of +1 for both 
mutual funds and ETFs. This works best for mutual fund accuracy and, 
since I use EOD data only, it works well for ETFs as well.


Here is my question. When I finish backtesting a portfolio and want to 
switch to live trades, I seem to have a problem. If I leave the 
Settings for Reports at Buy+1 and Sell+1, when I run the trade reports 
each morning to see what the EOD data did from the previous night, I 
get one day delayed trades. In other words, if a signal actually got 
generated last night, it will not show up on the trade report until 
the next day's CLOSE, which is obviously too late. Is the only way to 
alleviate that problem to go back into settings and change them to 
Buy+0 and Sell+0? If so, I worry that as I switch back and forth 
between wanting live trades for taking action and going back into 
signal backtesting mode, I will forget to switch between +0 and +1 in 
the settings. Since I am now live with two portfolios and will 
probably keep working on new ones for months to come, is there a 
better, fail-safe way of doing thi s? Otherwise, I will be manually 
switching many times per day/week.


Remember: These are portfolios with multiple signals inside of them, 
so I don't want to run each signal separately and look for arrows on 
charts.


Thanks so much!

Steve.




Re: [amibroker] Re: AB/IQFeed #symbols Limit

2010-05-19 Thread Keith McCombs

Kurasake --
I don't use IQ feed, but IB instead.  IB has a limit on 100tickers at a 
time.
I can shut down the AB/IB connection.  Then run an explore on the entire 
data base. Then run my program with Filter = InWatchList(WLnum), where 
there are less than 100 stocks in WLnum.  It takes quite a while to 
backfill all in the watchlist.  But once that is done, I can shut down 
AB/IB connection and do another explore including the newly downloaded 
stocks.


You might try the same with IQfeed.
-- Keith

On 5/18/2010 15:39, kurasake wrote:




Hi Tomasz

Thank you for your response. I sincerely appreciate the time you take 
to monitor these forums and answer questions.


What I'm paying IQFeed for is real time data for 500 _Simultaneous_ 
symbol access. I am allowed to view as many symbols as I want so long 
as I don't view more than 500 at the same time. (I've confirmed this 
with IQFeed support). So, if I were to add 500 symbols to the Realtime 
Quote window, I wouldn't expect anything more. But when I run an 
Exploration, I'm not asking for more than 500 _simultaneous_ symbol 
updates at a time.


As I understand it, an Exploration and Automatic Scan in AB is not 
_continually_ requesting data for 500 symbols simultaneously even 
after it's done with the exploration. Rather, (again, as I understand 
it), an Exploration and Automatic Scan goes through the list of 
symbols sequentially, requests data from IQFeed one at a time, and 
then goes on to the next symbol.


So, once an Exploration is done backfilling a symbol, it's no longer 
requesting or getting data for that symbol. That means the whole 
_simultaneous_ and _realtime_ part that I'm paying for is being wasted 
since I'm _not_ actually updating data for 500 symbols with an 
Exploration. In effect, an Exploration takes a snapshot of the 
symbol's data and that's it. As far as AB is concerned, until another 
Exploration is run or the user selects another symbol or the Realtime 
Quote window is used to monitor symbols etc it really has no need for 
IQFeed except for the currently selected symbol.


Clearly the IQFeed client provides the means for users to look at as 
many symbols as they want as long as it's not 500 symbols viewed 
_simultaneously_. And as IQFeed support personnel confirms, I'm well 
within my rights to view as many symbols as I want so long as it's not 
more than 500 at the same time. So, whether or not I exceed my 500 
symbol subscription limit depends entirely on the stock investment 
programs to release each slot/ resource when it's done using it.


If I open up the IQFeed Client, it will display how many symbols are 
currently being tracked/monitored by IQFeed. And if I go into 
QuoteTracker and remove symbols from the list of symbols I want to 
monitor, the IQFeed Client will reflect that change and show that I've 
freed up those slots and that I'm now able to replace those symbols 
with new ones. However in AB, once I select a symbol, it holds on to 
an IQFeed slot even if I _delete_ the symbol from the AB database. 
So in this case, AB is still holding on to the IQFeed resource even 
though it can not possibly have any use for that resource. ( Or it may 
not technically be AB that's holding on to the resource but it 
clearly hasn't told IQFeed to free up that resource, so the end result 
is the same.)


Using another example, let's say I run an exploration on 500 symbols 
in AB. After the Exploration runs, that means all 500 slots that I'm 
contracted for are filled up but are _NOT_ actually being used for 
simultaneous realtime updates. All 500 slots are in effect, used but 
dormant. Now, lets say in this state, I decide to run QuoteTracker on 
the same machine using the same IQFeed data source. Since AB is still 
holding on to the 500 slots, QuoteTracker would be unable to get any 
data, _EVEN THOUGH_ AB is not actually actively getting real time data 
for any symbol (except the currently selected).


I've confirmed with IQFeed support that I'm allowed to connect as many 
programs to the IQFeed client as I want. This makes each slot in 
IQFeed is a limited and _shared_ resource. If an Exploration in AB ran 
through 500 symbols but didn't release those IQFeed slots, this would 
be analogous to a program using up all the memory and disk drive space 
so other programs are unable to run even though it's not really using 
any of it . So, if AB no longer uses a slot, why not release it 
after each use? I think this is reasonable?


I can appreciate that AB is too fast for IQFeed to handle. I think 
it's fantastic that you've made AB so fast. But with the backfill 
option in an Exploration turned on, I would think it would be better 
if there were a level of flow-control/handshaking between AB and 
IQFeed so that they play nicely with each other.


If one of the main functions of any stock analysis/monitoring program 
is to provide accurate data to the user then I would think that AB 
should wait for IQFeed to catch up instead of 

Re: [amibroker] Re: Understanding AB's OLE Automation Object Model

2010-05-18 Thread Keith McCombs

Paul --
I appreciate your response.  However, all those articles assume an 
understanding of computer lingo way beyond my own.


I have been using OLE objects only within .afl code with statements such as:
AB = CreateObject(Broker.Application);
AA = AB.Analysis;
AA.LoadSettings();
and
ADoc = AB.ActiveDocument;
ADoc.Name = SPY;
and
AB.RefreshAll();

All of the above were 'given' to me by helpers on this forum.  I never 
would have been able to get this far, had I only read AmiBroker's OLE 
Automation Object Model even a thousand times.  I don't want to have to 
leach off of them forever.  So, right now, I'm just trying to find out 
what is meant by the terminology used in that documentation.


For example, what precisely does AS Date mean?  Is it AB's way of 
expressing a date, such as 951231 for 12/31/1995, or is perhaps Date as 
used in Jscript or VBscript?  All three are different.  One other 
example: the terms FileName and pszFileName are used throughout.  
Precisely, what do they mean and what is the difference between these 
two terms?


I guess what I am really looking for is a precise explanation starting 
at the beginning: something like AmiBroker Custom Backtester Interface 
by Wayne (GP),

http://www.amibroker.org/userkb/2008/03/16/amibroker-custom-backtester-interface-2/

Thank you for your help,
-- Keith


On 5/17/2010 21:41, paultsho wrote:


if you just want to know COM datatype, try this one 
http://supportline.microfocus.com/documentation/books/nx30books/opolda.htm 
or google com or ole datatype
if you want to know generally about com. Go to codeproject.com and 
search for introduction to COM. A lot of code is in C. so you should 
have no problem understanding it.


--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Keith McCombs kmcco...@... wrote:


 Hi --
 I've been having real difficulty understanding OLE. I've printed out
 the description in the AB Users Manual and read it over and over many
 times. I'm afraid it is just too brief, and assumes a level of
 programming experience which I do not have (Although I have over 20
 years experience with the 'C' programming language, I do not have any
 experience with object oriented languages, other than AB's CBT).

 I've looked through the AB online library and AB Yahoo files, with
 little success.

 I believe that my biggest problem was that many terms are used without
 any description as to their meaning. For example, many of the following
 can be easily confused with terms used in every day language. Terms
 such as Methods, Properties, As Date, As Single, As Long, Variant, Sub,
 Type, As Object, As Boolean, and As Integer appear to be borrowed from
 other programming languages.

 In 'C' the terms Long, Short, and Int define integers. And each may or
 may not contain a different number of bits, depending on the 
computer or

 operating system used. But what do those words mean in AB's OLE? Are
 they all integers? Do they use different number of bits? How many
 bits? Maybe some are redundant?

 'C' doesn't use the term Single, but VB does and FORTRAN did (maybe
 still does).

 It looks to me like maybe I should be learning a bit about VB. Many of
 the terms are used in VB. But, if they are indeed VB terms, do they
 have identical meanings? If so, that seems a bit odd to me since AB
 is/was coded in C++.

 Maybe someone can suggest one or more sources which might act as an
 introduction to, or present a 'freshman' level description of OLE?

 Thanks,
 -- Keith





[amibroker] Understanding AB's OLE Automation Object Model

2010-05-17 Thread Keith McCombs
Hi --
I've been having real difficulty understanding OLE.  I've printed out 
the description in the AB Users Manual and read it over and over many 
times.  I'm afraid it is just too brief, and assumes a level of 
programming experience which I do not have (Although I have over 20 
years experience with the 'C' programming language, I do not have any 
experience with object oriented languages, other than AB's CBT).

I've looked through the AB online library and AB Yahoo files, with 
little success.

I believe that my biggest problem was that many terms are used without 
any description as to their meaning.  For example, many of the following 
can be easily confused with terms used in every day language.  Terms 
such as Methods, Properties, As Date, As Single, As Long, Variant, Sub, 
Type, As Object, As Boolean, and As Integer appear to be borrowed from 
other programming languages.

In 'C' the terms Long, Short, and Int define integers.  And each may or 
may not contain a different number of bits, depending on the computer or 
operating system used.  But what do those words mean in AB's OLE?  Are 
they all integers?  Do they use different number of bits?  How many 
bits?  Maybe some are redundant?

'C' doesn't use the term Single, but VB does and FORTRAN did (maybe 
still does).

It looks to me like maybe I should be learning a bit about VB.  Many of 
the terms are used in VB.  But, if they are indeed VB terms, do they 
have identical meanings?  If so, that seems a bit odd to me since AB 
is/was coded in C++.

Maybe someone can suggest one or more sources which might act as an 
introduction to, or present a 'freshman' level description of OLE?

Thanks,
-- Keith



Re: [amibroker] Programmatically Add New Symbol to Database

2010-05-14 Thread Keith McCombs

B S --
Code snippit below works for me.

  AB = CreateObject(Broker.Application);
  ASS = AB.stocks;
// add all stocks in list to database
  DBAstkcnt = 0;  // used later for how many
  fh1 = fopen(filename, r);
  if(fh1){
while(!feof(fh1)){
  line = fgets(fh1);
  if(StrLen(Line)1){
symbol = StrExtract(line, 0);
// _TRACE(line1:  +  Line);
ASS.Add(symbol);// add symbol to database, even if already 
there

++DBAstkcnt;
StaticVarSet(DBAStockCount, DBAstkcnt);
}
  }
  fclose(fh1);

If symbol is already in data base, no problem.  A second copy is NOT added.
-- Keith

On 5/14/2010 11:10, B S wrote:

Hi-
Below is a simplified version of an afl that I am using to write 
tickers from a text file into a watchlist.  Everything works fine, 
except that some of the tickers in the text file are not already in 
the database.  As I've found out, if they are not already in the 
database, they do not get added.  It's a realtime database, so I 
believe that I only need to add the symbol in there and the next day 
the appropriate fields will populate.  Does anyone know of a way that 
I can first add symbols to the database through afl?  Or a .js file?  
(This afl actually gets called in a .js file that runs nightly)

Appreciate any suggestions. Thanks.
/
Path = C:\\Scans\\;

WL = DC_SYMBOLS;

WLnumber = CategoryFind(WL,*categoryWatchlist*);

fh = fopen(Path+WL+.txt,r);

**

*if*(fh)

{

*while*(!feof(fh))

{

Line = fgets(fh);

Ticker = StrLeft( Line, StrLen(Line)-1 );

CategoryAddSymbol(Ticker,*categoryWatchlist*,WLnumber);

}

fclose(fh);

}

**

*else*

{

_TRACE(ERROR: +WL+ does not exist);

}





Re: [amibroker] Formula Editor...annoying problem...all green text

2010-05-14 Thread Keith McCombs

Todd --
Yes, I have had this happen.  It usually fixes itself without my needing 
to close and re-open though.

Yes, it is annoying. The fix??
-- Keith


On 5/14/2010 19:22, toddk63 wrote:


Some of my afl's, particularly long ones, will turn to all green text 
when I edit them. the color coded text will not re-appear unless I 
save, close and re-open the afl. Anoyying.


Anyone else ever had this problem? The fix?

Todd K.




Re: [amibroker] IB: Exit all long positions automatically at 15:00 - 15:30

2010-05-02 Thread Keith McCombs

Leif --
InteractiveBrokers allows one to buy or sell using, MOC, Market On 
Close, and LOC, Limit On Close, orders.  However, I don't know if this 
works using the AmiBrokers IB controller.  If you are interested and 
find out, please let the rest of us know.


-- Keith

On 5/1/2010 15:07, Leif P wrote:


When using IB intraday, what is the syntax for selling anything that's 
long (open) at say 15:00 or 15:30? (Have there ever been optimization 
discussions on this issue?)


I mainly don't want to take anything home with me at the end of the 
day.





Re: [amibroker] Re: Easy data refresh?

2010-04-30 Thread Keith McCombs

Kurasake --
Could it be that you might have a hardware problem?
To test you RAM, run MemTest86+ at least overnight.  Free from:
http://www.memtest.org/

and your hard drive(s), run SpinRite. $89US from:
http://www.grc.com/cs/prepurch.htm
This is an excellent product, though a bit expensive and geeky.  Manual 
is available at:

http://www.grc.com/files/sr5_manual.pdf
That is the latest manual, even though the latest version of SpinRite is 
6.0.

And for everything you don't need to know about SpinRite:
http://www.grc.com/files/technote.pdf

You might read the following for more info on other HDD testing and 
repairing ideas:

http://www.techsupportforum.com/hardware-support/hard-drive-support/461234-questions-about-spin-rite.html

-- Keith

On 4/30/2010 14:23, kurasake wrote:


Hi Patrick.

Thanks for taking the time to write so much.

I've cross checked a few symbols in AB vs QT and I'm definitely only 
seeing the spikes in AB. For example for WDC I'll see the spike in the 
daily chart in AB, I'll switch to the 1-minute chart in AB and see the 
spike(s), note the date/time and look at the symbol in QT and scan 
through the entire range of date/time in QT for WDC and everything is 
normal. Another way of looking at it for me is that while the bad data 
spikes don't happen all the time or on every symbol in AB, I've never 
seen bad data spikes in QT (minute view, historical or raw data 
window) so I'm fairly certain the issue has to be in in AB or 
something related only to AB.


I would also tend to believe that if the bad data were consistent 
across QT and AB that it would most likely be a problem in the IQFeed 
data stream or the IQ agent in which case I would think it would be 
affecting a large number of their customers.


Curiously, no matter what symbol, the spikes always seem to pop up 3-5 
days prior and after I perform an explore in AA. So I could have 
looked at WDC earlier, and everything could've been fine. Then I'll 
run an Explore and then look at WDC again and the spikes would appear. 
I also don't think I've ever seen the spikes occur for the current day 
or for any day 5 days ago which is strange (though I'm not 100% 
positive about this part). This further increases my suspicion that it 
is something in AB.


The spikes also only seem to appear (or at least I notice it more) 
when I've already looked at a large number of symbols, so I'm thinking 
it might be an issue with the DB/memory cache but it's still hard for 
me to rationalize how/why it happens. I've tried playing around with 
the database and memory cache settings before but I guess I'll try 
other combinations.


As for the large number of symbols, I wish I could settle on 200 or so 
but my system (for lack of a better word) relies on a combination of 
technicals and candles and I don't always get the right signals 
triggered if the number of symbols I'm scanning across is too small. I 
don't always have that many symbols though and there are days when I 
don't need to perform an Explore and the spikes aren't so numerous as 
to be overwhelming (though some days are worse then others).


I'll figure this out eventually.

Cheers!

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
NW Trader pk47har...@... wrote:


 Hi Kurasake,

 I know exactly what you are experiencing. However, the bad data is 
in QT, but then once you have imported it to AB, it will persist. It 
will most frequently occur when you do a backfill of some or all 
stocks in QT, but depending on your data source and the spike settings 
you have defined in QT, it can happen anytime -- especially on 
volatile opening, closing, or FOMC days. And I see spikes virtually 
every day on symbols like SPY just after the close. Be aware that the 
spikes do not always appear on a QT chart, especially the instances of 
a 0 value for a close on an intraday bar (like a one minute bar). But 
they are there and you can find them by opening a QT data window 
(CTRLD) and scrolling to the time of the bad data.


 Here is my solution. First I've created an exploration which I run 
(daily setting in AA) on all symbols, at least once a day. The output 
of the exploration is the current Close, the HHV of high for the past 
21 days, the LLV of low for the past 21 days, and a 5 period ATR 
divided by the close. Why 21? Well I have a version of QT which allows 
20 days of historic data before it starts to drop off, so this will 
cover all QT data available on a given day. Why the ATR/C ? This is a 
quick volatility tool which can help spot when a stock may have a 
split, an outlier data point, or some other radical move.


 So you run the scan and identify the stocks that have data that 
needs correcting. Now open the Quote Editor in AB and sort the columns 
(e.g., if you have a LLV(L,21) of 0, sort the lows and find the bars 
where 0 exists. You could delete or edit those bars, and exit the 
Quote Editor, however this won't fix things so long as the bad data is 
in QT. 

Re: [amibroker] How do I get the lowest low price of the previous 3 bars?

2010-04-29 Thread Keith McCombs

LLV(L, 4);

On 4/29/2010 09:49, flapjack_666 wrote:


Hi all,

I need your help for what I am hoping is a simple question!

I have a trading system which places a Buy order and I want to set a 
stop order at the lowest low of the previous 4 bars i.e the bar which 
I bought on and the previous 3 bars.


Is this possible?

I have been looking at the help on lowest, lowestbars, lowestsince and 
lowestsincebars but I still can't see how to do it.


Thanks for any help,
Steve.

P.S. Great forum, keep up the good work.




Re: [amibroker] Re: Confusion with an array referencing itself.

2010-04-23 Thread Keith McCombs

Mike --
Yes, temporary arrays are discussed on the link you referred to.

However, the link does not explicitly discuss the situation where the 
the same array is on both left and right side of an equation, as in Buy 
= Ref(Buy, -1).  It does implicitly discuss it with the AMA(Close, 
Factor) example, which does not show a temporary holding array for the 
AMA value and evaluates the AMA by moving _forward_ in time.  The link 
also implies that the _reason_ for using a temporary array in 
calculating MyV = (H+L)/2 is speed, without reference to any other 
_reason_.  IMHO, the link falls quite short of explaining when and when 
not a temporary array is used.


I will agree that forward looking can be a dangerous practice.  However 
that does not necessarily mean that it is mathematically incorrect.  
Sword swallowing is also dangerous, unless you are very careful, and not 
prone to hiccups.


I must admit that I was unaware either bounds on BuyPrice, etc., or of 
the function SetOption(PriceBoundChecking, false).  And in fact I 
must now go back over and check much of my old code where I have used 
statements such as SellPrice = somevalue - slippage;.


As always, thank you for your knowledgeable replies.
-- Keith


On 4/23/2010 02:19, Mike wrote:


Keith,

Yes, the construction of temporary arrays is discussed, with detailed 
examples, in the following help page:


http://www.amibroker.com/guide/h_understandafl.html 
http://www.amibroker.com/guide/h_understandafl.html


As for SellPrice = Ref(O, 1); It is not so much a problem of the value 
being out of range. But rather, that you would be forward looking 
(i.e. referring today to tomorrow's open).


The out of range behavior can be disabled via 
SetOption(PriceBoundChecking, false); But, again, it is the forward 
looking that is the bigger problem.


It is true that AFL can, at times, be difficult. It may sound trite. 
But, with power comes complexity. It's a price I've been happy to pay.


I find that repetition is the best way to stay fluent in any coding 
language. To that end, I try to constantly challenge my assumptions 
and work on many different problems until it becomes 2nd nature. 
Trying to work out answers to other people's questions is the best way 
that I've found to do that; I'm constantly referring to help, 
documentation, code samples and other people's posts. All in an 
attempt to validate anything I write, so as not to lead anyone astray.


Mike

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Keith McCombs kmcco...@... wrote:


 Mike --
 I didn't know that,
 Buy = Ref( Buy, -1 ) is not ambiguous.
 It will behave exactly has you have proposed in your workaround (i.e.
 will internally create a temporary array holding Ref(Buy, -1) which 
will

 then be assigned to Buy).

 Is that explained somewhere in the User's guide or Help?

 BTW, I didn't really know SellPrice = Ref(O, 1); was wrong until I
 found out why in the User's Manual, page 141 (after about an hour of
 looking):
 During back-testing AmiBroker will check if the values you assigned to
 buyprice, sellprice, shortprice, coverprice fit into high-low range of
 given bar. If not, AmiBroker will adjust it to high price (if price
 array value is higher than high) or to the low price (if price array
 value is lower than low)

 It's these kind of things that make AB harder than it should be.
 -- Keith

 On 4/22/2010 22:13, Mike wrote:
 
  Keith,
 
  Buy = Ref( Buy, -1 ) is not ambiguous.
 
  It will behave exactly has you have proposed in your workaround (i.e.
  will internally create a temporary array holding Ref(Buy, -1) which
  will then be assigned to Buy).
 
  It does, however, require that Buy has already been initialized 
before

  this statement.
 
  Mike
 
  --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com 
mailto:amibroker%40yahoogroups.com,

  Keith McCombs kmccombs@ wrote:
  
   I gave this thread a new name because TJ's response brought up a 
much

   more general concern, for me, than the original title expressed.
  
   I thought that statements such as Buy = ref( Buy, -1 ); were
  ambiguous
   and therefore should not be used. The reason being that if the array
   valuation moves forward in time (Buy[n] evaluated before 
Buy[n+1]) then
   all Buys will be equal to Buy[0]. However if valuation moves 
backward

   (Buy[n+1] before Buy[n]) then a much different result is produced.
  
   Therefore, one should instead use something like this:
   temp = ref(Buy, -1);
   Buy = temp;
  
   Hopefully someone will clear up my confusion.
   Thank you.
   -- Keith
  
   On 4/20/2010 19:10, Tomasz Janeczko wrote:
   
Hello,
   
SellPrice = Ref(O, 1);
   
Wrong advice.
Once again: NEVER move trading prices using ref().
   
Instead delays SIGNALS
Buy = ref( Buy, -1 );
Sell = ref( Sell, -1 );
   
Best regards,
Tomasz Janeczko
amibroker.com
   
On 2010-04-21 00:54, hiscores wrote:
 There are numerous

Re: [amibroker] Re: Confusion with an array referencing itself.

2010-04-23 Thread Keith McCombs

TJ --
Thank you for Explicitly saying, There is NO difference what is on the 
left side . It does not matter if expression includes same variable as 
on right side.  The entire (right-side) expression is FIRST EVALUATED 
COMPLETELY (all bars at once) and AFTER that resulting ARRAY is assigned.


I have read the link many many times, and in fact have recommended that 
others read it over and over again.  Though it may have not been your 
intention, my reading of it led me to believe that the purpose, and 
therefore the implementation, of a *temporary* array was for speed, and 
speed alone.


If instead of MyV = (H+L)/2, the example had been MyV = H/2 or MyV = 
Ref(H, -1), or MyV = Ref(otherarray, -1), does AB still create a 
temporary array prior to assigning the results to MyV?  One might 
assume, for speed sake, that no temporary array would be created for H/2 
or Ref(H, -1).  Though it might be necessary for Ref(otherarray, -1), 
depending on otherarray.


Sorry if I sound a bit like my three year old grandson, who keeps asking 
'why' over and over again.  But that is how some us, regardless of age, 
learn.


Thank you.
-- Keith

On 4/23/2010 13:07, Tomasz Janeczko wrote:


Correction:
entire (left-side) expression
should read
entire (right-side) expression.

On 2010-04-23 19:05, Tomasz Janeczko wrote:


Hello,

There is NO difference what is on the left side . It does not matter 
if expression includes same variable as on right side.
The entire (left-side) expression is FIRST EVALUATED COMPLETELY (all 
bars at once) and AFTER that resulting ARRAY is assigned.


If you read
http://www.amibroker.com/guide/h_understandafl.html

carefully enough you would notice this part:

Processing arrays - why is AFL so fast?

Lets see how the following statement is processed:

MyVariable = ( High + Low )/2;

When AFL is evaluating statement like this ( High + Low )/2 it does 
not need to re-interpret this code for each bar. *Instead it takes 
the High ARRAY and Low ARRAY and adds corresponding array elements in 
single stage. In other words + operator (and other operators too) 
work on arrays at once and it is executed at full compiled-code 
speed, then the resulting array (each element of it) is divided by 2 
also in single stage.*


Let's look into the details - see fig 2.. When AFL engine looks at 
the ( High + Low )/2 it first takes High (1) and Low (2) arrays and 
*produces (in single compiled step) the temporary array (3).* Then it 
creates the final array (4) by dividing each element of temporary 
array by two. This result is assigned to myVariableBar


(see Fig. 2 in the http://www.amibroker.com/guide/h_understandafl.html )

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-04-23 18:57, Keith McCombs wrote:

Mike --
Yes, temporary arrays are discussed on the link you referred to.

However, the link does not explicitly discuss the situation where 
the the same array is on both left and right side of an equation, as 
in Buy = Ref(Buy, -1).  It does implicitly discuss it with the 
AMA(Close, Factor) example, which does not show a temporary holding 
array for the AMA value and evaluates the AMA by moving _forward_ in 
time.  The link also implies that the _reason_ for using a temporary 
array in calculating MyV = (H+L)/2 is speed, without reference to 
any other _reason_.  IMHO, the link falls quite short of explaining 
when and when not a temporary array is used.


I will agree that forward looking can be a dangerous practice.  
However that does not necessarily mean that it is mathematically 
incorrect.  Sword swallowing is also dangerous, unless you are very 
careful, and not prone to hiccups.


I must admit that I was unaware either bounds on BuyPrice, etc., or 
of the function SetOption(PriceBoundChecking, false).  And in 
fact I must now go back over and check much of my old code where I 
have used statements such as SellPrice = somevalue - slippage;.


As always, thank you for your knowledgeable replies.
-- Keith


On 4/23/2010 02:19, Mike wrote:


Keith,

Yes, the construction of temporary arrays is discussed, with 
detailed examples, in the following help page:


http://www.amibroker.com/guide/h_understandafl.html 
http://www.amibroker.com/guide/h_understandafl.html


As for SellPrice = Ref(O, 1); It is not so much a problem of the 
value being out of range. But rather, that you would be forward 
looking (i.e. referring today to tomorrow's open).


The out of range behavior can be disabled via 
SetOption(PriceBoundChecking, false); But, again, it is the 
forward looking that is the bigger problem.


It is true that AFL can, at times, be difficult. It may sound 
trite. But, with power comes complexity. It's a price I've been 
happy to pay.


I find that repetition is the best way to stay fluent in any coding 
language. To that end, I try to constantly challenge my assumptions 
and work on many different problems until it becomes 2nd nature. 
Trying to work out answers to other people's questions

Re: [amibroker] Re: Confusion with an array referencing itself.

2010-04-23 Thread Keith McCombs

TJ --
Excellent!!!  I got it now.
Thank you for your explanation and your patience with me.
-- Keith

On 4/23/2010 14:23, Tomasz Janeczko wrote:


Hello,

One might assume, for speed sake, that no temporary array would be 
created for H/2 or Ref(H, -1).  


No. It does not matter what calculation you do, the evaluation of ANY 
expression involves
allocating memory for the result (i.e. it can be called temporary 
variable although it is only memory not actual variable).

In order to calculate result = H/2 (or any other expression) you need to:
a) allocate memory for the result
b) bar by bar divide H by 2 (or do other calc) and store in memory 
allocated in step a)

c) once result is calculated assign it to the 'result' variable
With regards to step c) one needs to understand that 'assigning' 
variable does not involve any copying.
Instead a *pointer* to already allocated memory (in step a) is used 
and reference count increased.
If variable was pointing to something else before assignment, the 
original pointer reference count is decreased

and if it reaches zero the memory is deallocated.

Again: entire expression is evaluated at once, for all bars, prior to 
assignment.


Best regards,
Tomasz Janeczko
amibroker.com

On 2010-04-23 20:06, Keith McCombs wrote:


TJ --
Thank you for Explicitly saying, There is NO difference what is on 
the left side . It does not matter if expression includes same 
variable as on right side.  The entire (right-side) expression is 
FIRST EVALUATED COMPLETELY (all bars at once) and AFTER that 
resulting ARRAY is assigned.


I have read the link many many times, and in fact have recommended 
that others read it over and over again.  Though it may have not been 
your intention, my reading of it led me to believe that the purpose, 
and therefore the implementation, of a *temporary* array was for 
speed, and speed alone.


If instead of MyV = (H+L)/2, the example had been MyV = H/2 or MyV = 
Ref(H, -1), or MyV = Ref(otherarray, -1), does AB still create a 
temporary array prior to assigning the results to MyV?  One might 
assume, for speed sake, that no temporary array would be created for 
H/2 or Ref(H, -1).  Though it might be necessary for Ref(otherarray, 
-1), depending on otherarray.


Sorry if I sound a bit like my three year old grandson, who keeps 
asking 'why' over and over again.  But that is how some us, 
regardless of age, learn.


Thank you.
-- Keith

On 4/23/2010 13:07, Tomasz Janeczko wrote:


Correction:
entire (left-side) expression
should read
entire (right-side) expression.

On 2010-04-23 19:05, Tomasz Janeczko wrote:


Hello,

There is NO difference what is on the left side . It does not 
matter if expression includes same variable as on right side.
The entire (left-side) expression is FIRST EVALUATED COMPLETELY 
(all bars at once) and AFTER that resulting ARRAY is assigned.


If you read
http://www.amibroker.com/guide/h_understandafl.html

carefully enough you would notice this part:

Processing arrays - why is AFL so fast?

Lets see how the following statement is processed:

MyVariable = ( High + Low )/2;

When AFL is evaluating statement like this ( High + Low )/2 it does 
not need to re-interpret this code for each bar. *Instead it takes 
the High ARRAY and Low ARRAY and adds corresponding array elements 
in single stage. In other words + operator (and other operators 
too) work on arrays at once and it is executed at full 
compiled-code speed, then the resulting array (each element of it) 
is divided by 2 also in single stage.*


Let's look into the details - see fig 2.. When AFL engine looks at 
the ( High + Low )/2 it first takes High (1) and Low (2) arrays and 
*produces (in single compiled step) the temporary array (3).* Then 
it creates the final array (4) by dividing each element of 
temporary array by two. This result is assigned to myVariableBar


(see Fig. 2 in the 
http://www.amibroker.com/guide/h_understandafl.html )


Best regards,
Tomasz Janeczko
amibroker.com

On 2010-04-23 18:57, Keith McCombs wrote:

Mike --
Yes, temporary arrays are discussed on the link you referred to.

However, the link does not explicitly discuss the situation where 
the the same array is on both left and right side of an equation, 
as in Buy = Ref(Buy, -1).  It does implicitly discuss it with the 
AMA(Close, Factor) example, which does not show a temporary 
holding array for the AMA value and evaluates the AMA by moving 
_forward_ in time.  The link also implies that the _reason_ for 
using a temporary array in calculating MyV = (H+L)/2 is speed, 
without reference to any other _reason_.  IMHO, the link falls 
quite short of explaining when and when not a temporary array is used.


I will agree that forward looking can be a dangerous practice.  
However that does not necessarily mean that it is mathematically 
incorrect.  Sword swallowing is also dangerous, unless you are 
very careful, and not prone to hiccups.


I must admit that I was unaware either bounds

Re: [amibroker] Re: AFL Learning Curve

2010-04-23 Thread Keith McCombs

Benjamin --
Previously, you mentioned other programming languages.  IMHO, trying to 
learn from them either before or during your efforts with AB, will just 
add to possible confusion and slow you down.


Just concentrate on AB.  That will work best.
-- Keith

On 4/23/2010 08:12, Benjamin wrote:


Guys,

Thanks so much for the info! Looks like I have some work ahead of me. 
Sorry so late with a reply.


Benjamin

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Paolo pcavat...@... wrote:


 Hi Benjamin,

 AB has a never ending learning curve :-)

 Having said that I agree with Herman that't plenty of support 
materials you can find all over the place...the point is that when you 
are learning you may get confused by all this material. I wuld then 
recommend what TJ always says...look at the user guide as much as you 
can rather than going from one website to another.


 Al the best,

 paolo

 --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, Herman psytek@ wrote:

 
  First: don't be discouraged, after a while the light goes on and it
  becomes second nature to think in terms of arrays. AFL is highly
  efficient and execution speeds will surprise you.
 
  Read the Help on AmiBroker Formula language. That ought to be your
  first step.
 
  Next, be sure to try the Tools - AFL Code Wizard.
 
  Then there are some very good books by Howard B. Bandy, such as:
  http://introductiontoamibroker.com/ 
http://introductiontoamibroker.com/

 
  Next steps would be the AFL Libeary on the AmiBroker site for some
  actual code. See http://www.amibroker.com/ http://www.amibroker.com/
 
  There are many other resources.. the UKB, AmiBroker University, etc.
 
  Google will help you here.
 
  herman
 
   I am a newbie to Amibroker and the AFL language. I am at an
   intermediate level at writing Tradestation EasyLanguage code, but
   AFL coding seems so different from what I am used to. Can anyone
   suggest a recommended path to learning.either written AFL
   sources or learning some other program language first.
 
   Any help would be most appreciated.
 
   Thanks!!!
 
   Benjamin Rogers
 
 
 
 
   
 
    IMPORTANT PLEASE READ 
   This group is for the discussion between users only.
   This is *NOT* technical support channel.
 
   TO GET TECHNICAL SUPPORT send an e-mail directly to
   SUPPORT {at} amibroker.com
 
   TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
   http://www.amibroker.com/feedback/ 
http://www.amibroker.com/feedback/

   (submissions sent via other channels won't be considered)
 
   For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
   http://www.amibroker.com/devlog/ http://www.amibroker.com/devlog/
 
   Yahoo! Groups Links
 





Re: [amibroker] Amibroker VSA

2010-04-22 Thread Keith McCombs
So, Dick, wouldn't have been real easy to have just gone ahead and 
supplied a link to the group?

http://finance.groups.yahoo.com/group/amibrokervsa/

Notice, there is no space between amibroker and vsa!
-- Keith

On 4/22/2010 10:34, Richard wrote:


I was pleasantly surprised at the strong response to the new Yahoo 
Group AmiBroker VSA. This was done late yesterday and early this 
morning I learned the 52 of you have joined. Thanks for your interest.
I have downloaded another file in the files section (VSA) of Amibroker 
VSA. It is a PDF of the book Mastering the Markets by Tom williams. It 
will give you additional information about VSA.


Dick Hoierman




Re: [amibroker] Re: Confusion with an array referencing itself.

2010-04-22 Thread Keith McCombs

Mike --
I didn't know that,
Buy = Ref( Buy, -1 ) is not ambiguous.
It will behave exactly has you have proposed in your workaround (i.e. 
will internally create a temporary array holding Ref(Buy, -1) which will 
then be assigned to Buy).


Is that explained somewhere in the User's guide or Help?

BTW, I didn't really know SellPrice = Ref(O, 1); was wrong until I 
found out why in the User's Manual, page 141 (after about an hour of 
looking):
During back-testing AmiBroker will check if the values you assigned to 
buyprice, sellprice, shortprice, coverprice fit into high-low range of 
given bar. If not, AmiBroker will adjust it to high price (if price 
array value is higher than high) or to the low price (if price array 
value is lower than low)


It's these kind of things that make AB harder than it should be.
-- Keith

On 4/22/2010 22:13, Mike wrote:


Keith,

Buy = Ref( Buy, -1 ) is not ambiguous.

It will behave exactly has you have proposed in your workaround (i.e. 
will internally create a temporary array holding Ref(Buy, -1) which 
will then be assigned to Buy).


It does, however, require that Buy has already been initialized before 
this statement.


Mike

--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
Keith McCombs kmcco...@... wrote:


 I gave this thread a new name because TJ's response brought up a much
 more general concern, for me, than the original title expressed.

 I thought that statements such as Buy = ref( Buy, -1 ); were 
ambiguous

 and therefore should not be used. The reason being that if the array
 valuation moves forward in time (Buy[n] evaluated before Buy[n+1]) then
 all Buys will be equal to Buy[0]. However if valuation moves backward
 (Buy[n+1] before Buy[n]) then a much different result is produced.

 Therefore, one should instead use something like this:
 temp = ref(Buy, -1);
 Buy = temp;

 Hopefully someone will clear up my confusion.
 Thank you.
 -- Keith

 On 4/20/2010 19:10, Tomasz Janeczko wrote:
 
  Hello,
 
  SellPrice = Ref(O, 1);
 
  Wrong advice.
  Once again: NEVER move trading prices using ref().
 
  Instead delays SIGNALS
  Buy = ref( Buy, -1 );
  Sell = ref( Sell, -1 );
 
  Best regards,
  Tomasz Janeczko
  amibroker.com
 
  On 2010-04-21 00:54, hiscores wrote:
   There are numerous ways to do this, but here is a simple one
  
   Buy = C MA(C, 20);
   BuyPrice = C;
  
   StopLoss = C MA(C, 50);
   ProfitTarget = C MA(C, 10);
  
   Sell = StopLoss OR ProfitTarget;
   // If we exit due to stop loss take the 50 MA otherwise
   // by process of elimination we exit at target 10 MA
   SellPrice = iif(StopLoss, MA(C, 50), MA(C, 10));
  
   This is here so you can learn how to code such rules, but I should
  point out that your strategy is unrealistic! You are making a rule
  where if at the END of a bar we are below an MA we should sell at a
  price ABOVE the close (ie the MA price that price action is now
  below). Furthermore the MA will not settle to its final value until
  the bar is finished (since the MA is calculated on closing prices).
  You should probably set your sell prices to the open of the next bar
  
   SellPrice = Ref(O, 1);
  
   -hi
  
   --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com

  mailto:amibroker%40yahoogroups.com,
  dralexchambersdralexchambers@ wrote:
  
   Hi,
  
   How would I put together a backtest for the following. My Buy
  signal is:
  
   Buy = CMA(C,20);
  
   How do I do a multiple sell signal for the following:
  
   StopLoss is hit is when C MA(C,50) Stoploss price is MA50.
  TakeProfit is when C MA(C,10), and TP price is MA10.
  
   I can only see one Sell Sellprice variable. How do I put both of
  these conditions into Sell Sellprice?
  
   Thanks,
   Alex
  
  
  
  
  
   
  
    IMPORTANT PLEASE READ 
   This group is for the discussion between users only.
   This is *NOT* technical support channel.
  
   TO GET TECHNICAL SUPPORT send an e-mail directly to
   SUPPORT {at} amibroker.com
  
   TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
   http://www.amibroker.com/feedback/ 
http://www.amibroker.com/feedback/ 
http://www.amibroker.com/feedback/ http://www.amibroker.com/feedback/

   (submissions sent via other channels won't be considered)
  
   For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
   http://www.amibroker.com/devlog/ 
http://www.amibroker.com/devlog/ http://www.amibroker.com/devlog/ 
http://www.amibroker.com/devlog/

  
   Yahoo! Groups Links
  
  
  
  
  
 
 





[amibroker] Confusion with an array referencing itself.

2010-04-21 Thread Keith McCombs
I gave this thread a new name because TJ's response brought up a much 
more general concern, for me, than the original title expressed.


I thought that statements such as Buy = ref( Buy, -1 ); were ambiguous 
and therefore should not be used.  The reason being that if the array 
valuation moves forward in time (Buy[n] evaluated before Buy[n+1]) then 
all Buys will be equal to Buy[0].  However if valuation moves backward 
(Buy[n+1] before Buy[n]) then a much different result is produced.


Therefore, one should instead use something like this:
temp = ref(Buy, -1);
Buy = temp;

Hopefully someone will clear up my confusion.
Thank you.
-- Keith

On 4/20/2010 19:10, Tomasz Janeczko wrote:


Hello,

SellPrice = Ref(O, 1);

Wrong advice.
Once again: NEVER move trading prices using ref().

Instead delays SIGNALS
Buy = ref( Buy, -1 );
Sell = ref( Sell, -1 );

Best regards,
Tomasz Janeczko
amibroker.com

On 2010-04-21 00:54, hiscores wrote:
 There are numerous ways to do this, but here is a simple one

 Buy = C MA(C, 20);
 BuyPrice = C;

 StopLoss = C MA(C, 50);
 ProfitTarget = C MA(C, 10);

 Sell = StopLoss OR ProfitTarget;
 // If we exit due to stop loss take the 50 MA otherwise
 // by process of elimination we exit at target 10 MA
 SellPrice = iif(StopLoss, MA(C, 50), MA(C, 10));

 This is here so you can learn how to code such rules, but I should 
point out that your strategy is unrealistic! You are making a rule 
where if at the END of a bar we are below an MA we should sell at a 
price ABOVE the close (ie the MA price that price action is now 
below). Furthermore the MA will not settle to its final value until 
the bar is finished (since the MA is calculated on closing prices). 
You should probably set your sell prices to the open of the next bar


 SellPrice = Ref(O, 1);

 -hi

 --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, 
dralexchambersdralexchamb...@... wrote:


 Hi,

 How would I put together a backtest for the following. My Buy 
signal is:


 Buy = CMA(C,20);

 How do I do a multiple sell signal for the following:

 StopLoss is hit is when C MA(C,50) Stoploss price is MA50. 
TakeProfit is when C MA(C,10), and TP price is MA10.


 I can only see one Sell Sellprice variable. How do I put both of 
these conditions into Sell Sellprice?


 Thanks,
 Alex





 

  IMPORTANT PLEASE READ 
 This group is for the discussion between users only.
 This is *NOT* technical support channel.

 TO GET TECHNICAL SUPPORT send an e-mail directly to
 SUPPORT {at} amibroker.com

 TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
 http://www.amibroker.com/feedback/ http://www.amibroker.com/feedback/
 (submissions sent via other channels won't be considered)

 For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
 http://www.amibroker.com/devlog/ http://www.amibroker.com/devlog/

 Yahoo! Groups Links









[amibroker] Why DebugView?

2010-04-21 Thread Keith McCombs
Are there any advantages to using DebugView over viewing _Trace() output 
in the Log window?
If so, what?

Thanks.
-- Keith



Re: [amibroker] Programmatically export AAExplore results to file?

2010-04-18 Thread Keith McCombs

Herman --
Thank you for the suggestion.  I especially like how you determine that 
you're on the last stock in a list.  I've been wondering about that for 
a while, thinking ahead for my next project.  I was thinking I might 
have to use CBT, but really don't need it for backtesting.


However, for right now, I will try Vlad's use of OLE function Export.  
It may better suit my present situation.


Thanks again.
-- Keith


On 4/18/2010 04:50, Herman wrote:


Hello Keith,

The problem is that Amibroker does not have a Status(ActionComplete) 
function that tells you that AA operations are finished so I check the 
number of tickers in the watchlist. The code below are pasted together 
snips from larger code, not tested. Hope this gets you started.


Herman

*function* GetWatchlistCount( WLName )
{
WLNum = CategoryFind( WLName, *categoryWatchlist* );
WLList= CategoryGetSymbols( *categoryWatchlist*, 
WLNum );

*if* ( WLList ==  ) WLCount = 0;
*else* WLCount = StrCount( WLList, , ) + 1;
*return* WLCount;
}

*if* ( InExplore )
{
StockNum = Status( stocknum );
*if* ( StockNum == 0 )
{
ToScanCount  = getWatchlistCount( TickersToScan );
StaticVarSet( ToScanCount, ToScanCount );
}

*/// other exploration stuff ...///

*ToScanCount = Nz( StaticVarGet( ToScanCount ) );
SN = ( StockNum + 1 );
*if* ( SN == ToScanCount ) *// End exploration
*{
_TRACE( Export AA Report:  + LastReportPath );
AB = CreateObject( Broker.Application );
AA = AB.Analysis;
AA.Export( LastReportPath );
}
}






Hello Keith.
You can use following OLE method of Analysis object (See AmiBroker's 
OLE Automation Object Model in AmiBroker help):


Function *Export*(ByVal *pszFileName* As String) As Boolean

It will create html-file with results of exploration.

/BR,
Vlad

/
**  
Does anyone know if there is a way to programmatically export AAExplore
results to file?

Thanks for any help on this.
-- Keith

,_._,___







Re: [amibroker] Programmatically export AAExplore results to file?

2010-04-18 Thread Keith McCombs

Vlad --
Looks good.  I'll give it a try.

BTW, what does the psz in pszFileName mean?  And how is pszFileName 
different from FileName?


Thanks again for your help on this.
-- Keith

On 4/18/2010 02:11, Vladislav Titov wrote:


Hello Keith.

You can use following OLE method of Analysis object (See AmiBroker's 
OLE Automation Object Model in AmiBroker help):



Function Export(ByVal pszFileName As String) As Boolean


It will create html-file with results of exploration.


BR,

Vlad






Does anyone know if there is a way to programmatically export AAExplore

results to file?


Thanks for any help on this.

-- Keith


,_._,___



Re: [amibroker] Real time trading - questions on practicality

2010-04-17 Thread Keith McCombs

B S --
I understand your desire to automate multiple intraday strategies.  So, 
regarding your four questions.


1.  I wouldn't reject the idea of combining strategies into one afl.  
Because:
1.1  It is easy to do.  Just put each of your systems in a separate .afl 
file, and have one master control .afl to call the separate files using 
#include.


1.2  I don't know how you want to handle available buying power.  Do 
you want your multiple strategies to share money, or keep it separate?  
But what ever way you decide can be handled best by the master control .afl.


1.3  What if more than one strategy wants to buy the same stock, or 
maybe even one wants to buy while another wants to sell the same stock?  
I don't know what you want to do in these cases, but once you decide, 
put it in master control.


2.0  Personally, would use explore or scan.  I don't know what would be 
the advantage of backtest over either of these two.


3.0
3.1  ~2000 tickers:  Not in real time, but maybe 1800 for $$$.  However, 
can you use EOD to reduce down to say ~100?  IB can handle 100 tickers 
max in real time.  See:

http://www.amibroker.com/guide/h_quotes.html
to find out what some of your choices are.

3.2  What do you call a bad tick?  Is it typo, or a single transaction 
at market near lunch time when volume was low.  Can you tell the 
difference?  Does it matter?  To me a bad tick is one I can't use in my 
strategy.  So, my strategy has to deal with what I call 'bad' ticks.


4.0  I don't know.  But my guess is that the answer is pretty complex 
and is a function of your computer speed, what other software you have 
running, your internet connection, and your data supplier, to mention a 
few.  Just for laughs, on your computer, open Date and Time 
PropertiesDate and Time.  Try to say 'tick' in sync with the second 
hand or the seconds display.


-- Keith

On 4/11/2010 15:24, B S wrote:
I'm currently exploring the best way of automating multiple intraday 
strategies and was hoping some on the board could give their opinion 
on whats practical / possible when using AB and IBcontroller to send 
orders to IB:
1. If I don't want to combine the strategies into one AFL - whats the 
best way to simultaneously run multiple strategies in real time?  Is 
it multiple instances of AB?  If yes, will static variables set in one 
instance be available to other instances?
2. I've read Tomasz recommend that real-time trading should be done 
through AA - do most use scan, exploration, or backtest?  Are there 
advantages/disadvantages that one should be aware of?
3. Is it practical to run these strategies against portfolios of ~2000 
tickers?  Any recommended data providers that do a good job of 
filtering bad ticks?
4. I understand that AB runs on set intervals rather than being event 
driven in real-time mode.  I'm assuming this means that each time the 
AFL runs, it checks every symbol for signals instead of only those 
with new data.  What is the limiting factor then for how often each 
symbol is checked for signals?  Is it simply the time that it takes 
for the scan/exploration/backtest to complete?  So if i set Run 
Every to 1sec, will it automatically restart as soon as it finished 
running?  Or is there more to it?
Would greatly appreciate hearing any suggestions/opinions on the above 
points.  Thanks.





[amibroker] Programmatically export AAExplore results to file?

2010-04-17 Thread Keith McCombs
Does anyone know if there is a way to programmatically export AAExplore 
results to file?

Thanks for any help on this.
-- Keith



Re: [amibroker] Re: Change last value of array

2010-04-15 Thread Keith McCombs

mbausys knows what he wants, and so does Dimitris Tsokakis.  See:
http://f1.grp.yahoofs.com/v1/EEbHS9GZNYAUkPB7D11Tx7riiyQ8BgojHngS1SGZB9mY-3RWaSdl4OerNjyAd-8A22BfW6m3WOcrJ_EjcNkIi03CsERWsTfWrqQ/Cross%20Predictions.txt
and
http://www.amibroker.com/members/library/detail.php?id=286

They aren't the solution for BB.  But they show the way.
-- Keith

On 4/15/2010 12:32, mbausys wrote:


To make it clearer, I'll give another example:

I make intraday trades and want to backtest a strategy that enters a 
trade if price falls below lower Bollinger band intraday. I have a 
price history of a random stock and see that 10 days ago its

C = 100
L = 94
BBandBot( C, 20, 2 ) = 95

Would I have entered the trade on that day? L  BBandBot, but it is 
not clear if the band hadn't shifted below 94 when the price was at 
94. In order to answer the question, I need to find out at what level 
price would've been equal to BBandBot and if L was below that 
determined level, the trade would've happened. I hope this example 
makes the matter clearer.


--- In amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com, 
mbausys mbau...@... wrote:


 Guys, I want to backtest this system rather than have a value for 
today. And I'm absolutely sure that the concept  logic are right.



 --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, Rob sidhartha70@ wrote:

 
  I think Ara's right... I think your concept  logic are 
fundamentally flawed. Which is why it won't work.

 
  --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, Ara Kaloustian ara1@ wrote:

  
   When you get the value of BBand, it is a dynamic value ...
  
   so in your example of C = 100 and BBand = 95,
   the buy order would of course be somewhere below 95. The point 
would be

   determined correctly by either:
  
   L  BBand or Cross(BBand,L);
  
   If you are cornerned about the buy price being far below 95 (in the
   example), then perhaps you should use a different strategy, as 
BBands will

   shift with price moves
  
  
   - Original Message -
   From: mbausys mbausys@
   To: amibroker@yahoogroups.com mailto:amibroker%40yahoogroups.com
   Sent: Thursday, April 15, 2010 8:49 AM
   Subject: [amibroker] Re: Change last value of array
  
  
I'll give you a brief example:
   
We are in the middle of trading session;
Current C = 100
Current BBandBot( C, 20, 2 ) = 95
I want to set a limit order that buys if price falls bellow lower
Bollinger band. However, a limit order at 94.99 would be 
incorrect way of
doing that because when the price reaches 94, the actual lower 
Bollinger
band would have shifted far below 94.99. Thus, I need to a 
dynamic
calculation of lower Bollinger band that determines the true 
level.

   
--- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, Ara Kaloustian ara1@ wrote:

   
Dont really understand your comments ... as Low and Close 
frequently are

below lower BB...
   
Try using L = BBandBot(...)
   
   
- Original Message -
From: mbausys mbausys@
To: amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com

Sent: Thursday, April 15, 2010 8:16 AM
Subject: [amibroker] Re: Change last value of array
   
   
 In essence, I want to backtest a trading system that uses 
lower

 Bollinger
 Band as an entry point and would enter trades intraday when 
price

 touches
 the lower band. However, I can't use L  BBandBot( C, 20, 2 
) as at the
 point when price is at its L, BBand would be lower than 
BBandBot( C,

 20,
 2 ) and the trade might be not triggered in reality. 
Therefore, I want

 to
 find price levels at which P would be equal or just fall 
below lower

 BBand. That level would be my BuyPrice as well.

 Thanks,

 Marius


 --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, Rob sidhartha70@ wrote:


 You said you only wanted to do it for the last day (or 
last value in

 the
 array)...?

 LastValue() will only access the last value in the array 
hence will

 only
 work for the last day...

 What exactly are you trying to do...? explain in detail 
and we might

 be
 able to help...

 --- In amibroker@yahoogroups.com 
mailto:amibroker%40yahoogroups.com, mbausys mbausys@ wrote:

 
  I have this very short code, which is supposed to 
determine at what
  price level every day the price would have been equal to 
lower
  Bollinger Band. However, the code seems to do the trick 
only for the

  last day. Any hints where I may be wrong?
 
  P = C; // P is a target price level
  diff = P / 2;
 
  for( i = 0; i  100; i++ )
  {
  P = IIf( P  BBandBot( C, 20, 2 ), C + diff, C - diff );
  C[ LastValue( BarIndex() ) ] = P[ LastValue( BarIndex() ) ];
  diff = diff / 2;
  }
 
  --- In 

  1   2   3   4   5   6   >