Australian (ASX) Stock Market Forum

Amibroker FAQ

Wayne I used to use the 1m as well and it worked great, only problem is AB can't plot range bars properly without high resolution database...
 
Is it reasonable to assume (should never assume anything) that the difference between the standard and professional version is that the standard is suitable for EOD trading, and professional is for day trading ? I was contemplating which version to get.

Correct me if i am wrong.

Regards
kolonel
 
Finally bought Amibroker, with Premiuim Data feed. Have re-read many articles on the program, and trying to find an easy explanation on how to setup the trades tab in the settings.

Am currently looking at trading EOD data, whilst playing with TechTrader formula to get an understanding of how indicators work. Want to make sure that i have trades setup correct for backtesting the system.

Regards
kolonel
 
I've found it easiest to set BuyPrice, SellPrice and BuyDelay, SellDelay in the formula itself. This overrides any settings in the trade tab in the settings.

Almost all the settings can be coded in the formula itself, saves messing around changing settings each time you test or run a different formula.
 
I am using the parameters in the Amibroker analysis, and want to know how accurate the buy price, exit price etc. are in relation to any profit/loss.

I have been tweaking the amount under the stops tab, but realise when a buy/sell signal is reported, the pricing is based on the current days price. Now trading EOD, you could only buy/sell next day based on the signal during the scan. Is this correct ?

Or, is the signal being generated from the day before signal, and using next day to buy/sell ?

If this sounds vague, let me know :eek:

Regards
kolonel
 
Now trading EOD, you could only buy/sell next day based on the signal during the scan. Is this correct ?

Or, is the signal being generated from the day before signal, and using next day to buy/sell ?

You are correct. And Kolonel is right, you need to have trade delays set for buy and sell (assuming a long only system) for 1 period. Within the backtester you should make sure that you are running in 'daily' mode, then 1 period is a day.

Also, the trade price of the next day can be set to open, close, high, low, average (from memory). Or it can be manually set to something else, perhaps even calculated by some formula to simulate slippage.

Congratulations on getting Amibroker, it's VERY versatile. Can't say enough good things about it.

ASX.G
 
You are correct. And Kolonel is right, you need to have trade delays set for buy and sell (assuming a long only system) for 1 period. Within the backtester you should make sure that you are running in 'daily' mode, then 1 period is a day.

Made a massive difference. Went from a profitable system to loss with that change. Strange how the loss is reporting the same amount as DD. Will investigate. Great program, and can see some countless hours coming up to refine it. Goal is to have a system up and running by end of financial year, and then hit the hard stuff.....real money :eek:

Again, thanks to all for informative and swift responses by members.

Regards
kolonel
 
Goal is to have a system up and running by end of financial year, and then hit the hard stuff.....real money

The walk forward optimisation capabilities of Amibroker released a few weeks ago take system testing to a whole new level.

I can recommend Howard Bandy's book Quantitative Trading Systems as a must read before you get into system development too far, particularly the chapters on objective function and in sample/out of sample testing.
 
Much appreciated Cap, will order it today. Looking at getting stuck into it, and appreciate the advice and feedback from all.

I remember reading through a thread where a few members were developing a system, but it didnt seem to eventuate. This is a great opportunity to break it down, and deconstruct aspects that can be developed further.

Regards
kolonel
 
The walk forward optimisation capabilities of Amibroker released a few weeks ago take system testing to a whole new level.
The walk forward is still in the beta version I believe. I look forward to seeing how it is implemented but I steer clear of beta versions.

I just ordered Howard's book and, based on Howard's contributions to this forum, look forward to reading it.

stevo
 
The walk forward is still in the beta version I believe. I look forward to seeing how it is implemented but I steer clear of beta versions.

Yeah, that's wise. I run AB on more than one PC and only update beta versions on one and run it for a few days before updating all the others. Any problems are usually spotted and reported on the mailing list within hours of being released.

I'm a regular visitor to your blog Stevo, great work. Judging by what I've read on your blog you'll find the new walk forward implementation a great tool. It makes out of sample testing a breeze.

I just ordered Howard's book and, based on Howard's contributions to this forum, look forward to reading it.

