Amibroker FAQ | Aussie Stock Forums

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

Friday = DayOfWeek()==5;
FridayHigh = ValueWhen( Friday, H, 1 );
Plot(C,”Close”,colorGrey50,styleBar);
Plot(FridayHigh,”Friday High”,colorRed,styleStaircase|styleNoRescale);
PlotShapes( shapeStar*Friday,colorGreen,0,H,10);
LastFridayHigh = LastValue(FridayHigh);
Filter=1;
AddColumn(FridayHigh,”All Friday”,1.3);
AddColumn(LastFridayHigh,”Last Friday”,1.3);

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

ApplyStop(stopTypeTrailing, stopModePoint, 3*ATR(14), True, True );

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

one way would be, provided you had buy signals

mult= Param( “Enter ATR Multiplication Value”, 1, 10, 3 );
ap = Param( “Enter ATR Lookback”, 5, 50, 21 );
Chand = highestsince( buy, C-mult*ATR(ap) );

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

mult= Param( “Enter ATR Multiplication Value”, 1, 10, 3 );
ap = Param( “Enter ATR Lookback”, 5, 50, 21 );
Chand = C-mult*ATR(ap);
Stop[0] = L[0];

for(i=1;i<BarCount;i++)
{
if( Buy )
{ Stop = Chand; }
else
{ if ( chand > Stop[i-1] )
{ Stop = Chand; }
else
{ Stop = Stop[i-1]; }
}
}

Sell = Cross(Stop,C);

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

Be the first to comment

Leave a Reply

Your email address will not be published.


*