Australian (ASX) Stock Market Forum

AB backtest settings not working any more

Joined
21 May 2008
Posts
664
Reactions
14
Have used the back test and have a dozen different AFl code files I've written but today it's "gone mad" after I wrote a simple one for shorting.

I now put in the equity e.g. 1000 but it will buy up to a million $ worth of units. Same for long or short. Any idea why? Is my AB corrupt? I am thinking a reinstall may fix it.

Code is simple e.g. for long:
Buy = (EMA( Close , 10 ) > EMA( Close , 30 ));
Sell = (EMA( Close, 30) > EMA ( Close, 10 ));


Pic is from the trades $1,000 equity Buy/Sell on open with delay of 1. So you can see I have "bought" 340K of stock with 1K. And there is no margin used.
Any advice would be appreciated.
Tks
 

Attachments

  • EMA equity problem.JPG
    EMA equity problem.JPG
    49.9 KB · Views: 3
Have used the back test and have a dozen different AFl code files I've written but today it's "gone mad" after I wrote a simple one for shorting.
Tks
Does your code have something like "SetOption("InitialEquity", 1000000)". Code will over ride Auto An. settings. Try using the SetOption function in your code.
 
No it doesn't. Thanks - makes sense. But I'm still curious why it "changed".
I opened Amibroker a few weeks ago and all my chart sheets were gone and the Preference Settings had reverted to default settings. I had saved templates and they were blank too. Very strange but only a one off incident in which support replied

"Hello,

If you have a backup copy - then please restore:
- the entire FORMULAS folder
- broker.newcharts file
- layouts (AWL files stored in LAYOUTS subfolder of your database folder). "

I started to backup all my files in Amibroker but the whole process would have taken 20 hours so I aborted that idea and then thought about only backing up formulas but again several hours to do. Considering I make changes often, backing up regularly is not something I want to do. Why so long to back up files I wonder?
 
I started to backup all my files in Amibroker but the whole process would have taken 20 hours so I aborted that idea and then thought about only backing up formulas but again several hours to do. Considering I make changes often, backing up regularly is not something I want to do. Why so long to back up files I wonder?

Hi Wysiwyg, how are you doing your backups? I regularly (daily) backup entire disks (150+Gb) of data using Karen's Replicator as well as weekly disk imaging using CloneZilla and neither take more than an hour or so. Amibroker folder shouldn't take very long at all unless you have a huge number of AA reports. How large is your AB folder?
 
Hi Wysiwyg, how are you doing your backups? I regularly (daily) backup entire disks (150+Gb) of data using Karen's Replicator as well as weekly disk imaging using CloneZilla and neither take more than an hour or so. Amibroker folder shouldn't take very long at all unless you have a huge number of AA reports. How large is your AB folder?

Hi Cap. Oh only 824 megabytes and I tried copying it to CD but the time left kept getting longer and longer and I stopped the process when the estimated time left reached 20 hours. I lessened the MB and reduced the copying to CD to well over an hour (tried tonight). I did not compress the folder. The KarenWare program 'Replicator' will do a faster transfer by the looks so I will give that a go now.
 
Excellent. Replicator copied the whole Amibroker folder in 29 minutes. I will set the scheduler to once per week. I don't backup lots of data so thanks for the good guidance Captain.
 
No probs, it's a great little program :)

In the settings for each "job" is an option to only update changed files, not sure if it's ticked by default but if it isn't then ticking it means the backups are even faster as only file changes are updated.

Disk storage is very cheap nowdays, I think 20 bucks buys about 8Gb storage on a flash drive, much easier and quicker than backing up to a CD. :2twocents
 
Disk storage is very cheap nowdays, I think 20 bucks buys about 8Gb storage on a flash drive, much easier and quicker than backing up to a CD. :2twocents

At work, I use an 8 Gb stick to do EOD backups on emails and current year (file by years) at work. End of year goes on DVD. But USB sticks are more prone to failure so I installed a second HD (3x the size of the C drive) and backup to that one. I set it to run then go off and have a cuppa.

And HDs are so cheap now.

Tks for tip on replicator - will look at that.
 
At work, I use an 8 Gb stick to do EOD backups on emails and current year (file by years) at work. End of year goes on DVD. But USB sticks are more prone to failure so I installed a second HD (3x the size of the C drive) and backup to that one. I set it to run then go off and have a cuppa.

And HDs are so cheap now.

Yeh, 2nd HDD's on desktop PC's are a must. Portable USB hard drives are also a must for backing up lappys and storing disk images. Flash drives are great for storing smaller amounts of data such as an Amibroker folder :)

Another vital element of any backup plan is off-site backups. No good having all your backups in your office if it is robbed or burns down!

Most have heard of the Zen of Trading. Well here's the Tao of Backup. (use the yin-yang symbols to go back/forward and ignore the links to the IT company on the epilogue page)

http://www.taobackup.com/index.html


Tks for tip on replicator - will look at that.

No probs, I've been using it for data backups for years without any problems. Here's the link to download it:

http://www.karenware.com/powertools/ptreplicator.asp

I use CloneZilla for disk imaging but I'm used to using Linux based software, for people more used to a Windows type GUI then there are probably better options.
 
Top