Australian (ASX) Stock Market Forum

Amibroker FAQ

Unfortunately, most of the wonders from the system pasted above was as a result of one exceptional trade very early in the piece. Excluding this trade, the system still shows some potential and I intend to investigate further. As I'm more confident in the system, I will update to the short term system thread.

If someone can help by providing code that will purchase a second portion of stock after the price has increased by 20% as per my previous post, that would be very helpful.

Also, if anyone can let me know how to do monte carlo testing through amibroker (is it even possible?) - i'd be very greatful.
 
the example 3 from the help screens could help you
see furhter down for modified code

/*
Example 3: increasing position when profit generated by trade without pyramiding becomes greater than 5% AND decreasing position when loss is greater than -5%
*/
// percent equity change threshold when pyramiding is performed
PyramidThreshold = 5;

// regular trading rules (no pyramiding)
Buy = Cross( MACD(), Signal() );
Sell = Cross( Signal(), MACD() );

e = Equity(1); // generate equity without pyramiding effect

PcntProfit = 100 * ( e - ValueWhen( Buy, e ) )/ValueWhen( Buy, e );

InTrade = Flip( Buy, Sell );

// ExRem is used here to ensure that scaling-in/out occurs
// only once since trade entry
DoScaleIn = ExRem( InTrade AND PcntProfit > PyramidThreshold, Sell );
DoScaleOut = ExRem( InTrade AND PcntProfit < -PyramidThreshold, Sell );

// modify rules to handle pyramiding
Buy = Buy + sigScaleIn * DoScaleIn + sigScaleOut * DoScaleOut;

PositionSize = IIf( DoScaleOut, 500, 1000 ); // enter and scale-in size $1000, scale-out size: $500

Now to change this to hopefully suit your reequirements
No guarantees as just typing straight into here



/*
modified

Example 3: increasing position when profit generated by trade without pyramiding
becomes greater than 20%
*/
// percent equity change threshold when pyramiding is performed
PyramidThreshold = 20;

// regular trading rules (no pyramiding)
Buy = Cross( MACD(), Signal() );
Sell = Cross( Signal(), MACD() );

e = Equity(1); // generate equity without pyramiding effect

PcntProfit = 100 * ( e - ValueWhen( Buy, e ) )/ValueWhen( Buy, e );

InTrade = Flip( Buy, Sell );

// ExRem is used here to ensure that scaling-in/out occurs
// only once since trade entry
DoScaleIn = ExRem( InTrade AND PcntProfit > PyramidThreshold, Sell );
// DoScaleOut = ExRem( InTrade AND PcntProfit < -PyramidThreshold, Sell );

// modify rules to handle pyramiding
Buy = Buy + sigScaleIn * DoScaleIn; // + sigScaleOut * DoScaleOut;

PositionSize = $1000 ; //IIf( DoScaleOut, 500, 1000 );
// enter and scale-in size $1000, scale-out size: $500
 
Thanks for your help.

Next question, is there a setting that will cause AB to calculate everything based on weekly data (eg. EMA(C,14) would refer to 14 weeks and SAR(0.2,0.02) uses the weekly data)?
 
doctorj said:
is there a setting that will cause AB to calculate everything based on weekly data
If you're talking about in AFL, take a look at the various TimeFrame functions (eg. TimeFrameSet).

GP
 
If you want everything in weekly, just change the settings in AA settings.
If you mean mix days and weeks then as GP said look at the timeframe functions.
 
I've just stared to set up Amibroker and was wondering where people recommended getting their free EOD from?

I've noticed a few different sources and wonder if anyone has any recommendations?

Thanks in advance :)
 
I use float.com.au

click on the *.txt file (for the day/month/year you want) and save it to your data file/folder.

then use import wizard to download to your amibroker data file.

repeat each day.

If there is a problem with this site, I have resorted to getting it off commsec site (but its not available till after 8.30pm) whereas "float" is available by about 5pm.
 
Thanks to both of your for your assistance

I am downloading 2005 data now :eek:
 
Personally I would not recommend using free data. You would need to check first if it is the final data issued by ASX that includes the corrections for the day.
Then with free data you have to make all amendments for splits, consolidations, symbol changes and stock deletions etc
To me having this automatically done for me is money well worth spending if you want to use any historical data before the today.

Consider the economics of buying from a reputable data provider against the potential trade losses if your system is based on backtesting on incorrect historical data.
 
Kaveman,

Thanks for the wise advice. Currently I'll use free EOD data until i get the "feel" of the software. Then will look at paid clean data. :)

Again thanks to all for this assistance
 
Another question for all you Amibrokers out there,

I'm looking at buying the software but will want it to run on two separate computers (one at work and one at home). Now only 1 version will be operating at any one time (depending where I am) so I think a single license will be fine.

Does anyone else run a setup like this? Or would the best bet be to simply install the software on an external USB drive and take it with me?

Thanks for your thoughts
 
I believe you are allowed to run it on different computers with same licence, provided it is YOU using it.
 
For EOD I use Yahoo through Amiquote, seems dead easy? If I havent updated in a while I'll run the Historical first (takes a few minutes for the 200+ stocks I'm tracking) and then the Current (2 seconds).

Works just fine for me, and its free *yay*.
 
Ladies and Gents,

Having just purchased Amibroker and some clean data can a few of you Ami-experts suggest a good guide for setting the program up?

I've had a go and feel it's not right for various reasons. (Data incorrectly stored under group 255m not sorted into sectors and the such).

Thanks in advance
 
Hi Dan,

Try the link below:

http://www.amibroker.org/3rdparty/ASX_Setup/

the infomration contained in the directories/files below this link will help you set up your ASX database, as it provides a template that you can use.

This will assist you in having your data ordered by sectors, as well as the relevant indexes.

See how you go with it.

It is not clear whether you are using a plugin or intend to load your data directly into AmiBroker.

Cheers.
 
Hey lesm,

Thanks for the link, I'm downloading the stuff now and will try again regards setting it up correctly.

Apologies for not being clearer. I have Amibroker and have purchased Bodhi Gold data (past) and 3 months of live update.

I assume that this is not a direct plugin and I will have to load the data manually.

If anyone has experience in this data provider your assistance/feedback is appreciated.

Thanks again
 
Top