Australian (ASX) Stock Market Forum

Amibroker FAQ

lesm said:

Thanks for the link. I'm following it step by step but have become stuck at the java script section. I've set up the files as instructed but when I click on the links under the tool menu nothing happens.

I did notice that when I went to set the scripts up it was looking for .exe files but the screenshot shows .js files?

I set up the .js files as per the screenshot.

Can anyone offer any suggestions?

My learning has been delayed due to my Bodhi cd arriving broken. :(

Thanks in advance for all of your assistance :)
 
Hey Lesm,

You've been fantastic in helping me out and I really appreciate it. Can I just ask you for one more piece of advice? When working thought the instructions you highlighted I have come to the section to run

ASX-CGIS-Get

It says that this market data contains Stock Price, DebtEquity, EPS, NTA and Market Cap. To be imported with the MtkData import format.

Now I assume that I skip this step as I have my paid for "clean" data. (although I think it only has price data, none of the others mentioned)

Would this be a correct assumption? Or does it not overwrite my exiting data just fills in the gaps?

Thanks again
 
Dan_ said:
Hey Lesm,

When working thought the instructions you highlighted I have come to the section to run

ASX-CGIS-Get

It says that this market data contains Stock Price, DebtEquity, EPS, NTA and Market Cap. To be imported with the MtkData import format.

Now I assume that I skip this step as I have my paid for "clean" data. (although I think it only has price data, none of the others mentioned)

Would this be a correct assumption? Or does it not overwrite my exiting data just fills in the gaps?

Thanks again

Dan,

ASX-GICS-Get, simply obtains the updated industry/sector information from the ASX, which you would have already run from the previous section of the document.

Therefore, you do not need to run it again.

I think you are referring to the section related to Historic Market Data under the sub-heading:

[1] ASCII-MktData-Get

If that is the case you can safely skip this section.

You already have your data from JustData via Bodhi.

The market data it is referring to is related to the ASX stock data in the AmiBroker database. You woul duse this if you are going to do an update/import of the latest data either directly into AmiBroker from a download site or if it has been previously downloaded and you need to convert tot he AmiBroker format prior to the update/import operation.

It is preparatory step to doing an update on the data.

The ASX-GICS-Get within this section, is simply obtaining the latest update of the GICS sector related information prior to performing the subsequent update.

Cheers.
 
Premium Data are beta testing an AB setup in their ASX data subscription which mirrors their custom folders i.e. groups, sectors etc, which is great as you just click the update button once for EOD or intraday updates and as it use's the metastock data plugin, just click retrieve symbols once a week to update AB for any adjustments etc.

No more mucking around with manual importing or complicated 3rd party stuff.

Richard from Premium Data was offering free data to anyone wanting to help him beta test.
 
lesm,

Thanks again for all of your assistance. a big thanks :bier:


One more general question for all you Ami-experts out there. For the whole instillation of this program I have stored everything (including my data on a portable USB drive, hence I can take the program with me anywhere.

However when I switch from my home pc to my *cough* work pc *cough* a lot of the preferences are lost.

IE I ser up some custom scripts which are listed on the tools menu, yet at work they don't appear and I guess I have to re-install them.

Is the preferences saved somewhere in windows so I can just copy that file instead? :pc:

Thanks again
 
As with all windows based software it has to be properly installed onto the computer so that the registry is modified to include AB.
Once installed you can then copy the files across.
 
No probs ..Dan

Happy to help out.

There are a number of people around who can assist, as required.

Cheers,
Les.
 
Gentlemen,

Any of you Just data experts like to offer me some advice here? I have spoken to Just Data and have to call someone back tomorrow with the issue, however as I'll be at work during the day and my Bodhi Gold software is only on the home computer hopefully someone here can offer some advice.

I have installed my historical Data into the following directory

I:\Amibroker\AmiBroker\ASX Database

In this folder are all the various folders for the data (0-9 and A-Z)

I've set up Freeway to update into this folder as well, however when i run the update it makes new folders for everything (which are basically the same but with a 0 on the end of each one)

Is there a way I can make it download into the existing folders? I tried renaming the existing folders with a 0 to match the data download, but for some reason the folders disappear out of the directory (why i have no idea) after running the download.

Any assistance is appreciated.
 
Just data does that and cannot change it. it comes form when a directory could reach the limit for metstock and a new directory is needed for that alpha letter, so it would have 0A,1A,2A etc.

This will not affect you as you just have to point to that ms directory structure for AB.

You could just rename the directories you created placing a 0 in front of each folder name, than JD will update this.
 
Thanks for the helpful suggestion Kaveman,

With a little fiddling I've finally got it all up and running on my external drive.

Thanks again to everyone for their assistance :alcohol:

Now I've got no excuse to learn and get my system developed
 
Morning Amibroker users :)