I think that, like me, you'll wish it had been available a few years ago. It's almost compulsory reading for anyone thinking of using Amibroker (or any other good software) for system development.
 
What are people's thoughts on http://www.patternexplorer.com/ ? (Not sure if i am allowed to publish www)

Do some of the Amibroker boffins here think it would be helpful to establish an indicator for a system ? Or are they really a marketing tool for what is already built-in to Amibroker already ?

Regards
kolonel
 
The walk forward is still in the beta version I believe. I look forward to seeing how it is implemented but I steer clear of beta versions.

I just ordered Howard's book and, based on Howard's contributions to this forum, look forward to reading it.

stevo

Greetings all --

I have been a beta tester for the walk forward features. Even though they have been released only in beta, you might want to start learning about them. They speed up the validation process by a factor of ten or more. And they force you, as a systems developer, to be rigorous about your choice of objective function before you start optimizing. Both of those are good things.

Tomasz is very careful about releasing bug-free code. On occasion, there will be a problem with a beta release, but it is always corrected in a replacement release within a very short time period. And I have never had a problem with a beta version that caused loss of any of my formulas or corrupted any of my data. In short, AmiBroker beta versions are safe to use. Just to be safe, make a backup of your entire AmiBroker directory before installing the beta.

And thanks for the kind words about my book.

Thanks,
Howard
 
Calling all AB / TradeSim users

Hello All,

I'm currently experiencing some serious problems with regard to exporting trades from AB into TradeSim.

The problem I have is that for some reason not all trades are being exported. I believe this is the case because when I run a simple exploration in AB, I receive many more trade results.

I have mananged to locate 2 versions of the code which is required for exporting the tradefile from AB into a format which can be loaded directly into TradeSim.

One version of the code (which I have been using for many months now) only caters for Long Trades, whilst the other version (which is now available on another forum) caters for both Long / Short trades. However, regardless of which version I use, the number of trade results which are available in TradeSim vary greatly than if I perform a simple exploration in AB. Even the results obtained using the 2 versions of the code also varies!!!!

Consequently, I'm now really stuck and don't know how to proceed as I now longer have any confidence in getting the correct number trades into TradeSim.

As an example, if you perform a simple explorationin AB using the following basic system (with the following parameters), I receive a total of 2335 rows / trades.

If you then export the results of this system using either of the versions of the code mentioned above, the number of trades found in the database drops significantly, which means that any further testing I do in TradeSim is inaccurate.

If anyone can help me out here I would really be grateful, as I no longer know how to proceed. In addition all the development / testing which I have completed to date, now seems a waste of time!!! :-(

Many Thanks in advance,

Confused Chorlton




AB Parameters used:

Exchange: ASX200
Timeframe: Daily
Date Range: 01/01/2005 to 31/12/2007



Simple System

/// ***** PARAMETERS ***** ///

SetTradeDelays(1, 0, 0, 0);


////////// BUY CONDITIONS //////////

Buy = L > Ref(H,-1) AND C>O AND Volume > Ref(Volume,-1) AND C > EMA(C,30);

BuyPrice = Open;


////////// SELL CONDITIONS //////////

Initial = Close - (0.03*Close);

stop[0] = Close[0];
for( i = 1 ; i < BarCount; i++)
{
if( Close > stop[i-1])
{
stop = Max( initial, stop[i-1] );
}
else { stop = initial; }
}

Sell = L <=Ref(stop,-1) OR (DateNum() == 1041231); // close long positions on 31 Dec 2004 if stop not already activated;

SellPrice = Ref(stop,-1);


Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );

Plot( C, " Close Price", colorGrey50, styleBar );
PlotShapes( shapeUpArrow*Buy, colorGreen, 0, L, -12 );
PlotShapes( shapeDownArrow*Sell, colorRed, 0, H, -12 );


//// ********* EXPLORATION ********* ////

Buy = Ref(Buy,-1);
Filter =Buy;

dt = DateTime();
EntryPrice = ValueWhen( Buy, BuyPrice);
AddColumn( EntryPrice, "EntryPrice", 1.3 );
 
Update

Hello All,

I've gone through the list of trades both in the AB exploration and in the trade database in TradeSim and so far i've made the following observation:

