Australian (ASX) Stock Market Forum

Amibroker FAQ

Any geniuses able to translate this into Amibroker code? I want a 5% trailing stop to kick in on all open positions when the 200 day EMA of the XAO crosses below the XAO price. Then the stop should disappear when the EMA crosses back above. Any ideas?
 
This is what I did. Whether it's correct or not I'm not yet sure -

XAOidx = Foreign("XAO","Close",0); // get value
Sellfilter=IIf (XAOidx < EMA(XAOidx,200), 1,0);

sell = (your code) OR OR (Sellfilter AND Cross(C,Ref(.95*C,-1)));
 
That didn't go to well
pre DST the charts open @ 9.30 and today it is 10.30am

I wish Amibroker had a configuration in the timeshift feature to change it after a particular day
amibroker daylight saving crap.png
 
I have the foreign referenced ticker symbol in the database being referenced. For example I have ^AORD & ^GSPC as ticker symbols in my All Ords stock list.
If you don't have the ^AORD symbol data in your database the backtest won't return any trades.

Thanks Wysiwyg. I learnt this the hard way :eek:
 
Anyone else using Amibroker with US intraday data, I am just wondering how does Amibroker handle daylight savings.

According to this post
http://www.purebytes.com/archives/amibroker/2009/msg03538.html
, esignal uses UTC, so us going through DST should not affect it. But when the US goes through DST, it will affect us because their time relative to the UTC will shift.

I don't use US intraday data.

Look under: File, Database settings, Intraday Settings
Hope this is of some help.
 
Hi,

I am just getting to grips with AB and I am trying to figure out how to effectively use it to manage my trading. I am intending to develop a mechanical based EOD system against the ASX 300 and what I would like to happen is that each day I run the system and it tells me what to buy/sell. I have been trying to figure out whether I should be using Exploration or BackTesting.

I think I have found the answer on one of the yahoo groups

"If you are running a more complicated portfolio system with multiple instruments, rankings, scale-ins,etc, your best bet is to always backtest from a specific date (date that you started the system). Select "add artificial bar" under "portfolio" tab of the AA window to show you tomorrow's trades. That way you let the backtester do the sorting and position calculations and you just "sync" to the current positions."

Is the above approach generally what people do when mechanical trading EOD stocks using AB?

Thanks in advance
 
....regarding the above post, I just found this description of range candlesticks on QT support website. Can anyone help with code please?

--------------------------------------------------------------------------
range bars are "price" defined bars...as opposed to time based bars or volume based bars...

each bar is defined by the range of price you select...

if you select 1, then the hi/lo of the bar will only be within a "range" of 1...all bars will only be "1" tall....

once the price range you selected is reached the next "tick" outside that "range" will start a new bar...

the chart won't "move", until the price moves....for example: it could stay on the same bar, no matter the volume, all day
 
Is ther a way to draw a channel with "quarter lines" in it? (which I can then use to determine more clearly oversold and overbought areas)

So this would be a the regular channel but with 3 equally spaced lines going through it (thus dividing it into quarters)
 
thanks josh. I was wanting it for daily bars, but I've since found out that's not how range bars work, on any platform - only intraday, as you say.

If anyone's interested, QT do a very good job of displaying range bars for the indices.
 
Range bars like Renko don't have a time component as you said. So way do you want range bars for daily? Doesn't make any sense to me.
 
Hi
Can someone please help me to write some code to say the following in Amibroker.

Todays close closed below yesterdays close and closed in the bottom half of the candle.

If thats not possible then something to say the the bar was a trending bar (Opening NEAR one end and closing Near the other and the range is at least 0.5%. (open to close)

This may not be possible because I cant find anything like it. Im trying to distinguish between a trending candle and a doji.


Is any of this possible?


Thanks
 
Hi
Can someone please help me to write some code to say the following in Amibroker.

Todays close closed below yesterdays close and closed in the bottom half of the candle.

If thats not possible then something to say the the bar was a trending bar (Opening NEAR one end and closing Near the other and the range is at least 0.5%. (open to close)

This may not be possible because I cant find anything like it. Im trying to distinguish between a trending candle and a doji.


Is any of this possible?


Thanks

Code:
Condition1 = C < Ref(C , -1); // todays close is less than yesterday's close
Condition2 = C < (H + L)/2; //close is lower than the middle of the bar

art27_condition = Condition1 AND Condition2;
 
Hi Capt
That did help somewhat but I need to alter it a bit.


Is it possible to write this then? Im trying to only exit on a trending bar (opens near one end and closes near the other but also the bar has to extend and close below yesterdays low by at least 0.5%.

"Closed lower than yesterdays low by 0.5%"

Is that possible?
 
Top