PureBytes Links
Trading Reference Links
|
Same day stop exit would be hard to back test using daily data unless you use entry at open. If you don't, there is no way to know whether your entry or the stop is hit *first* on a daily bar. I think that's the reason why trailing stop doesn't support same day exit. If you do use entry at open, you can certainly simulate the trailing stop yourself using your own code instead of ApplyStop().
----- Original Message -----
From: jlami11
To: amibroker@xxxxxxxxxxxxxxx
Sent: Tuesday, November 07, 2006 10:58 AM
Subject: [amibroker] Entry, exit and ATR trailing stop
Hello,
I've written some coding to enter Long or short for moving avg
cross-overs. i.e.
Buy= Cross(ShortMA, LongMA); Short = sell;
Sell= Cross(LongMa, ShortMa); cover = buy;
The other exit is a ATR trailing stop. But the problem is: When I make
trailing stop real tight e.g. 0.2, 0.1*ATR, and im hanging it from
prev. day's high,(exiting if today's low is below trail stop). The
day i get signal to Enter, (for some trades) the entire days range or
at least the low is already below the stop.
When this occurs i think the backtester doesn't even enter the trade,
since i seem to be missing some trades, compared to when trail stop is
3*ATR. Is this the case?
I wanted to have it at least enter and exit trade on the same day,not
just skipping them, for comparative purposes in testing exits.
Anyone know how to do this?
I also realized all the chandelier exits that are in the library do
not work "properly" according to Chuck lebeau's method.
They either allow the exits to move down (long trades) i.e. as ATR
expands.
Or When getting highest value of trail stop since Entry, gets
refreshed each time a redundant buy signal appears. So it gets highest
trail stop since the redundant signal, allowing a shift down in trail
stop.
The Chandelier plugin mentioned i think does not allow you to specify
where to hang trail (i.e. from high or low). If long i think it only
hangs from High etc. (pls correct me if im wrong)
Having said all that does anyone have code of a "proper" chandelier
exit according to chuck lebeau? If so do you mind showing me, i think
my code does it except for problem about the tight ATR stops
(beggining of post).
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.11/542 - Release Date: 11/20/2006
|