At the moment when a buy signal appears, the trade is entered at the next open (trade delay of 1). However, as the stop is being monitored intraday, the trade can be exited on the same bar (ie no trade delay). This is how the system should perform. Therefore, there will be occasions when the entry and exit dates are the same.

When I look through the list of trades in the Exploration results in AB, this is what I see... which is correct.

However, looking at the trades in the TradeSim database, if a trade entered and exited on the same day, then that exit has been ignored and instead been replaced with the next possible Exit.

Therefore, the issue is with the code used to export the tradefile to TradeSim and probably is the reason why there are fewer trades in the database, as the trades are remaining open for longer.

However, i've gone back into the code to try to rectify this such as changing some settings but I can't seem to resolve this, especially given the limitations of my AFL skills.

Consequently, does anyone use a similar entry & exit set-up and if so, could you help me out with the correct code to overcome this problem?

Kind Regards,

Chorlton


Calling all AB / TradeSim users

Hello All,

I'm currently experiencing some serious problems with regard to exporting trades from AB into TradeSim.

The problem I have is that for some reason not all trades are being exported. I believe this is the case because when I run a simple exploration in AB, I receive many more trade results.

I have mananged to locate 2 versions of the code which is required for exporting the tradefile from AB into a format which can be loaded directly into TradeSim.

One version of the code (which I have been using for many months now) only caters for Long Trades, whilst the other version (which is now available on another forum) caters for both Long / Short trades. However, regardless of which version I use, the number of trade results which are available in TradeSim vary greatly than if I perform a simple exploration in AB. Even the results obtained using the 2 versions of the code also varies!!!!

Consequently, I'm now really stuck and don't know how to proceed as I now longer have any confidence in getting the correct number trades into TradeSim.

As an example, if you perform a simple explorationin AB using the following basic system (with the following parameters), I receive a total of 2335 rows / trades.

If you then export the results of this system using either of the versions of the code mentioned above, the number of trades found in the database drops significantly, which means that any further testing I do in TradeSim is inaccurate.

If anyone can help me out here I would really be grateful, as I no longer know how to proceed. In addition all the development / testing which I have completed to date, now seems a waste of time!!! :-(

Many Thanks in advance,

Confused Chorlton




AB Parameters used:

Exchange: ASX200
Timeframe: Daily
Date Range: 01/01/2005 to 31/12/2007



Simple System

/// ***** PARAMETERS ***** ///

SetTradeDelays(1, 0, 0, 0);


////////// BUY CONDITIONS //////////

Buy = L > Ref(H,-1) AND C>O AND Volume > Ref(Volume,-1) AND C > EMA(C,30);

BuyPrice = Open;


////////// SELL CONDITIONS //////////

Initial = Close - (0.03*Close);

stop[0] = Close[0];
for( i = 1 ; i < BarCount; i++)
{
if( Close > stop[i-1])
{
stop = Max( initial, stop[i-1] );
}
else { stop = initial; }
}

Sell = L <=Ref(stop,-1) OR (DateNum() == 1041231); // close long positions on 31 Dec 2004 if stop not already activated;

SellPrice = Ref(stop,-1);


Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );

Plot( C, " Close Price", colorGrey50, styleBar );
PlotShapes( shapeUpArrow*Buy, colorGreen, 0, L, -12 );
PlotShapes( shapeDownArrow*Sell, colorRed, 0, H, -12 );


//// ********* EXPLORATION ********* ////

Buy = Ref(Buy,-1);
Filter =Buy;

dt = DateTime();
EntryPrice = ValueWhen( Buy, BuyPrice);
AddColumn( EntryPrice, "EntryPrice", 1.3 );
 
A very basic question for setting up AB I know but I figure it will save me a few hours messing around. It took me ages to work out that a chart was in fact a window when I wanted to have more charts showing.

Currently have EOD setup in one data base that reads data in MS format using the MS plugin.

Just open an IB account and I am going to setup to receive their data so I can try a few things out testing / simulation and check the SPI, HSI etc.

To do this I understand I need to setup another data base for TWS and make the necessary settings for intra day etc.

Is it the case that every time I wish to look at EOD I have to change data base?

Can I have more than one data base open at the same time?

Is this the best way to set it up or......?

Appreciate any guidance
 
Top