This thread is for fellow Amibroker users to help each other out. If there is a very specific project you are carrying out which is likely to deviate from a general faq type thread then you are welcome to start a new thread.
There was some discussion of how to use Amibroker in one of the system testing threads, hence the reason for this thread.
If there is sufficient interest we may start a Metastock thread too but always be aware of the forums/websites dedicated to particular software, that should always be the first stop (apart from the vendor site itself) imo. But otherwise the folk who frequent ASF should be happy to help you out!
Over to you Amibroker fans!!
kaveman
15th-July-2005, 03:28 PM
I am always happy to help anyone with writing AFL for AB. I am a regular in the AB yahoo group, AB website forum, RC and other places.
Artamon
15th-July-2005, 07:53 PM
G'day all,
I am always happy to help anyone with writing AFL for AB. I am a regular in the AB yahoo group, AB website forum, RC and other places.
Not that my endorsement will carry much weight :D but kaveman is very helpful and active when it comes to AB and he knows his stuff. Certainly an asset to be used for us AB'ers ;)
Andrew.
RichKid
15th-July-2005, 08:49 PM
I am always happy to help anyone with writing AFL for AB. I am a regular in the AB yahoo group, AB website forum, RC and other places.
Thanks very much Kaveman, glad to have an expert around!
GreatPig
15th-July-2005, 10:19 PM
Kaveman,
A couple of questions about something I'm finding a little confusing.
Firstly, the ValueWhen and LastValue functions, specifically when used together - ie. LastValue(ValueWhen(...)). The help says that ValueWhen returns an array value, yet also says the return value is an array. From examples it seems that ValueWhen is really to find one particular number, and the above construct implies that that desired value is the last one in the returned array. So what's in the rest of the returned array? It seems like a convoluted way of just returning a number from an array. I normally just access the last element of an array using subscript notation, eg. Close[BarCount-1].
Secondly, something that's not explained at all in the help. With the Peak and Trough functions, the second parameter is called "Change". In a sample trendline example, the change parameter is calculated using a rate-of-change formula. What exactly is this change parameter, and what does it do?
Thanks.
GP
wayneL
16th-July-2005, 12:18 AM
I've caused myself an anurism trying to program a chandelier exit that duplicates the one done in metastock using the prev function.
I've been working on a "bang for buck" indicator; this is the jist of it:
-Care of one of Tech/a's posts (he's already got the Metastock formula there)
"Divide a $10,000 account by the closing price on any given day. This number is then multiplied by the average range of the stock for the last 200 days. Dividing this number by 100 converts the result to dollars and cents which inturn indicates the possible dollar return on any given day."
I've converted this to:
(10000/C)* (ATR(200)/100)
Is this right?
I'm thinking of plotting it as a histogram but i'll cross that bridge when I come to it.
Also see the systems development thread for another interesting application.
(well I think it is anyway :) )
DTM
16th-July-2005, 08:53 AM
I've caused myself an anurism trying to program a chandelier exit that duplicates the one done in metastock using the prev function.
Pardon my ignorance but what is Amibroker? Is it like E-signal and Metastock. Do you get a live feed from Amibroker?
Thanks in advance.
Daniel
GreatPig
16th-July-2005, 11:27 AM
Daniel,
Take a look here (http://www.amibroker.com).
It's a charting program but I believe you can get live feeds for it, although not from AmiBroker themselves. I only use EOD data myself.
GP
kaveman
16th-July-2005, 11:46 AM
I will try to answer queries, just remember that except for TJ, the AB developer/owner .. yes only one person not large copmpany, nobody knows it all. The amibroker yahoo groups are the best resource as yu get the developer plus users from all over the world helping each other. There is also a compilation of the emails available on the AB website that works like a help search database.
But I can answer most straightforward questions.
1. Daniel, Amibroker is a charting package that MS would love to be when it grows up. AB can use live intraday data feed from various sources to plot the intraday data, explore, scan etc. I do this using quotetracker as the data feed, which in turn takes the data suipply from my online broker, although there are many sources of data for QT. AB can aslo take direct fromm other sources as well, check the website for AB (www.amibroker.com) download the trial version and see for yourself what it does.
2. Greatpig
VALUEWHEN & LASTVALUE
Valuewhen provides values of an array when the prescribed condition/s are true eg FridayHigh = Valuewhen( dayofweek()==5, H, 1 ) will give the value of high for the previous Friday. This value of FridayHigh will hold true until the next friday occurs try this plot
Lastvalue just gives the absolute last value of an array for that symbol, eg try the above in AA exploration over the last 10 bars for a stock
PEAK & TROUGH
Peak and trough are just the turning points as seen ina zig plot
To explain the change for just peak, the help screen gives this
Peak( ARRAY, change, 1 )
Peak( Close, 5, 1 )
so what peak does is finds higher close value and holds until either a new higher close OR until the value of close drops by 5% from the last high close
eg close values
90,89,95,94,97,100,98,97,95
p, -, p, -, p, P, -, -, **
the lower case p's are the new higher values. The ** means 5% lower value than the last peak, ie 100 *95% = 95. So the 100 point will become the Peak point and be embedded in stone on the chart. Once the peak is found in zig the next trough search begins like the peak but in reverse.
This is why they say zig looks into the future, it means that later values are required to find the actual value in the past. it has to go into the future to determine where/what that point is. In my example it went 3 bars after the peak could be designated.
If you had said the change wqas 20, the fro a value of 100 it would have to reach 80, ie 20% of the value before the peqak would have been set. In that time if another vaslue higher than 100 occured before th 80 then it resets to a new 20% of that higher value.
Hope this helps.
wayneL,
you could try the 3rd party plug in
http://www.amibroker.org/3rdparty/
and this example on how to use
http://www.amibroker.com/library/formula.php?id=395
you could also use the applystop from the help screens, but that won't help you plot it
However that does not quite answer your query. PREV is probably the most frequently asked question from past MS users. AB does looping which does this job better and faster. Afraid I am not fully conversant with MS mumbo jumbo, although some can be obvious
from what I can discover the chandelier exit is just the ATR * constant
for more details on PREV look up the yahoo group database
basically I think it just looks up the previous bars value
I will sue the same as above as example of looping it
Buy = Cross(C,EMA(C,10)); //example only to get code working
One thing to note, if you use Applystop it works on the low crossing the nominated stop value (in my experience of trying it). If you want to use something else, then need to loop it as above
Hope this helps a bit
3. loakglen
sorry am not familiar with bang for buck, so can only guess at the original
if you have data in cents then use the /100, else remove the /100
this is correct. Try this as both the price and ATr will be in cents
( 10000 / (C / 100) )* ATR(200)/100
simpler
1000000/C*ATR(200)
if your data is in dollars
10000/C*ATR(200)
hope I have been of help here
GreatPig
16th-July-2005, 12:24 PM
"Divide a $10,000 account by the closing price on any given day. This number is then multiplied by the average range of the stock for the last 200 days. Dividing this number by 100 converts the result to dollars and cents which inturn indicates the possible dollar return on any given day."
I've converted this to:
(10000/C)* (ATR(200)/100)
That formula can be simplified and made a little clearer. You'll notice it multiplies by 10,000 but then divides by 100, which is the same as just multiplying by 100.
If you consider what it's doing:
ATR(200) is the average true range for the last 200 days in dollars.
ATR(200) / C is the range as a fraction of the closing price, which is more meaningful than an absolute value since you'd expect the absolute range to be higher for higher priced stocks (plus for a fixed amount of capital, you'd have less shares of a higher priced stock).
Multiplying that by 100 turns it into a percentage. So the formula you gave, which is identical to ATR(200)/C*100, is the 200 day average true range of a stock as a percentage of the closing price.
Thus if the ATR(200) of a $1 share is 2 cents, then the result would be 2%. Which would be the dollar amount for a $100 of that share.
It's worth seeing what difference the ATR period makes. For a long period like 200, you'll see the result shoot up when the price falls significantly. In reality the fractional ATR at the lower price might be similar to before, meaning the absolute ATR will have dropped as well, but the 200 period ATR is holding on to the older high values, making it look like it's gone up. This can be seen in the attached chart of BGF, where at the bottom of the dip in Sept '04 the 10 period ATR gives a value of 3.9% compared to the 7.8% of the 200 period ATR. Personally I think a shorter period would be more useful for a stock that has ranged in price a fair bit.
Cheers,
GP
AmiBroker formula to display this as a histogram, allowing the ATR period to be a parameter:
The parameter slider uses zero as the first value just so that
other values will be a multiple of 5. However, zero shouldn't
be passed to the ATR function, so will change to 1.
*/
per = Param("Period?", 200, 0, 400, 5);
if (NOT per)
per = 1;
Lastvalue just gives the absolute last value of an array for that symbol
So is there any difference between LastValue(ARRAY) and ARRAY[BarCount-1]?
This value of FridayHigh will hold true until the next friday occurs
Okay.
until the value of close drops by 5% from the last high close
Ah... so that change is a percentage price move value. That makes sense.
Thanks again.
Cheers,
GP
GreatPig
16th-July-2005, 01:10 PM
the 200 period ATR is holding on to the older high values, making it look like it's gone up.
Just thinking, a better idea would be to average the percentage ATR rather than the absolute one. So instead of:
ATR(200) / C
Try:
EMA(ATR(14) / EMA(C, 14), 200)
This takes a 200 period EMA of the 14 period percentage ATR (using a 14 period EMA of the close rather than the last close). I think that would give more useful results.
Attached is BGF again, with a 14 period ATR and 21 period EMA of the percentage ATR.
Cheers,
GP
Updated formula, allowing ATR and EMA periods to be parameters:
might be a good idea to just keep this thread to straight question/answer on using amibroker. Further discussion on mods for systems can be discussd in separate threads. Otherwise be hard to sort the wheat from the chaff.
DTM
16th-July-2005, 03:57 PM
Daniel,
Take a look here (http://www.amibroker.com).
It's a charting program but I believe you can get live feeds for it, although not from AmiBroker themselves. I only use EOD data myself.
GP
Thanks GP and kaveman, very interesting indeed. So cheap and I also looked up reviews for it and it was something like 96% approval rating.
Now I'll be reading this thread more closesly to see if I can learn anything. :D
GreatPig
16th-July-2005, 04:01 PM
might be a good idea to just keep this thread to straight question/answer on using amibroker
Yeah, you're probably right.
Unfortunately I'm not able to move the other stuff now.
Cheers,
GP
RichKid
16th-July-2005, 11:58 PM
Now you're definitely speaking Greek to me.
Pardon my ignorance but what is Amibroker? Is it like E-signal and Metastock. Do you get a live feed from Amibroker?
Thanks in advance.
Daniel
Hi,
Also do a search for 'amibroker' on ASF and you'll find some discussion of it (including comments by GP), I think I asked some questions about it myself. Hope this helps.
Milk Man
17th-July-2005, 12:15 PM
I want to set buy and sell signals for all positions when theres a 50 day MA crossover (for example) by the xao.
How do I set buy/sell signals by indicators given by a particular index/stock?
Help has and will be much appreciated. :)
GreatPig
17th-July-2005, 01:42 PM
I want to set buy and sell signals for all positions when theres a 50 day MA crossover (for example) by the xao.
You need two periods for an MA crossover. Say you want to use 14 day crossing 50 day, then for a particular stock you can write (using EMA - my preferred one):
es = EMA(C, 14);
el = EMA(C, 50);
Buy = Cross(es, el);
Sell = Cross(el, es);
For the XAO you have to use the Foreign function:
xao = Foreign("XAO", "Close");
Then same as above but using "xao" in place of "C":
I don't think you'd want to buy a particular stock just because the XAO has done a crossover though. However, if you wanted something like the stock crossover but only if the shorter MA for the XAO was above the longer one (meaning it's rising), then you could do something like:
Buy = Cross(es, el) AND xes > xel;
Sell = Cross(el, es) OR xes < xel;
This would only signal buy if xes was above xel when the stock crossover happened, but would signal sell if either the stock crossover happened or xes dropped below xel.
You have to be careful if using crossover signals to buy but other signals to sell. If the other signal (eg. xes dropping below xel) signalled a sell, but then it reverted back again (ie. xes went back above xel), you wouldn't get another buy stock crossover if it hadn't crossed downwards, and thus might not get back into a longer uptrend. In that case you might want to make the XAO crossover signal a buy if the stock MAs were already in the buy position:
Buy = (Cross(es, el) AND xes > xel) OR (Cross(xes, xel) AND es > el);
Hope that helps.
GP
kaveman
17th-July-2005, 01:52 PM
also can have
signal = Cross(C, ema(c,50) )
The use of indices as additional signals can be automated by designating the indexes in the Symbol-categories window. There is order of precedence of Market - Group - Industry. So if Market is filled in in the categories then groups and industries are ignored, unfortunately. I ahve asked TJ at AB to include ability to call up independantly.
The AFL to get the base index is GetbaseIndex()
so to get this in use
SetForeign(GetbaseIndex());
IndexSignal = Cross(C, ema(c,50) );
RestorePriceArrays();
//then you use it with the rest of the AFL
Buy = YourStockConditions and IndexSignal();
One thing to remember, and this can play a large part of problems. If you use unpadded data and your stock ticker has data gaps (untraded days) then it will ignore that particular date in referencing the foreign symbol. There are no workarounds for this unfortunately. So best to use any foreign as simple raher than crosses
SetForeign(GetbaseIndex());
IndexSignal = C > ema(c,50);
RestorePriceArrays();
Buy = YourStockConditions and IndexSignal();
Milk Man
17th-July-2005, 05:07 PM
Thanks heaps GP and Kaveman,
If youv'e got a problem with anything agricultural i'd be more than willing to help :)
I was just going to use the symbol rather than the index function but its always good to know.
The purpose being to exit all trades on a given signal and re-commence the system on reverse: a way of avoiding a bear market somewhat.
I think i'll be right for now.
wayneL
18th-July-2005, 02:40 AM
wayneL,
you could try the 3rd party plug in
http://www.amibroker.org/3rdparty/
and this example on how to use
http://www.amibroker.com/library/formula.php?id=395
hope I have been of help here
Kaveman,
That plug in did the trick nicely! Anurism averted.
Many Thanks for your efforts! :bier:
Milk Man
18th-July-2005, 08:24 AM
I've been trying this to plot the 180 day ema of the close for the xao and the chart still comes up blank
Any ideas?
SetForeign("XAO");
Plot(EMA(C,180),"xao ma",colorBlack,styleLine);
RestorePriceArrays();
Thanks
GreatPig
18th-July-2005, 11:16 AM
That formula works fine when I try it.
Where are you entering the formula?
GP
kaveman
18th-July-2005, 11:47 AM
I've been trying this to plot the 180 day ema of the close for the xao and the chart still comes up blank
Any ideas?
SetForeign("XAO");
Plot(EMA(C,180),"xao ma",colorBlack,styleLine);
RestorePriceArrays();
Thanks
What background colour do you have, if black the line
colorBlack will not show
What background colour do you have, if black the line will not show
no it's a white background.
if I plot it separate to price action the value for "xao ema180" is "empty" so its not out of range of the chart either.
thanks for trying :D
GreatPig
18th-July-2005, 12:37 PM
Do you have this on a chart (as an indicator) or are you just running it in an exploration?
Buy= Cross(MA(C,180),C) AND Cond1;
Regardless of the plot, I think you have the cross back-to-front. This says buy when the MA crosses upward over the price - ie. when the price drops below the MA.
Sell= Buy=False ;
Two problems here that I can see, assuming I understand what you're trying to do. Firstly, comparison requires the double-equals operator (a very common bug in C programming too). So it should say:
Sell = Buy == False;
Secondly, assuming this really is what you mean, then it will generate a sell signal on any day that doesn't have a buy signal. Probably not what you want either. You wouldn't be holding anything for very long :D.
For the plotting problem, I'd have to play around with it to see exactly what it does. I don't have time right at this moment, but I'll take a look later if you don't already have an answer by then.
GP
kaveman
18th-July-2005, 12:48 PM
makes more sense, as the info provided before plotted fine
due to the extreme differences inthe plot values you will only get one showing the other will either be off screen or condensed to miniscule line
change one, always the second plot to include styleLeftAxisScale
if you want the share to be the main Y axis values then move the XAO to after the stock plot, then havce the styleLeftAxisScale in the XAO plot line
The Y axis always uses the first Plot statement to set the scale, all other plots may vary the scale slightly, sometimes with horrendous results like the plotting of values of 4000 against 10.
You will not see any scale for the secondary plot that uses styleLeftAxisScale, but all plots with styleLeftAxisScale will use the same unseen scale. eg you may wnat to add other EMA plots of XAO.
kaveman
18th-July-2005, 12:51 PM
maybe to have finding answersd easier later we could have separate queries in their own thread. Just start each thread with "Amibroker - query title"
so the last query could be
Amibroker - plot foreign on stock chart
Otherwise we could end up with a single thread 100 pages long and not be able to find the answers to tie to a question
just a suggestion
GreatPig
18th-July-2005, 02:11 PM
If there are enough AmiBroker users here, perhaps we should have an AmiBroker section - or a general programming/backtesting section for all flavours of charting software.
GP
Milk Man
18th-July-2005, 06:16 PM
hi guys,
still havn't had any luck getting that foreign file thingy to work.
please help :cry:
kaveman
18th-July-2005, 06:21 PM
hi guys,
still havn't had any luck getting that foreign file thingy to work.
please help :cry:
are you getting any error messages?
Have you selected a base stock with data in it?
have you provided the full code you are using?
have you tried just plotting the foreign part without the rest?
did you have your weeties this morning? :banghead:
GreatPig
18th-July-2005, 10:40 PM
Loakglen,
Okay, here's what I get with your formula applied to TEN. I had to make three changes first though: swapping the Cross order and the double equals I mentioned earlier, and a scale adjustment so both plots overlay properly.
The exact code I'm using, cut and pasted straight from the indicator window, is:
The "styleOwnScale" on the second plot ensures that it isn't tied to the scale of the first plot, since the values are miles apart.
The reason there is so much red above the line is because the sell condition signals every day that doesn't have a buy, which is most days. So nearly every day has a down red arrow on it.
And the reason it breaks in mid 2001 is because my XAO data only goes back that far. For some reason, float.com.au where I get my data from has share prices from 1997 but index data only from mid-2001.
As an indicator, the Filter and PositionSize variables don't do anything (that I'm aware of). They're for explorations and backtests. And the BuyPrice variable isn't normally set, as it indicates the current buy price in a backtest. For the last three parameters of the Plot function, you just need to specify the values, not the "layer =", "yposition = " and "offset = " parts, although that doesn't seem to stop it working.
I don't understand what you're trying to achieve with the BuyPrice equation either. Firstly I don't understand why you're setting it, and secondly why you'd set it to a constant value (260*1.5 = 390) if that was greater than the close+ATR(1) value.
I plotted this by adding it as an indicator using the indicator builder. If you want to run it as an exploration, you'll need to add at least one column for the display. You could add Close and Volume as follows:
Note though that for an exploration it is the Filter value that triggers a match, not the buy and sell signals. So as you have it, any day with volume over 5 million will generate a match.
Hope this helps.
Cheers,
GP
mit
12th-August-2005, 03:45 PM
I just quickly coded the system that Brent Penfold has in his book "Trading the SPI". I don't quite get the same results as Brent, the same maximum and average profit though. I just seem to get more trades and more losses. I think it could be the difference in data providers and the way the contracts are stitched together. Not a bad system but trades too rarely to use much. It has only had one trade so far this year, but to be fair it was just a worked example to show the process of designing a mechanical system. Anyway the code
MIT
************************************************** *******
/*************************************************
SPI Pivot System - Based On Brent Penfold's
Trading the SPI ...
**************************************************/
SetOption("InitialEquity", 10000 );
SetOption("FuturesMode", True);
SetOption("Allowsamebarexit", True );
SetOption("CommissionMode",2); // $ per trade
SetOption("CommissionAmount",0); //$10 per side
Buy = O < WPP // Lower than weekly pivot point
AND O > DR1 // Higher than Daily High
AND H > O + TR / 2; // Range expansion
BuyPrice = O + TR / 2;
StoppedOut = Buy==1 AND (BuyPrice-L) > 0.01 * Ref(C,-1); // Stopped out at 1% of yesterdays close
NormalSell = Ref(Buy,-1) == 1; // Sell today if bought yesterday
Sell = StoppedOut OR NormalSell;
SellPrice = IIf(StoppedOut, BuyPrice - 0.01 * Ref(C,-1), O ); // Sell on open if not stopped out
Short = Cover = 0; // Long only system
doctorj
16th-August-2005, 12:45 AM
Can anyone please provide me examples of code that shows how Ami 4.7 can scale in and out of positions. I've read the examples from the help section, but I'm yet to get my head around it. All I'm really after is some code that will buy another portion, equal to the first portion, when the price has increased, say 20% from the original buy price.
I'm currently working on a system that trades sub 20c stocks using a custom variation of SAR and some other tid-bits. It's based on the entire market, with the only filters being stocks less than 20c with StrLen(Name())==3 to filter out options and warrents etc.
I'm not going to paste the code because I believe the results is a based on picking a few lucky outliers, but here are the basic results. I intend to test over different time periods to see if the results can be reproduced without those outliers or if picking 'outliers' is a common occurance.
System is based on starting with $20k - something within the reach of most. Uses all data back to '97 - only an average of 34 trades per year and an ave. holding time of 13 days.
Edit: I should stress that this is something that I've only been looking at for an hour or two. Like tech's recent short term system, there's likely going to be something exceptionally wrong with it.
DTM
16th-August-2005, 01:00 PM
Sorry for the beginner question but am wondering whether Amibroker has trade scanners where you can put in your search requirements and it will find the setup you're looking for.
Thanks in advance.
doctorj
16th-August-2005, 01:09 PM
It does, provided you can articulate what you're searching for in its internal scripting language.
GreatPig
16th-August-2005, 03:19 PM
am wondering whether Amibroker has trade scanners
Yes, it can do scans, explorations, and backtests.
But as Doctorj says, as long as you can program them in the scripting language.
GP
doctorj
16th-August-2005, 06:15 PM
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.
kaveman
16th-August-2005, 07:25 PM
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;
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 );
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;
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 );
PositionSize = $1000 ; //IIf( DoScaleOut, 500, 1000 );
// enter and scale-in size $1000, scale-out size: $500
doctorj
24th-August-2005, 07:22 PM
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)?
GreatPig
24th-August-2005, 11:44 PM
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
kaveman
25th-August-2005, 08:33 AM
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.
Dan_
6th-October-2005, 11:24 AM
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 :)
gunner12
6th-October-2005, 11:41 AM
Free EOD data can be found at www.float.com.au
This is the Australian IPO and Float website.
Cheers
J
dutchie
6th-October-2005, 11:47 AM
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.
Dan_
6th-October-2005, 11:53 AM
Thanks to both of your for your assistance
I am downloading 2005 data now :eek:
Milk Man
6th-October-2005, 12:18 PM
Ezycast eod is available after 6, sometimes has holes, is in cents and costs money. :banghead:
kaveman
6th-October-2005, 12:33 PM
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.
Dan_
6th-October-2005, 12:42 PM
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
Dan_
12th-October-2005, 11:52 AM
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
kaveman
12th-October-2005, 12:06 PM
I believe you are allowed to run it on different computers with same licence, provided it is YOU using it.
Caliente
12th-October-2005, 04:34 PM
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*.
Dan_
6th-April-2006, 03:14 PM
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
lesm
6th-April-2006, 03:37 PM
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.
Dan_
6th-April-2006, 05:08 PM
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
stevo
6th-April-2006, 06:10 PM
Dan
I use JustData as well.
If you go to;
www.justdata.com.au/Training/Tutorials/Configure/amibroker.htm
It steps through how to setup the data for AmiBroker.
You can set up Bhodi to download at a set time every day;
www.justdata.com.au/Training/Tutorials/Features/auto_downloads.htm
It doesn't take much once everything is set up.
Stevo
Sir Burr
6th-April-2006, 06:33 PM
Dan
I use JustData as well.
Stevo
I do as well and Metastock will be a distant memory when Bodhi has Amibroker data direct without a MS plug-in! ;)
SB
Dan_
6th-April-2006, 08:16 PM
Hi Dan,
Try the link below:
http://www.amibroker.org/3rdparty/ASX_Setup/
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 :)
lesm
6th-April-2006, 08:51 PM
Hi Dan,
Under Customise Tools, where you set up the files the '.js' suffix is correct. You also need to ensure that the initial directory is setup correctly, as per the example.
Have you downloaded scripten.exe?
You need this in order to run the scripts from within AmiBroker.
You can also refer to the troubleshooting guide here:
http://www.amibroker.com/troubleshoot.html
Cheers
Dan_
6th-April-2006, 10:56 PM
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
lesm
7th-April-2006, 12:41 AM
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.
glenn_r
7th-April-2006, 08:31 AM
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.
Dan_
7th-April-2006, 10:53 AM
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
kaveman
7th-April-2006, 11:27 AM
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.
lesm
7th-April-2006, 01:08 PM
No probs ..Dan
Happy to help out.
There are a number of people around who can assist, as required.
Cheers,
Les.
Dan_
19th-April-2006, 06:25 PM
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.
kaveman
19th-April-2006, 08:14 PM
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.
Dan_
20th-April-2006, 04:59 PM
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
professor_frink
8th-September-2006, 09:14 AM
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 :)
kaveman
8th-September-2006, 01:14 PM
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
professor_frink
8th-September-2006, 01:21 PM
thanks for that Kaveman :)
professor_frink
18th-September-2006, 10:44 AM
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?
kaveman
18th-September-2006, 02:59 PM
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:
// 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 ];
}
SetPositionSize( 2*MarginDeposit, spsValue );
SetPositionSize( 50, spsPercentOfPosition * ( Buy == sigScaleOut ) ); // scale out 50% of position
You can just remove the parts with SecondProfitTarget
professor_frink
18th-September-2006, 07:12 PM
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:
kaveman
19th-September-2006, 09:19 AM
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
professor_frink
19th-September-2006, 09:29 AM
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?
kaveman
19th-September-2006, 03:19 PM
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;
}
professor_frink
19th-September-2006, 03:26 PM
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;
}
Ok, thanks Kaveman
aishvaryaus
24th-September-2006, 11:28 PM
dear sir,
i am new to this AMI. so i want your suggestion to use AFL. i am full time trader actively. what is your suggestion to use which indicator for day trading. expecting your reply. if you are having any indicator send it to me aishvaryaus@vsnl.net
aishvaryaus@airtelbroadband.in
regds
SIVA :)
.
I am always happy to help anyone with writing AFL for AB. I am a regular in the AB yahoo group, AB website forum, RC and other places.
GreatPig
14th-October-2006, 01:18 PM
Is it possible to change the colour of the Fib level lines when using the Fib tool?
The yellow & light purple lines in particular I don't like, as they're too hard to see.
Cheers,
GP
swingstar
14th-October-2006, 02:59 PM
Is it possible to change the colour of the Fib level lines when using the Fib tool?
The yellow & light purple lines in particular I don't like, as they're too hard to see.
Cheers,
GP
Yep, double click on the Fib study and under the tab 'Fibonacci'.
GreatPig
14th-October-2006, 03:23 PM
Thanks, Swingstar.
GP
professor_frink
25th-October-2006, 04:12 PM
afternoon folks,
I seem to be having some problems with Amibroker at the moment. Drawing trendlines has become nearly impossible- I click to start the trendline, and when I move the mouse to place the line somewhere, it won't move to the position that I'm trying to drag it to. It just has a mind of it's own.
It's also giving me grief with horizontal lines as well. I can place the line to start with, but if I want to move it, the line won't stay horizontal anymore, and will be at roughly 45 degrees.
It's currently only doing this with my Intraday database. When I have the EOD database up and running, the trendlines/horizontal lines will draw fine.
Anyone have any ideas on what the problem might be?
swingstar
25th-October-2006, 04:30 PM
Hi PF
See if Format -> Snap to price is selected.
Not sure if that's what it could be, since as you say it's only one database... Might want to try their email support--very responsive.
Cheers
professor_frink
25th-October-2006, 04:33 PM
Hi PF
See if Format -> Snap to price is selected.
Not sure if that's what it could be, since as you say it's only one database... Might want to try their email support--very responsive.
Cheers
For some reason it was. All is working fine now
Thanks Swingstar :)
Sir Burr
29th-November-2006, 06:34 AM
Does anyone have Amibroker code to round prices to the ASX tick levels please?
I would like to test conditional orders with correct prices.
Thanks. SB
wayneL
29th-November-2006, 06:42 AM
Does anyone have Amibroker code to round prices to the ASX tick levels please?
I would like to test conditional orders with correct prices.
Thanks. SB
You could try the round( ARRAY ) function with some peripheral mathematics to get the correct tick level.
kaveman
29th-November-2006, 09:57 AM
here is a function I have to round (up or down) to nearest tick price
it does not include for prices >$1000
One small optimisation note: the first part of the second condition (ie. Price >=0.1) is not required, as prices less than 0.1 are already filtered by the first condition.
Cheers,
GP
Sir Burr
29th-November-2006, 04:19 PM
Graham,
One small optimisation note: the first part of the second condition (ie. Price >=0.1) is not required, as prices less than 0.1 are already filtered by the first condition.
Cheers,
GP
Hi GP,
Might be wrong but I see it setting up the rounding in the first line for prices > 0.1, the second line between 0.1 and 2.0 and finally 2 and over.
SB
swingstar
29th-November-2006, 06:47 PM
GP is right, if it gets to the second line it's not below 0.1 and hence greater than or equal to 0.1, so don't need to recheck.
Sir Burr
29th-November-2006, 07:40 PM
GP is right, if it gets to the second line it's not below 0.1 and hence greater than or equal to 0.1, so don't need to recheck.
I would like to say that Amibroker support and features are truly amazing I found a few bugs today and within hours they were fixed and a new version was released. :eek:
Hows that for support?
flyhigher
6th-February-2007, 03:36 PM
hi, i am a newbie of amiborker. I got problems with yahoo data updating and hope you guys can share some insight. My amiborker is 4.802 version and amiquote is 1.93. i follow the asx set up which was listed on the amibroker website but use yahoo historical data feeding. i found chart shape is right but there was something wrong with price axis. bhp was quoted around $42 and nab was quoted 157. is anything wrong with yahoo data, what shall i do?
thanks for your help
sails
7th-February-2007, 07:11 AM
hi, i am a newbie of amiborker. I got problems with yahoo data updating and hope you guys can share some insight. My amiborker is 4.802 version and amiquote is 1.93. i follow the asx set up which was listed on the amibroker website but use yahoo historical data feeding. i found chart shape is right but there was something wrong with price axis. bhp was quoted around $42 and nab was quoted 157. is anything wrong with yahoo data, what shall i do?
thanks for your help
Flyhigher, try adding .AX to the symbols (eg. bhp.ax) for Aussie prices. Also indicies are preceeded with an ^ eg. ^AXJO (no .ax added here) = ASX 200 index.
Just be aware that Yahoo data does have it's problems from time to time, eg. stocks often fail to update for a few days after our public holidays. I have emailed them on numerous occasions, but they never seem to fix the underlying problem! Since Australia Day, updating of Aussie share prices has been slow in some cases, eg. WOW.ax is still lagging some of the others and the latest update was Friday the 2nd Feb.
I have other paid data which doesn't easily download into our EOD software so I just correct the Yahoo data as necessary. I certainly would not solely rely on Yahoo to make trading decisions!
flyhigher
12th-February-2007, 01:31 PM
Hi, sails. thanks for your reply. could you let me how to add the symbol to yahoo list cause i am really a newbie with amibroker. appreciate your help.
professor_frink
12th-February-2007, 01:37 PM
howdy folks,
quick question on Amibroker's intraday capabilities-
Does anyone know if I can create a 30 second chart in Amibroker at all? It gives me the option of 5 and 15 seconds, but I have no idea how to get a 30 second chart up :confused:
stink
12th-February-2007, 06:12 PM
Arghhh
Hi all, i am in need of help with Amibroker. I am trying to just import some data into the program and it just wont work? I have tried to open the ASX database of the ftp site but it shows nothing?
Is there any step by step tutorials on how to get the basics going on this? I have EOD data which i can open as a text file, i should be able to import this into Amibroker right?
Any help would be greatly appreciated.
Regards Stink
GreatPig
12th-February-2007, 08:37 PM
You can import text price data in a variety of formats using the "Import ASCII" option on the File menu.
You first need a format file that matches the data. AmiBroker comes with a number of format files already, but I use the attached one with data from float.com.au. They are in the Formats folder under the AmiBroker installation folder.
Note: for the attached file, you need to remove the ".txt" extension. I had to add that to allow it to be uploaded here.
GP
kaveman
13th-February-2007, 08:07 AM
Using the Import Wizard allows you to create the format file for the files.
wayneL
13th-February-2007, 08:16 AM
howdy folks,
quick question on Amibroker's intraday capabilities-
Does anyone know if I can create a 30 second chart in Amibroker at all? It gives me the option of 5 and 15 seconds, but I have no idea how to get a 30 second chart up :confused:
I'll bet this is for the Nikkei :D
Try Tools/Preferences/Intraday You can set custom time intervals there.
Cheers
professor_frink
13th-February-2007, 08:42 AM
I'll bet this is for the Nikkei :D
Try Tools/Preferences/Intraday You can set custom time intervals there.
Cheers
It's for the Hang Seng. Nikkei is actually pretty tame(most of the time)
Already tried that- in the custom time interval section, it will give the option of xx minutes, hours or days, but it won't let me enter 0.5, or 1/2 for the amount :(
I could use a tick chart to get what I want, but the way ami deals with IB's data makes tick charts basically useless :mad:
Thanks anyway for the help Wayne :)
edit: just looked at the yahoo group and someone has asked the same question as me in there with no answer. Maybe it can't be done.
kaveman
13th-February-2007, 03:56 PM
did not think IB provided actual tick data
professor_frink
13th-February-2007, 04:55 PM
did not think IB provided actual tick data
No, it's not a pure tick feed, but tick charts work quite well with their feed. Most of the time, there is going to be very little difference between a tick by tick feed and one that provides a snapshot every 200 milliseconds.
Obviously I'm going to get a slightly different 20 tick chart with IB's feed compared with a tick by tick feed, but it works quite well for me, and flows alot better than looking at a 15 or 20 second chart(which is what's important to me). The snaphot style feed also has it's advantages- it doesn't lag behind as much in a fast moving market, like pure tick feeds can do, which is quite comforting.
It would be nice if Ami simply accepted the data as it came in(which quotetracker seems to do quite well), not bundle it together into multi second intervals.
kaveman
13th-February-2007, 07:04 PM
quotetracker to AB is only in 1 minute snapshots
professor_frink
13th-February-2007, 07:12 PM
quotetracker to AB is only in 1 minute snapshots
sorry, I was referring to QT running off IB's feed, not feeding QT data into AB.
Techbuy
15th-February-2007, 11:59 AM
Can someone who uses Amibroker answer a couple of questions please.
I have downloaded and run the demo and am using the Metastock data from Bhodi and that is all working fine.
But the more I look at the program it seems it has quite a steep learning curve to get comforatable with it, how have you found it?
It seems though you need to be able to program the scripts to get the max use out of it. is this the case?
I was looking at adding the book by Bill Seward as it sound like it will be a good starting point as well as the add ons from Pattern Explorer as they have the Guppy MMA which I like to use.
Also would it be suitable for live data feeds to work along side of comsec protrader as you cannot do searches on protrader for stocks that meet set criteria during the day to day activity or if you can I have not worked it out.
Any advice will be appreciated.
I currently use EzyTrader at night but the charting is very average and the analyzer is also quite limited. I get the EOD and run the anaylzer looking for the next days watch/trade list then run through the charting side to see how they stack up and do some reseach on this forum to get a feel of the other traders sentiments about the stocks and then read all the info on the companies and any trading news I can find on some of the tipsters sites as well as Comsec and Google to see whats happening then at least I am ready for the pre opening and from about 9:30 to open I watch the SV and IAP price for gapping to get a feel for the days sentiment. :banghead:
albi000
16th-February-2007, 05:26 AM
I'm a computer programmer so I may not be the best person to discuss the steep learning phase.
You can program your own Guppy MMA without Pattern Explorer. Go to this download page (http://www.amibroker.com/library/list.php) and search for Guppy and you will find a formula you can download. Click on details as for this formula as there is a better example of the way Daryl Guppy uses MMA. If you need further instructions on how to install formula's then let me know or check the help file.
I currently have Amibroker connected to QuoteTracker, which is connected to E-Trade to get my live data feed during the day.
flyhigher
22nd-February-2007, 11:29 AM
newbie need help with simple coding
i want to test the idea that long when ROC<-10 and sell when price dropped below 5 day ema. but there is always syntax error for my sell legs.
besides,there is no match up when i just use filter=ROC<-10 and explore on ASX data. thanks for help.
kaveman
22nd-February-2007, 11:56 AM
this will give buy signal when the ROC drops bleow -10 and sell when C drops below ema
you might also want to add condition to buy that the Close is above the ema for entry, otehrwise exit will occur straight away
buy = cross(-10,ROC(c,5)) and C>EMA(C,5);
sell = cross(ema(c,5),c);
filter = buy or sell;
addcolumn(C,"Close",1.3);
addcolumn(ROC(c,5),"ROC",1.3);
addcolumn(ema(c,5),"EMA",1.3);
hope this helps
flyhigher
22nd-February-2007, 05:17 PM
Hi, kaveman. thank you very much for your help.
mrWoodo
28th-February-2007, 02:16 PM
Surfing around, found this set of tools for AmiBroker.
PatternExplorer (http://www.patternexplorer.com)
The Pattern recognition for Charts looks handy - Haven't bought it yet
It's Snake Pliskin
19th-March-2007, 04:31 PM
I have some original set-ups and indicators I would like to code and test.
What is the functionality of Amibroker like? Can it help create any indictaor?
Is Forex spot data available for Amibroker or does anybody use it for forex?
kaveman
20th-March-2007, 08:10 AM
Amibroker is extremely strong in the functionality, assuming you mean ability to write your own indicators.
You can use forex data. Not sure on live feeds as I do not trade the forex, but a lot use IB as live feed to AB and I believe this has forex, but not 100% sure on this.
wayneL
20th-March-2007, 08:13 AM
Amibroker is extremely strong in the functionality, assuming you mean ability to write your own indicators.
You can use forex data. Not sure on live feeds as I do not trade the forex, but a lot use IB as live feed to AB and I believe this has forex, but not 100% sure on this.
Yes, it does.
lesm
20th-March-2007, 08:15 AM
IB has Forex and Amibroker has an IB plugin.
It's Snake Pliskin
20th-March-2007, 01:24 PM
Thankyou Kave, Wayne and Lesm!
Your help is much appreciated. :)
ezyTrader
5th-April-2007, 11:35 AM
Hi all,
I have just installed the trial version of Amibroker, and need some help with loading intra-day via QuoteTracker. QT is linked up to my Commsec and it's working fine. Is this a "feature" of the trial AB?
Also, accidentally deleted some indicators off the basic charts options eg. OBV. Is there an easier way to restore them, apart from re-installing AB?
wayneL
5th-April-2007, 11:37 PM
Hi all,
I have just installed the trial version of Amibroker, and need some help with loading intra-day via QuoteTracker. QT is linked up to my Commsec and it's working fine. Is this a "feature" of the trial AB?
Also, accidentally deleted some indicators off the basic charts options eg. OBV. Is there an easier way to restore them, apart from re-installing AB?
If you're still in trial, it's probably easier and quicker to re-install.
Or if you know which ones you want, I can post the code here.
Another question - as ultimately I'm only interested in EOD and weekly in the use of AB, would QT linked to Commsec suffice, or, do I really need premium data?
wayneL
9th-April-2007, 11:16 PM
Thanks, wayneL.
Another question - as ultimately I'm only interested in EOD and weekly in the use of AB, would QT linked to Commsec suffice, or, do I really need premium data?
That one I can't answer because I've never tried it that way. But I'm sure it has a QT plug in? The kicker is whether it downloads accurate historical EOD data or not.
kaveman
10th-April-2007, 01:43 PM
Intraday data is not accurate enough for use as daily. There are too many corrections made during the day that show up as trades that would not be included in the end of day data. Besides through QT you can only get data as it happens from comsec, but you can backfill all of todays data on 20 minute delayed from tradingroom at end of day
You really need to use daily data supply for daily or weekly analysis.
rub92me
11th-April-2007, 09:01 AM
Question for the Amibroker gurus. I'm importing eod ASX data that includes futures, but really I'm only interested in (three letter) stock codes. I have a script to clean up the futures after the import, but is there a way to restrict the import to three letter codes in the first place (other than editing the data before I import it in Amibroker?). I had a look around in the help file on data import scripts but couldn't find anything that does this. :confused:
Phoenix
11th-April-2007, 09:59 AM
rub92me, you can with a script but wouldn't you also delete some stocks that have more then 3 letter codes?
rub92me
11th-April-2007, 10:24 AM
Phoenix, that's what I want.
Say I have data in the EOD file that looks like this:
I want the import to skip the line for BKYO and only import the data for BKY and BLD (as I'm not interested in the options data).
My script can delete BKYO after the import, which takes quite a long time to run.
If you have a script that strips out at/before import, that would be most welcome!
Phoenix
11th-April-2007, 10:27 AM
Ah i see but you already have a script that i was thinking about. To do it before you import would require a program :(.
kaveman
11th-April-2007, 11:07 AM
Rather than try to limit the imports why not sort the database.
Here is an aFL I use myself, made it long ago. I just move all symbols to Market0 then run the scan on all stocks.
The only thing needed is to have any index already in the index category, and I keep any delisted stocks in watchlist 63
After the scan any symbols left in market0 have no data and can generally be deleted
So you can run any tests on market 1 being the shares only.
//Sort shares into the markets
//Graham Kavanagh 15 Apr 2005
//Scan on all tickers
Index = IsIndex();
Delisted = InWatchList(63);
Backtest = GroupID()==253;
Share = (StrLen(Name())==3 OR (StrLen(Name())==5 AND StrMid(Name(),3,1)=="D" AND StrRight(Name(),1)!="P")) AND Index==0 AND Delisted==0 AND Backtest ==0;
Other = share==0 AND index==0 AND DeListed==0 AND Backtest ==0;
Thanks Graham. I have my data sorted already in a similar way, so it's no real bother from an explore/backtest perspective. Just thought I could prevent from importing it in the first place; I used to have Fcharts that had this built in as import functionality so was looking for something similar. If I can be bothered I may write a little macro to edit the data prior to import instead.
GreatPig
11th-April-2007, 08:59 PM
Download this Windows version of the Grep utility (http://pages.interlog.com/~tcharron/grep.html), put it either in the folder with the stock code file or in a folder in the DOS path, then from the command line in that folder, type:
grep "^...," filename.ext > newname.ext
where filename.ext is the name of the stock code file, and newname.ext is the output filename that you will then import into AmiBroker.
Note that this will drop a few stock codes longer than 3 characters which are like stocks (eg. TLSCA). You could specifically include individual codes using a command like this:
(assuming the filename has a date format like 20070411.txt)
This would generate a file called 20070411-X.txt with just the codes you want, which could then be imported into AmiBroker.
Sounds a bit complicated, but once the batch file is set up, it's dead easy (assuming you're familiar with using the command line interface).
If you want to know more about Grep, command line switches listed here (http://www.computerhope.com/unix/ugrep.htm), and regular expression details listed here (http://oakroadsystems.com/sharware/grep101.htm) (go to the very end).
GP
rub92me
12th-April-2007, 09:00 AM
GP, that sounds like the sort of script I want; saves writing it myself!
Thanks very much, I'll check it out.
canaussieuck
12th-April-2007, 09:04 PM
Well I've got Amibroker now, but I'm a bit overwhelmed. Can anyone suggest where to start learning, should I just get stuck into the help?
Obviously I'd like some data too, I'll have a squiz over on the DATA thread, but anyone feel free to give me some advice...also managed to delete a couple of indicators..just too easy.
Cheers,
GreatPig
12th-April-2007, 11:24 PM
I'd suggest just getting familiar with the basic functionality first: importing data, setting up charts and indicators, drawing lines on them, and so on.
To start learning AFL script, try looking through some of the existing ones that come with AmiBroker to see how they work and what they do. If you've never done any programming before, look in the Help at the section on AFL (AmiBroker Formula Language), starting with the first topic called "AFL Reference Manual". That covers the basics of programming with the language. The topic "AFL Function Reference" then gives the details of each function as you start to use them.
It may take a while, but don't rush it and you'll get there.
For data to get started, try float.com.au (http://www.float.com.au/scgi-bin/prod/dl.cgi). Remember that it's not adjusted though, so some stocks will have big price jumps where there have been splits or consolidations. For serious use, you may prefer to pay for proper conditioned and adjusted data.
Cheers,
GP
canaussieuck
12th-April-2007, 11:57 PM
I'd suggest just getting familiar with the basic functionality first: importing data, setting up charts and indicators, drawing lines on them, and so on.
To start learning AFL script, try looking through some of the existing ones that come with AmiBroker to see how they work and what they do. If you've never done any programming before, look in the Help at the section on AFL (AmiBroker Formula Language), starting with the first topic called "AFL Reference Manual". That covers the basics of programming with the language. The topic "AFL Function Reference" then gives the details of each function as you start to use them.
It may take a while, but don't rush it and you'll get there.
For data to get started, try float.com.au (http://www.float.com.au/scgi-bin/prod/dl.cgi). Remember that it's not adjusted though, so some stocks will have big price jumps where there have been splits or consolidations. For serious use, you may prefer to pay for proper conditioned and adjusted data.
Cheers,
GP
Thank GP, i'm going to dedicate my weekend to learn some of this, at least make some progress.
Cheers,
chops_a_must
13th-April-2007, 01:35 AM
Thank GP, i'm going to dedicate my weekend to learn some of this, at least make some progress.
Cheers,
Try the power scan add-on/ download:
http://www.amitools.com/download.htm
It looks to be great for plebs like me who still use typewriters. :p:
It works on the trial version as well.
I tell you what, I am very impressed with Amibroker just after mucking around with it tonight. It is rather seductive.
And I'm not easily impressed. Wow! A blue car!
canaussieuck
13th-April-2007, 06:45 AM
Try the power scan add-on/ download:
http://www.amitools.com/download.htm
It looks to be great for plebs like me who still use typewriters. :p:
It works on the trial version as well.
I tell you what, I am very impressed with Amibroker just after mucking around with it tonight. It is rather seductive.
And I'm not easily impressed. Wow! A blue car!
Thanks Chops, i'll download it this weekend. Are you saying your not as PC literate as some? I would fit into that category, maybe like a 7, can use... but only to the level needed to get the job done! lol!
My problem is i lose patiance or get easily distracted from my original purpose when browsing or learning new SW.
Cheers,
rub92me
13th-April-2007, 11:41 AM
Try the power scan add-on/ download:
http://www.amitools.com/download.htm
It looks to be great for plebs like me who still use typewriters. :p:
That looks like an interesting tool chops, thanks for the link. I'll give that a go this weekend as well. I was just starting to get stuck in writing/converting my own scans, and this looks like an easy way to get it done!
Disqplay
14th-April-2007, 11:30 PM
Is there a limit to the number of chart tabs you can have in amibroker.
At present I have a total of 8 tabs but cannot find anyway to increase the number of tabs. In the help guide when looking the screen shot shows 10 tabs so if it is possible to add tab can anyone explain to me how to do it?
I should mention that I do have version 4.90.3 of amibroker, thanks for any and all replies.
Disq
kaveman
15th-April-2007, 09:18 AM
Tools-Preferences-Charting at bottom of window type in how many panes you want in the chart window
canaussieuck
15th-April-2007, 11:10 AM
As posted in another thread, i'm having trouble opening up the Premium data that i've downloaded from the free trial.
Has anyone else had trouble with this?
Any tips???
Anything???
:(
Disqplay
15th-April-2007, 11:43 AM
Thank you very much Kaveman that is exactly what I was looking for you rock
Disq
Disqplay
15th-April-2007, 11:56 AM
I typed the following in not knowing what to expect and now I haven't a clue as to what the statement means other than I think it is looking for the lowest low of the close for the last 20 days but what does the rest mean?
b = MA(LLV(Close,20),30);
stevo
15th-April-2007, 12:14 PM
b equals the 30 period simple moving average of the lowest low value of the close price in the last 20 periods.
GreatPig
15th-April-2007, 03:41 PM
This Wikipedia article (http://en.wikipedia.org/wiki/moving_average) explains moving averages in some (mathematical) detail.
Note also that all variables are arrays, with one element per bar, so the formula is not just calculating a single value but an array of values covering the whole chart. In other words, 'b' is an array with the value at each bar being the moving average over the previous 30 bars (or an empty value if there are less than 30 bars before it). This practice of handling arrays like single numbers is very common in AmiBroker AFL.
GP
chops_a_must
16th-April-2007, 02:19 AM
As posted in another thread, i'm having trouble opening up the Premium data that i've downloaded from the free trial.
Has anyone else had trouble with this?
Any tips???
Anything???
:(
Had the same problem Cana.
Went through this thread and found this:
http://www.amibroker.org/3rdparty/ASX_Setup/JScript.V5.6/
It seemed to do the trick. If not, it was definitely something of this nature from this thread.
Hope it helps.
Cheers,
Chops.
canaussieuck
16th-April-2007, 09:10 AM
Had the same problem Cana.
Went through this thread and found this:
http://www.amibroker.org/3rdparty/ASX_Setup/JScript.V5.6/
It seemed to do the trick. If not, it was definitely something of this nature from this thread.
Hope it helps.
Cheers,
Chops.
Thanks Chops i'll check it out. Are you using Premium data?
chops_a_must
16th-April-2007, 02:36 PM
Thanks Chops i'll check it out. Are you using Premium data?
Yus. Just on the trial.
Once you get it set up, it couldn't be easier.
chops_a_must
16th-April-2007, 06:19 PM
I've been mucking around on the trial for Amibroker over the last week or so. Found it very good, especially with the scanning add-on.
I just have a few basic questions.
Is there anywhere that I can purchase Amibroker to take advantage of the exchange rate? It is the only reason I am considering it now, and it seems like they haven't taken it in to account.
Secondly, is there anyway way you can change the chart to have the candles in green for + days and in red for - days?
Lastly, is there anyway to change the perspective on the charts? As it seems to really flatten out the trends, and has no room at the top for indicators.
Cheers,
Chops.
GreatPig
16th-April-2007, 07:35 PM
is there anyway way you can change the chart to have the candles in green for + days and in red for - days?
Tools->Preferences and the Colors tab.
Lastly, is there anyway to change the perspective on the charts? As it seems to really flatten out the trends, and has no room at the top for indicators.
Not quite sure what you mean here. You can switch between linear and semi-log scales in the chart parameters, but I think you'd have to change the AFL to otherwise adjust the scaling.
You can add indicator panes at either the top or bottom as new charts. If you want to overlay an existing chart with an indicator, I think you'd have to edit the AFL code to add the indicator to it.
GP
chops_a_must
16th-April-2007, 11:35 PM
Is there anywhere that I can purchase Amibroker to take advantage of the exchange rate? It is the only reason I am considering it now, and it seems like they haven't taken it in to account.
Cheers,
Chops.
Thanks GP. That's what I wanted.
I'm just going to bump this. Is there anywhere else that I can buy Amibroker apart from the Amibroker site?
I enquired why it is selling at a premium in AUD, as opposed to USD, and got a really crap answer. :mad:
If there isn't another place, I might just take my chances and order it in USD.
GreatPig
17th-April-2007, 12:27 AM
Dunno.
I just bought it online from their website.
Cheers,
GP
deve
2nd-May-2007, 03:29 PM
Erk!
Whilst playing around with Amibroker, I closed the chart window and now I can't seem to get it back! (Clicked on the small 'x')
I still have tabs such as Layouts, Layers, Charts, Symbols displayed but not the chart itself. All the data seems to be there still.
I thought it might have been under View but I can't seem to find it. Does anyone know how to get my charts back?
Any help would be appreciated.
Thanks
Steve
wayneL
2nd-May-2007, 05:45 PM
File/New/Default Chart
Been there done that :o
deve
3rd-May-2007, 01:25 PM
Cheers muchly!
:)
borat
14th-May-2007, 08:36 AM
Hi All,
Im setting up Amibroker fresh and want to add the ASX ticker list, but I can only find how to add them by typing comma separated tickers. as there are about 2000+ this is going to take some time! Is there somewhere I can down the list a csv file and import them? I also want to add european tickers as I'm living in Europe.
Thanks for your help.
B.
canaussieuck
20th-May-2007, 08:18 PM
Holy smokes, i'm so excited i'm shakin in my boots! This guy TJ is a genius for creating a wizard to help us AFL dough heads!
I'm wondering if anyone has tried this yet?
Also, i know this must sound like a stupid question, but is a beta version an 'untested' version of software?
I have version 4.90 of Amibroker. If i want the wizard, they recommend downloading the new 4.95 beta version complete with the wizard. What are the advantages or disadvantages of this compared with the just downloading the wizard add on?
I'll do some more digging and see if i can find the answers myself, but i thought someone may have been there already.
woo hoo, what a time saver, and a potentially great way to learn AFL!
I'm sooo excited, its like Christmas.:D
Cheers,
lesm
20th-May-2007, 11:57 PM
Hi All,
Im setting up Amibroker fresh and want to add the ASX ticker list, but I can only find how to add them by typing comma separated tickers. as there are about 2000+ this is going to take some time! Is there somewhere I can down the list a csv file and import them? I also want to add european tickers as I'm living in Europe.
Thanks for your help.
B.
Borat,
You can set up an entire ASX database using the files provided in the AB 3rd-Party Area below:
Copy the complete list of ASX codes located in Column B and paste them into Notepad. You can then save the file as something like "ASX Companies.tls" and import them into a watchlist.
Cheers.
lesm
21st-May-2007, 12:16 AM
Also, i know this must sound like a stupid question, but is a beta version an 'untested' version of software?
I have version 4.90 of Amibroker. If i want the wizard, they recommend downloading the new 4.95 beta version complete with the wizard. What are the advantages or disadvantages of this compared with the just downloading the wizard add on?
I'll do some more digging and see if i can find the answers myself, but i thought someone may have been there already.
woo hoo, what a time saver, and a potentially great way to learn AFL!
I'm sooo excited, its like Christmas.:D
Cheers,
Can,
A beta version of software will have had a level of testing undertaken, but will not necessarily have been fully tested or had afull set of regression tests run against it. Hence, it may still have some as yet unknown bugs or errors in it.
If you want to run the wizard with AB 4.90 then you need to run it as a standalone application from within the installation directory (Program Files/AmiBroker). It cannot be run from within AB with versions earlier than 4.95 beta.
Below are the is the description/instructions from the AB Devlog web page:
"You can download stand-alone trial version from: http://www.amibroker.com/bin/acw1000beta.exe (After running setup, double click on AFLWiz.exe inside the installation directory). Trial version REQUIRES AmiBroker 4.90 or higher."
Using AB 4.95 beta, it can be run from within AB and it is located on the bottom of the Analysis Menu. Looks fairly basic, but for people learning AFL it would be of assistance.
Cheers.
canaussieuck
21st-May-2007, 12:37 AM
Can,
A beta version of software will have had a level of testing undertaken, but will not necessarily have been fully tested or had afull set of regression tests run against it. Hence, it may still have some as yet unknown bugs or errors in it.
If you want to run the wizard with AB 4.90 then you need to run it as a standalone application from within the installation directory (Program Files/AmiBroker). It cannot be run from within AB with versions earlier than 4.95 beta.
Below are the is the description/instructions from the AB Devlog web page:
"You can download stand-alone trial version from: http://www.amibroker.com/bin/acw1000beta.exe (After running setup, double click on AFLWiz.exe inside the installation directory). Trial version REQUIRES AmiBroker 4.90 or higher."
Using AB 4.95 beta, it can be run from within AB and it is located on the bottom of the Analysis Menu. Looks fairly basic, but for people learning AFL it would be of assistance.
Cheers.
Thanks mate...got it going now and only had it shutdown once, not sure why though...
Really opens your eyes up to AFL. I think using the wizard will be an art in itself for a few.
So far though its been good, i've managed to totally trash at least 4 of my ideas for systems based on indicators....should have listened.
I think i will concentrate on a system for stocks before i try futures.
The wizard will definately speed up my learning process of AFL.
Cheers and thanks,
deftfear
21st-May-2007, 09:00 AM
Does anyone know if amibroker is able to do a scan for a share price being above a 100 day ema, one macd line being above zero and another being below zero? I want a product that is able to do this scan, and can't work out if metastock or amibroker can do it. Any help would be greatly appreciated.
deftfear
21st-May-2007, 09:22 AM
Does anyone know if amibroker is able to do a scan for a share price being above a 100 day ema, one macd line being above zero and another being below zero? I want a product that is able to do this scan, and can't work out if metastock or amibroker can do it. Any help would be greatly appreciated.
I am also wanting to know if I can scan for stocks within about 2-3% above the 100 day ema. Is it also possible to change the macd setting from the standard 12,26 and 9?
mrWoodo
21st-May-2007, 09:25 AM
Hi Deftfear,
Amibroker can definitely do what you're after, in a couple lines of code. Your second post, re. changing macd settings, thats easy, time-period is a parameter which can be changed.
canaussieuck
21st-May-2007, 09:40 AM
Hi Deftfear,
Amibroker can definitely do what you're after, in a couple lines of code. Your second post, re. changing macd settings, thats easy, time-period is a parameter which can be changed.
Wow, i knew the answer to that too, i must be progressing after all!
Mr.Woodo, have you ever used beta versions before?
Cheers,
mrWoodo
21st-May-2007, 07:06 PM
Wow, i knew the answer to that too, i must be progressing after all!
Mr.Woodo, have you ever used beta versions before?
Hi Canaussieuck, just checked out the last few posts, I didn't realise this new functionality is out. I've tried heaps of beta software, but not Amibroker so can't tell if there's any issues. Will try to give it a whirl this week, let us know how you go with the wizard! I don't know if I would use it, I work with code/writing software all day so am comfortable with a blank editor.
GreatPig
21st-May-2007, 07:48 PM
I'm currently using 4.94 beta and have had a few issues. Only one seems to be a bug though, the others are feature changes that I just don't like. :D
The (presumed) bug is that I suddenly get stocks disappearing from my watchlists occasionally. I'll just start it up one day and a watchlist will be missing a stock or two (they'll still be in the database, just gone from the watchlist).
I'll try the 4.95 beta version.
GP
lesm
21st-May-2007, 08:05 PM
I'm currently using 4.94 beta and have had a few issues. Only one seems to be a bug though, the others are feature changes that I just don't like. :D
The (presumed) bug is that I suddenly get stocks disappearing from my watchlists occasionally. I'll just start it up one day and a watchlist will be missing a stock or two (they'll still be in the database, just gone from the watchlist).
I'll try the 4.95 beta version.
GP
GP,
I ran into with the 4.94 beta. Even re-importing the stock codes into the existing list still didn't work, as they were gone the next time you started AB.
I found that if you loaded the stock code list into a new watchlist that the problem didn't recur.
I am now using the 4.95 beta and need to check if this still occurs.
Cheers.
deftfear
21st-May-2007, 08:26 PM
Looks like I'll have to look at getting it then, thanks for your response mrwoodo. :)
deve
30th-May-2007, 04:47 PM
Hi
Another Amibroker question - had a look but couldn't find an answer
It seems that volume is limited to 2147483647 in Amibroker.
I'm looking at some charts with higher volume than that so I'm wondering what my options are.
a) to somehow strike off a few zeros from my volume? (how would I do that)
b) wait for Amibroker to raise its volume limit (what chance of this occurring soon?
c) something else?
Any tips would be appreciated
Thanks
Steve
rub92me
1st-June-2007, 02:17 PM
You're looking at stocks/futures that trade more than 2 billion units a day? I think your only option would be to edit the data at the source and then reimport...
telstrareg
9th-June-2007, 11:58 PM
Started playing around with my first backtests in Ami. I noticed that by default the backtester will not initiate a new long until a previous long position has been closed. Ie you can only have one open position at a time. Anyone know how to get around this?
GreatPig
10th-June-2007, 12:22 AM
Are you talking about one long position in total, or one long position per stock?
If the former, then you need to set the PositionSize variable to limit how much capital is applied to each purchase. Buy default it will apply all available funds to each purchase, meaning you'll only end up with one position at a time. You can set a dollar figure by using a positive number, or a percentage of equity by using a negative number. For example, PositionSize = 10000 would use $10K for every purchase, while PositionSize = -10 would use 10% of equity (that's current equity at the time of the trade, not initial equity).
If you mean the latter, then you have to use the sigScaleIn (and possibly sigScaleOut) variable to pyramid a position. That's a bit more advanced though, and requires version 4.70 or later. For more information, look in AmiBroker help under Tutorial -> AmiBroker Formula Language -> Pyramiding/Scaling and Multiple Currencies.
Cheers,
GP
telstrareg
10th-June-2007, 04:50 PM
Are you talking about one long position in total, or one long position per stock?
If the former, then you need to set the PositionSize variable to limit how much capital is applied to each purchase. Buy default it will apply all available funds to each purchase, meaning you'll only end up with one position at a time. You can set a dollar figure by using a positive number, or a percentage of equity by using a negative number. For example, PositionSize = 10000 would use $10K for every purchase, while PositionSize = -10 would use 10% of equity (that's current equity at the time of the trade, not initial equity).
If you mean the latter, then you have to use the sigScaleIn (and possibly sigScaleOut) variable to pyramid a position. That's a bit more advanced though, and requires version 4.70 or later. For more information, look in AmiBroker help under Tutorial -> AmiBroker Formula Language -> Pyramiding/Scaling and Multiple Currencies.
Cheers,
GP
I was talking about multiple longs on a single currency. eg an indicator like MFI might signal several long entries before a sell condition came along. so for example you might have 3 longs all initiated at different times which would then be closed simultaneously by the next sell signal.
Yes and the position sizing issue is obviously quite important for when I start doing serious testing, if for no other reason than it's totally unclear what Amibroker's default settings are during backtesting!
I have a long, long road ahead of me :)
telstrareg
10th-June-2007, 05:49 PM
profit based sell rule
I understand how to write buy/sell rules based on technical indicators. However, could someone explain how to write a sell condition that is based solely on percent profit and not on a technical indicator? I tried running a backtest with a technical 'buy=' condition, but without a 'sell=' condition, and just specifying a profit target in the settings, but the backtester won't run. error "missing short/cover variable assignment"
Slick Rick
10th-June-2007, 10:43 PM
Hi All,
I recently downloaded the trial version of Amibroker (v 4.90), but can't seem to load historical ASX data into the program.
2005-2007 EOD Data was downloaded from www.float.com.au and has been extracted into one folder. The data is daily files in csv format.
Using the import wizard, the fields are defined as;
Ticker, YMD, Open, High, Low, Close, Volume
Seperator is Comma(,), Group 255, Log Errors, Auto add new symbols, allow negative prices.
When I select a symbol after the data has been loaded, the graph is blank and says "Not enough data available. To plot chart 3 bars are needed, 0 bars in 'XXX'."
Not sure what I'm doing wrong?
Most grateful for any help.
telstrareg
10th-June-2007, 11:44 PM
Hi All,
I recently downloaded the trial version of Amibroker (v 4.90), but can't seem to load historical ASX data into the program.
2005-2007 EOD Data was downloaded from www.float.com.au and has been extracted into one folder. The data is daily files in csv format.
Using the import wizard, the fields are defined as;
Ticker, YMD, Open, High, Low, Close, Volume
Seperator is Comma(,), Group 255, Log Errors, Auto add new symbols, allow negative prices.
When I select a symbol after the data has been loaded, the graph is blank and says "Not enough data available. To plot chart 3 bars are needed, 0 bars in 'XXX'."
Not sure what I'm doing wrong?
Most grateful for any help.
if the data is in multiple files, you have to make sure you select all the files in a folder and not just one when you import. Ami connects all the data across multiple files. also make sure the fields in the drop downs match the order of those in the csv
canaussieuck
11th-June-2007, 02:42 PM
I'm trying this ZIGZAG indicator as an exercise from Bandy's book, but i can't get the arrows or the line to plot on the chart...any guesses why?
// zigzag.afl
PricePoint = C;
Percentage = 10;
Z = Zig(pricepoint,percentage);
Buy = Z<=Ref(Z,1) AND Z<=Ref(Z,-1);
Sell = Z>=Ref(Z,1) AND Z>=Ref(Z,-1);
Short = Sell;
Cover = Buy;
You know that the zigzag function is dynamic don't you?
canaussieuck
11th-June-2007, 02:59 PM
Canoz,
You know that the zigzag function is dynamic don't you?
Hi Wayne, this is just an exercise on "drawdown" that is in the book.
I realise that the function is in hindsight and generates perfect buy and sell indicators, is that what you mean by dynamic? Changing with the trend?
Cheers,
canaussieuck
12th-June-2007, 04:39 PM
Hi Wayne, this is just an exercise on "drawdown" that is in the book.
I realise that the function is in hindsight and generates perfect buy and sell indicators, is that what you mean by dynamic? Changing with the trend?
Cheers,
BTW folks, got my arrows to work...on my work lappy they wouldn't show the buy and sell arrows...turns out i had to do this.......took me all day to find it!
canaussieuck
12th-June-2007, 04:42 PM
On another issue, i still cannot get my ASX200 watchlist to work as a filter.
Watchlists will work as a filter on my older version at work though, maybe its another beta issue?
Also, how do i take a text file of 600 stocks and make a watchlist out of that?
Cheers,
kaveman
12th-June-2007, 04:44 PM
You had written the plotshapes incorrectly. You must include all the inputs to tell it where to plot them
No, thats the thing, the same code worked fine at home, but not at work, turns out it was just the price properties:)
Thanks for the reply though Kaveman....Say, whats your opinion of PatternExplorer?
Cheers,
mrWoodo
12th-June-2007, 05:05 PM
profit based sell rule
I understand how to write buy/sell rules based on technical indicators. However, could someone explain how to write a sell condition that is based solely on percent profit and not on a technical indicator? I tried running a backtest with a technical 'buy=' condition, but without a 'sell=' condition, and just specifying a profit target in the settings, but the backtester won't run. error "missing short/cover variable assignment"
Question prob a bit old, did you get this running?
I think all you need is a Sell=0;
It will declare it and your formula will never raise a sell condition, but if you set the backtester's profit stop %, that will be used instead.
GreatPig
12th-June-2007, 05:07 PM
i still cannot get my ASX200 watchlist to work as a filter
You mean for doing an exploration or backtest? Works fine for me, with 4.95 Beta, just the same as it used to. Don't think I had to set anything for that.
how do i take a text file of 600 stocks and make a watchlist out of that?
Try Symbol -> Watchlist -> Import. Export an existing watchlist first to see what format the file should be in.
GP
canaussieuck
12th-June-2007, 05:47 PM
You mean for doing an exploration or backtest? Works fine for me, with 4.95 Beta, just the same as it used to. Don't think I had to set anything for that.
Try Symbol -> Watchlist -> Import. Export an existing watchlist first to see what format the file should be in.
GP
Thanks GP!
R0n1n
13th-June-2007, 09:42 AM
canaussieuck, I got the ASX200 and the list of IGmarkets traded stocks in .tls format. lemme know if you want it.
Slick Rick
13th-June-2007, 01:46 PM
Still no luck - I think I am going crazy.
Using the import wizard, Amibroker correctly adds all of the symbols, but doesn't add any of the price or volume data.
This is .csv format from the float website. What am I missing here :banghead:?
canaussieuck
13th-June-2007, 01:51 PM
canaussieuck, I got the ASX200 and the list of IGmarkets traded stocks in .tls format. lemme know if you want it.
Thanks Ron1n, got it to work last nite...all my watchlists are working now.
I'm looking good for next week!
Slick Rick, hang in there, gotta be someone using Float.com and AB here. I know its frustrating!
Wish i could help, but i use Premium Data and once i figured it out it works a charm.
Cheers,
GreatPig
13th-June-2007, 03:09 PM
See message #103 earlier in this thread for the import format file I use for float.com.au. Try using this instead of the import wizard.
GP
gone2rio
13th-June-2007, 04:28 PM
Tried posting this on another thread but it sunk like a stone.
Can anyone recommend analysis software for the Apple? Checked Amibroker and it wont run on Apple OSX unfortuntely.
Can't believe I'm the only one in the room working on a Mac...am I...hello...
Shane Baker
13th-June-2007, 04:43 PM
Hello, hello, is there anyone out there?
:D
Anyone mention Parallels??? Then you can run whichever software you want.
Cheers
Shane
gone2rio
13th-June-2007, 04:49 PM
Have had issues with emulation software Shane.
Was looking for anyone who was using an analysis product that is written for the OSX platform.
mrWoodo
13th-June-2007, 05:02 PM
Anyone mention Parallels??? Then you can run whichever software you want.
Yep, I'm running Amibroker thru Parallels, on a MacBook - Never had any problems with it
julius
24th-June-2007, 04:24 PM
I'v been trying to produce an indicator that plots pivot point levels for one period based on the previous three periods - then applied on the daily time frame. ie. The support and resistance levels for each day within the week are the same and are based on the High, Low and Close of the previous three weeks.
These are the basic calculations, but I'm having difficulty defining the time function such that the levels are static throughout the week/period;
P = (Ref(H,-1)+Ref(L,-1)+Ref(C,-1))/3;
R1 = (2*P)-Ref(L,-1);
S1 = (2*P)-Ref(H,-1);
R2 = P +(R1 - S1);
S2 = P -(R2 - S1);
I tried using TimeFrameSet(3*InWeekly) but it still seems to calculate the levels for each day based on the previous 15 days. HHV & LLV didn't seem to work either.
Thanks in advance.
julius
25th-June-2007, 03:30 PM
Worked it out - hardly elegent, but the plot seems correct.
Just a question on writing code, how does one learn it? Does ami use different code to others?
tcoates
2nd-July-2007, 08:50 AM
Snake - there are subtle differences between amibroker and other scripting languages. amibroker code is a cross between c (style wise) and asp (vb without the declarations). as for the library of available functions that is a case of having to lookup the help files. there are similarities to metastock with functions like Ref()...
H > Ref(H, -1)
would (?) be the same in both. if you want to learn the amibroker language, have a look at the traders tips
you will see the date (052005) in the above url, just change to whatever month/year you are interested in.
Tim
GreatPig
2nd-July-2007, 08:53 AM
Depends a bit on how your general programming skills are, but for a start read the AmiBroker help covering the basics and then start trying to code something very simple (eg. some moving averages). You'll likely spend a fair bit of time learning what functions are available and how to use them.
I'd suggest first doing a simple indicator, then gradually building it up with more complicated things to get familiar with the functions. Once you're comfortable with that, try a simple exploration, then a backtest (eg. a simple moving average crossover system).
Once you pretty comfortable with all that, then you can look at more advanced things like scaling trades, looping, and custom backtests.
And if you get stuck with anything, ask questions either here or on the AmiBroker Yahoo forum.
Cheers,
GP
canaussieuck
2nd-July-2007, 09:11 AM
Depends a bit on how your general programming skills are, but for a start read the AmiBroker help covering the basics and then start trying to code something very simple (eg. some moving averages). You'll likely spend a fair bit of time learning what functions are available and how to use them.
I'd suggest first doing a simple indicator, then gradually building it up with more complicated things to get familiar with the functions. Once you're comfortable with that, try a simple exploration, then a backtest (eg. a simple moving average crossover system).
Once you pretty comfortable with all that, then you can look at more advanced things like scaling trades, looping, and custom backtests.
And if you get stuck with anything, ask questions either here or on the AmiBroker Yahoo forum.
Cheers,
GP
Great advice GP. AFL is taking me longerthan i thought to learn. It requires a degree of concentration that i find difficult to maintain in China!
Cheers,
It's Snake Pliskin
2nd-July-2007, 12:53 PM
Thanks for the replies everyone.:)
Sir Burr
11th-September-2007, 05:49 PM
Hi,
Having a bit of trouble trying to workout (through the tradelog) if this code is the correct way. Think it may not.
Sell = sellsignal OR Cross(Equity(),HHV(Ref(Equity(),60),-1)-30000);
I want to sell all of the stocks if the equity drops through $30,000. Is the above OK or should this be done with the Amibroker Custom Backtester?
Thanks, SB
GreatPig
11th-September-2007, 07:18 PM
No, that won't work. It's the common Equity function mistake where you have a chicken and egg thing happening.
The Equity function calculates the equity line based on your buy and sell signals. It does the whole array in one call to Equity, so you can't use the results to then go back and modify your buy and sell signals, otherwise you'd end up with an iterative loop, setting buy/sell, calculating equity, modifying buy/sell, calculating equity again, etc.
You could probably do this using a loop though, calling the Equity function within the loop at each bar to figure out what to do for the next bar. However, using the custom backtester interface should be more efficient, since then you're not recalculating a whole array for each bar.
And if you sell everything when your equity reaches that level, what signal would you use to start buying again, or would you consider yourself out of the game at that point?
Cheers,
GP
Sir Burr
11th-September-2007, 07:37 PM
Thanks GP, saves me wasting anymore time on it. Cheers.
what signal would you use to start buying again
Just wanted to backtest a fixed capital loss as an exit. I'd re-enter with normal buy signal depending on a market indicator.
Yes, I guess it maybe digging a deeper hole - just backtesting!
SB
buggalug
13th-September-2007, 04:36 PM
Hey guys,
Anyone know how to do these?
1. Raise your stop loss to breakeven after a certain % profit?
2. Sell everything when drawdown hits a certain %?
Cheers
julius
9th-October-2007, 11:31 AM
Hi All,
I'v been trying to figure out how to use quarterly and yearly timeframes (bars) in Amibroker.
I thought 3*inMonthly would work, but the bars don't seem to line up correctly with the start of the month.
Appreciate any help. :)
It's Snake Pliskin
10th-October-2007, 03:56 PM
Where is the scan function found on Ami?
There seems to be a lot of mumbo jumbo in the program. I am looking for the word SCAN if it is at all in the program. Could somebody help please?
buggalug
10th-October-2007, 04:04 PM
Where is the scan function found on Ami?
There seems to be a lot of mumbo jumbo in the program. I am looking for the word SCAN if it is at all in the program. Could somebody help please?
I think you want Analysis->Automatic Analysis.
It's Snake Pliskin
10th-October-2007, 11:15 PM
I think you want Analysis->Automatic Analysis.
Thanks for that Bug.:) I found it.
nizar
22nd-October-2007, 11:36 PM
Hi,
Has anybody used the intraday backtesting function on AmiBroker?
Any comments/opnion?
And, What programming language does Amibroker use?
Is it C+ or C++ or C# or something else?
I mite get a copy of this, and a computer whiz mate to write the codes for me.
For <$300 you cant go wrong and it seems it can do what i require of it.
Thanks.
canaussieuck
22nd-October-2007, 11:45 PM
Hi,
Has anybody used the intraday backtesting function on AmiBroker?
Any comments/opnion?
And, What programming language does Amibroker use?
Is it C+ or C++ or C# or something else?
I mite get a copy of this, and a computer whiz mate to write the codes for me.
For <$300 you cant go wrong and it seems it can do what i require of it.
Thanks.
AB uses AFL or Amibroker Formula Language...FWIW my GF says it closer to Visual Basic than anything, but its original.
Cheers,
GreatPig
23rd-October-2007, 09:02 AM
AFL is very similar to C in many respects, but there are significant differences. AFL's ability to handle array mathematics in much the same fashion as single number mathematics is one of the main differences.
And if you want to write your code as a plugin, then you can use ordinary C/C++.
GP
canaussieuck
23rd-October-2007, 09:15 AM
AFL is very similar to C in many respects, but there are significant differences. AFL's ability to handle array mathematics in much the same fashion as single number mathematics is one of the main differences.
And if you want to write your code as a plugin, then you can use ordinary C/C++.
GP
So its not similar to VB at all????
So if i can study the concept of C+ and C++ will it allow me to grasp the concept of AFL more quickly? Or should i just use AFL more?
Cheers,
tcoates
23rd-October-2007, 09:34 AM
As a programmer I would suggest that if you want to learn AFL then use AFL.
Now if you want to compare AFL to other languages...
* layout is SIMILAR to C (but so is javascript and php)
* does not have pointer as such as therefore similar to java or other languages that use garbage collection functions (if required)
* use of revered word "function" is same as pascal
* ability to use ActiveX stuff is same as VB (Delphi, etc.)
* arrays are 0..n-1 (as per C/javascript etc.)
many of the scripts that come with Amibroker or downloaded are wscript or cscript or jsscript based. So my suggestion would be to look at javacript, as I think that you would find it easier than C/C++/C#)
Tim
GreatPig
23rd-October-2007, 02:20 PM
So its not similar to VB at all????
Sorry, I don't know. I never use VB.
GP
canaussieuck
23rd-October-2007, 02:33 PM
Thanks GP and TC!
Cheers,
buggalug
30th-October-2007, 06:45 PM
Does anyone know if I can change the font of a specific text made with the text tool? I don't mean the global settings, I mean write some text in size 12 and some in size 14.
Cheers!
julius
6th-November-2007, 07:41 PM
Does anyone have any idea how to create quarterly bars / arrays?
3*InMonthly doesn't work - the quarters don't line up with the start of the month.
I'd be very grateful for any help or suggestions.
Chorlton
10th-November-2007, 06:59 PM
Hello All,
Being relatively new to AB, I would welcome some help... :confused:
Basically, I've got a number of conditions which make up an "entry" signal and would like to know what the easiest way is on how I can plot this signal on a chart. ie. with the use of Arrows for example.
At the moment I just want to eyeball the results for the entry. Depending on how it performs, I will then look to add it to a system and test it further.
Any help much appreciated....
Chorlton
Sir Burr
10th-November-2007, 07:29 PM
like to know what the easiest way is on how I can plot this signal on a chart. ie. with the use of Arrows for example.
Am I right in assuming that I just add the above to the bottom of my current code or should this be plotted as a different indicator?
Chorlton
10th-November-2007, 08:29 PM
Hi SB,
Thanks for the prompt reply.
Am I right in assuming that I just add the above to the bottom of my current code or should this be plotted as a different indicator?
SB,
Disregard the above question.... I tried adding the code to my existing code without success but realised I had made a mistake with it.
All sorted now....... :o
Thanks again..................
Chorlton
10th-November-2007, 08:48 PM
Hello All (again!!),
I've just created a simple system with Buy & Sell signals. I've plotted these on the chart as Buy/Sell arrows (thanks to SB for that bit of code!!).
Looking at the signals on the chart, currently every occurance of a Buy signal is shown.
However, what I'd like to do is have the FIRST occurance of the Buy signal shown differently.
That way when eyeballing the chart its clear as which point a trade would be entered after exiting a previous trade (1st new Occurance) and also when the system would allow me to add to my current position (all other Buy occurances prior to a new Sell signal appearing).
Does anyone else do something similar and if so, what additional code would I need to add?
Any help much appreciated,
Chorlton
PS. I am making my way through the 900 page manual...albeit slowly!!!!
btw: The more I play around with AB, the more I like it. The latest thing that has impressed me is the Formula Editor. Not only is it intuitive as you type but the Syntax Verifier is a great tool too.... especially for non-programmers....
Kind Regards,
Chorlton
Chorlton
10th-November-2007, 11:57 PM
Hi,
With regard to the Ref() function in AB, is there any way to pass a variable into it rather than using a specific value?
For example:
Rather than writing Ref(Close,-10), I want to write Ref(Close,-x) where x has been defined earlier in my code.
Thanks in advance,
Chorlton
Sir Burr
11th-November-2007, 06:23 AM
From the users guide...
Functions accepting variable periods
The following functions support variable periods (where periods parameter can be array and change from bar to bar):
AMA
AMA2
DEMA
HHV
HHVBars
LinRegSlope
LinearReg
LinRegIntercept
LLV
LLVBars
MA
Ref
StdErr
TEMA
TSF
WMA
GreatPig
11th-November-2007, 09:06 AM
Chorlton,
Usually the quickest way to get an answer to that sort of question is trial and error. Just try it and see if it works.
Cheers,
GP
Chorlton
11th-November-2007, 09:44 AM
Chorlton,
Usually the quickest way to get an answer to that sort of question is trial and error. Just try it and see if it works.
Cheers,
GP
Hello,
To be honest, I did have a go at trying a few options but for some reason it didn't work. What I didn't do was check the manual in more detail. Given the size of it, I just did a search for Ref() function in the Help and read the basic definition of it. I realise that I do need to read the manual from cover to cover though but am just trying to read it when required :(
Anyway, In my code when I substitute the variable in my ref() function for a actual value then the code works!!??!!! Thats what has confused me...
Here's my code:
x = IIf(H == HHV(H, 30), 1, 0);
y = BarsSince(x);
y = y*-1;
Buy1 = x AND RSI(15) > Ref(RSI(15),y);
Buy2 = x AND RSI(15) > Ref(RSI(15),-5);
The Buy2 signal plots with no problems but Buy1 won't. I assumed it was because of the variable y in the Ref function.
I'll try a few other options........
Thanks....
Sir Burr
11th-November-2007, 10:07 AM
Chorton,
Not sure if the timing is right but best advice is to use the Plot() command to view each part of your code.
x = IIf(H == HHV(H, 30), 1, 0);
//Plot( x, "x", colorBlue, styleLine);
y = BarsSince(x);
y = IIf( (Ref( y, -1) > 0 AND y == 0), Ref( y, -1), 0);
Plot( y, "y", colorYellow, styleLine);
z = Param( "delay", 5 , 1, 50, 1);
Buy1 = x AND AccDist() > Ref(AccDist(), -y);
Buy2 = x AND AccDist() > Ref(AccDist(), -z);
Also, right click on the chart and play around with the Buy2 delay using "Parameters". :)
SB
Sir Burr
11th-November-2007, 11:00 AM
Hehe, yeah the first IIF isn't needed :p:
Chorlton
11th-November-2007, 10:22 PM
SB,
I think i've managed to get my code working. To be honest, I'm not sure what I did to fix it :confused: but at least the buy signals are now showing... :)
Out of interest could you elaborate on the idea of using the Delay function for debugging purposes. Just interested in your thinking behind it :)
All the best...
Chorton,
Not sure if the timing is right but best advice is to use the Plot() command to view each part of your code.
x = IIf(H == HHV(H, 30), 1, 0);
//Plot( x, "x", colorBlue, styleLine);
y = BarsSince(x);
y = IIf( (Ref( y, -1) > 0 AND y == 0), Ref( y, -1), 0);
Plot( y, "y", colorYellow, styleLine);
z = Param( "delay", 5 , 1, 50, 1);
Buy1 = x AND AccDist() > Ref(AccDist(), -y);
Buy2 = x AND AccDist() > Ref(AccDist(), -z);
Also, right click on the chart and play around with the Buy2 delay using "Parameters". :)
SB
Sir Burr
12th-November-2007, 06:22 PM
Out of interest could you elaborate on the idea of using the Delay function for debugging purposes. Just interested in your thinking behind it
Elaboration is the chart. Add a comparison:
y = BarsSince(x);
Plot( y, "y", colorRed, styleLine); // compare this
y = IIf( (Ref( y, -1) > 0 AND y == 0), Ref( y, -1), 0);
Plot( y, "y", colorYellow, styleLine); // with this
Even if it is not what you wanted you'll see yourself.
Be interesting to know if your green signals lined up with the above or not.
pan
12th-November-2007, 07:06 PM
ok, im very new to amibroker and need to know a few basics..
how to i get up shares eg. oxiana.
and get up watchlists
Sir Burr
12th-November-2007, 08:17 PM
Hi Pan,
how to i get up shares eg. oxiana.
Oxiana is such a tricky one. I find it needs some persuasion and in this case rather than gentle, try some harsh. This little devil is so slippery that it often sneaks under the radar and I'm totally at a loss what to do sometimes with OXR. Makes me sooooo mad!!!
and get up watchlists
Ohh that's easy, try placing the mouse over the Amibroker icon and slowly (very slowly) moving it top to bottom. A tip is to be gentle trying to keep this motion as steady as possible. If you find the midpoint click it as quick as you can.
Once finished, have a look here (http://www.amibroker.com/guide/tutorial.html).
Chorlton
13th-November-2007, 09:13 PM
Hello All,
I've recently coded an my own indicator for a stop loss and would like to reference it in a system that I am developing rather than re-writing the code again.
Does anyone know how I can do this?
I'm looking through the manual but its not obvious :confused:
Thanks in advance,
Chorlton
howardbandy
14th-November-2007, 04:13 PM
Hello All,
I've recently coded an my own indicator for a stop loss and would like to reference it in a system that I am developing rather than re-writing the code again.
Does anyone know how I can do this?
I'm looking through the manual but its not obvious :confused:
Thanks in advance,
Chorlton
Hi Chorlton --
Two possibilities come to mind --
1. Save the code in the /include subdirectory and have AmiBroker merge it into your new system with the #include directive. See page 120 of Quantitative Trading Systems.
2. Compile your stop loss as a dll, save it in the /plugins subdirectory, and call it whenever you need it. See Appendix A.
Will either of these work?
Thanks,
Howard
nizar
14th-November-2007, 05:04 PM
Hi Chorlton --
Two possibilities come to mind --
1. Save the code in the /include subdirectory and have AmiBroker merge it into your new system with the #include directive. See page 120 of Quantitative Trading Systems.
2. Compile your stop loss as a dll, save it in the /plugins subdirectory, and call it whenever you need it. See Appendix A.
Will either of these work?
Thanks,
Howard
Howard,
Welcome back.
Good to see you posting again.
Chorlton
14th-November-2007, 08:34 PM
Hi Chorlton --
Two possibilities come to mind --
1. Save the code in the /include subdirectory and have AmiBroker merge it into your new system with the #include directive. See page 120 of Quantitative Trading Systems.
2. Compile your stop loss as a dll, save it in the /plugins subdirectory, and call it whenever you need it. See Appendix A.
Will either of these work?
Thanks,
Howard
Thanks Howard,
I'll have a play and let you know if they work...... :)
All the best.....
julius
18th-November-2007, 06:01 PM
This is my attempt at writing code that will calculate the highest value of the last 3 quarters (9 months), at the start of each quarter
QuStart = ( Month()== ( 1 OR 4 OR 7 OR 10 ) ) AND ( Day() < Ref(Day(),-1) );
Hi = IIf(QuStart, Hi1, ValueWhen(QuStart,Hi1,1) );
Needless to say it doesn't work. Anyone got any suggestions ? Please :banghead:
Chorlton
22nd-November-2007, 07:28 PM
Hello All,
I have a quick question regarding the AUTOMATIC ANALYSIS feature in AB.
If I click on PROFOLIO BACKTEST (Default), when testing my system I get a list of trades together with the total Results values for the Overall Profit, CAR, MaxDD, #Winners, #Losers, etc., which is what I would expect to see.
However, when I choose the option INDIVIDUAL BACKTEST, even though I get the complete list of all trades, the total Results for Overall Profit, CAR, MaxDD, #Winners, #Losers, etc all show 0.
Is this suppose to happen?
Any help much appreciated....
Chorlton
Sir Burr
22nd-November-2007, 07:48 PM
INDIVIDUAL BACKTEST
A quick look in help comes back with...
AA Settings -Report Tab
Generate detailed reports for individual backtests
This causes that in Individual backtest mode full report is generated and stored for every security under test. Note that this will slow down the test and take up quite a bit of hard disk space
Chorlton
22nd-November-2007, 08:52 PM
A quick look in help comes back with...
AA Settings -Report Tab
Generate detailed reports for individual backtests
This causes that in Individual backtest mode full report is generated and stored for every security under test. Note that this will slow down the test and take up quite a bit of hard disk space
Hi SB,
I appreciate your reply and I also took a look at the manual but I couldn't find an answer to my specific question so hence the post.
When choosing [Individual backtest], I receive a detailed report as I expected but I assumed that the collective results for all the trades would also have been displayed at the bottom of the window. ie. #wins, #losses, etc etc.
For those who use AB, I'm just after some clarification as to whether this is correct.
I'd be interesed
Sir Burr
22nd-November-2007, 09:28 PM
For those who use AB
Yes, never used Individual Backtest before - does it show? :D
Just ran it and same as you.
If you want all trades with stats you could use Portfolio and add:
SetOption( "MaxOpenPositions", 1000000 );
SB
Chorlton
26th-November-2007, 08:56 PM
Hello All,
With reference to Backtesting, AB offers many, many statistics as part of the Results of a BackTest. CAR, RAR, MaxDD, Recovery factor, Sharpe ratio, CAR/MDD, RAR/MDD, Profit Factor, Payoff ratio, etc etc to name but a few !!!! :eek7:
As a result, I've after some suggestions from those who are experienced with both AB and System Development, as to which ones I should really focus on.
I appreciate that some of this is down to the individual but any general guidance would be most welcome.
So far, I've only really been concentrating on MaxDD, Sharpe Ratio, % Profit, # of Trades.
All comments welcome :)
Sir Burr
26th-November-2007, 10:10 PM
ones I should really focus on.
Equity curve presentation
# of Trades
SB
howardbandy
27th-November-2007, 12:35 AM
Hello All,
With reference to Backtesting, AB offers many, many statistics as part of the Results of a BackTest. CAR, RAR, MaxDD, Recovery factor, Sharpe ratio, CAR/MDD, RAR/MDD, Profit Factor, Payoff ratio, etc etc to name but a few !!!! :eek7:
As a result, I've after some suggestions from those who are experienced with both AB and System Development, as to which ones I should really focus on.
I appreciate that some of this is down to the individual but any general guidance would be most welcome.
So far, I've only really been concentrating on MaxDD, Sharpe Ratio, % Profit, # of Trades.
All comments welcome :)
Hi Chorlton --
I know you have a copy of Quantitative Trading Systems. Reread the parts that talk about defining your own objective functions.
The purpose of defining your own objective function is so that you will have confidence that the systems that rank best when you go through the walk-forward process are ones you will be comfortable with.
Thanks,
Howard
Chorlton
27th-November-2007, 10:39 AM
Hi Chorlton --
I know you have a copy of Quantitative Trading Systems. Reread the parts that talk about defining your own objective functions.
The purpose of defining your own objective function is so that you will have confidence that the systems that rank best when you go through the walk-forward process are ones you will be comfortable with.
Thanks,
Howard
Hi Howard,
Many Thanks for your comments...
I did create a basic outline of what I expected from my system but I will re-read those sections again to ensure that I have fully understood everything.
If I sit down and analyse things, I think the main reason for my recent questions is simply as a result of "information overload" !!
In the past when I was reading other posters threads on this subject, the basic outline of the steps involved seemed (dare I say it) relatively straightfoward & easy. However, as one digs below the surface and into the detail, it soon becomes obvious how many different factors "may" need to be considered.
As a recent example, when I took a look at the vast list of available backtesting statistics within AB, (some of which I've never even heard of before), I became concerned that I wasn't taking everything into account.
As a general note for anyone reading this post, who is just starting out on this journey, take my advice and be careful of this "information overload" otherwise you will very quickly start getting yourself into all kinds of problems which I think I am beginning to now do......