Just playing around with some intraday testing, and was wondering how do I code in an exit on the close, so the system can go flat at the end of the day?

Any help would be most appreciated :)
 
you can try this if you positively get a bar at/after close (eg for backtesting)
Sell = cross( timenum(),155959);
or if live
Sell = cross( now(4),155959);

of course there are other ways, these are just the simplest
 
Morning again amibroker folk:)

I've been trying to figure out how to use sigscaleout and am finding it rather confusing.

Basically it's for an intraday futures system I'm playing around with, it trades 2
contracts, and I want to sell 1 when I'm up 10 points, and let the other 1 run
until I get a sell signal.

Anyone know how I would go about doing this?
 
This example straight from the help files is basically what you are wanting
I have just changed the positionszie to match 2 contracts

Example 4: partial exit (scaling out) on profit target stops

Example of code that exits 50% on first profit target, 50% on next profit target and everything at trailing stop:

Buy = Cross( MA( C, 10 ), MA( C, 50 ) );
Sell = 0;

// the system will exit
// 50% of position if FIRST PROFIT TARGET stop is hit
// 50% of position is SECOND PROFIT TARGET stop is hit
// 100% of position if TRAILING STOP is hit

FirstProfitTarget = 10; // profit
SecondProfitTarget = 20; // in percent
TrailingStop = 10; // also in percent

priceatbuy=0;
highsincebuy = 0;

exit = 0;

for( i = 0; i < BarCount; i++ )
{
if( priceatbuy == 0 AND Buy[ i ] )
{
priceatbuy = BuyPrice[ i ];
}

if( priceatbuy > 0 )
{
highsincebuy = Max( High[ i ], highsincebuy );

if( exit == 0 AND
High[ i ] >= ( 1 + FirstProfitTarget * 0.01 ) * priceatbuy )
{
// first profit target hit - scale-out
exit = 1;
Buy[ i ] = sigScaleOut;
}

if( exit == 1 AND
High[ i ] >= ( 1 + SecondProfitTarget * 0.01 ) * priceatbuy )
{
// second profit target hit - exit
exit = 2;
SellPrice[ i ] = Max( Open[ i ], ( 1 + SecondProfitTarget * 0.01 ) * priceatbuy );
}

if( Low[ i ] <= ( 1 - TrailingStop * 0.01 ) * highsincebuy )
{
// trailing stop hit - exit
exit = 3;
SellPrice[ i ] = Min( Open[ i ], ( 1 - TrailingStop * 0.01 ) * highsincebuy );
}

if( exit >= 2 )
{
Buy[ i ] = 0;
Sell[ i ] = exit + 1; // mark appropriate exit code
exit = 0;
priceatbuy = 0; // reset price
highsincebuy = 0;
}
}
}

SetPositionSize( 2*MarginDeposit, spsValue );
SetPositionSize( 50, spsPercentOfPosition * ( Buy == sigScaleOut ) ); // scale out 50% of position

You can just remove the parts with SecondProfitTarget
 
kaveman said:
You can just remove the parts with SecondProfitTarget

G'day Kaveman,

you'll have to excuse me for being a moron here, but which parts do I remove?

No matter which parts I pull out, I get the same result, which is no scaling out at all :confused:
 
I did a quick test on GC and got these results. No idea how this will paste but it scaled out on 20 April (Report is "Detailed Log" in analysis settings)

Date Information
29/03/2006
Entry signals(score):GC___CCB=Buy(1),
Exit signals:
Enter Long, GC___CCB, Price: 598.6, Shares: 2, Commission: 33, Rank: 1, Equity 99934, Margin Loan: 0, Fx rate: 1
1 Open Positions: , GC___CCB (+2), Equity: 99754, Cash: 95917
20/04/2006
Entry signals(score):
Exit signals:GC___CCB=Scale-Out,
Scale-Out Long GC___CCB, Price 664.1, Shares 1, Fx Rate 1, Number of shares - Current: 1, Exited: 1, Total Cost: 4050, Avg. Entry Price 598.6, Avg. Exit Price 664.1, Avg Fx. Rate Entry 1, Exit 1, Entry+scaling commission 66
1 Open Positions: , GC___CCB (+1), Equity: 110811, Cash: 104459
 
Could the problem I'm having relate to this line in the code-

if( exit == 1 AND
High[ i ] >= ( 1 + SecondProfitTarget * 0.01 ) * priceatbuy )

It seems like it's trying to scale out when the price rises a certain % above my entry price. Because It's an intraday system and exits on the close, it's never going to get to the profit target during the day.

If I'm right, how would I change it to scale out of the first contract at buy price + 10?
 
It already does scale out at +10% profit

if( exit == 0 AND High[ i ] >= ( 1 + FirstProfitTarget * 0.01 ) * priceatbuy )
{
// first profit target hit - scale-out
exit = 1;
Buy[ i ] = sigScaleOut;
}
 
Top