[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Re: [amibroker] Channel Breakout - Exrem problem.



PureBytes Links

Trading Reference Links

Thanks as always Tomasz !

Original Message:
-----------------
From: Tomasz Janeczko tj@xxxx
Date: Sun, 22 Apr 2001 20:35:30 +0200
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Channel Breakout - Exrem problem.


<html><body>
<tt>
Hi Geoff,<BR>
<BR>
Thank you for posting the formula.<BR>
<BR>
As for ExRem() - it needs a valid sell rule to work.<BR>
You can not use it is when sell condition is always FALSE<BR>
(sell = 0 ) as in your example.<BR>
<BR>
ExRem( triggerarray, resetarray ) works as follows:<BR>
<BR>
1. returns true on first bar that is true on trigger array<BR>
2. returns false until there is a non-zero value in the second array<BR>
3. repeat step 1<BR>
<BR>
triggerarray = <BR>
0,1,1,1,1,0,1,1,0,0,0,0,1,1,0,1,0<BR>
resetarray =  <BR>
0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0<BR>
ExRem()     =  <BR>
0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0 <BR>
<BR>
<BR>
Best regards,<BR>
Tomasz Janeczko<BR>
===============<BR>
AmiBroker - the comprehensive share manager.<BR>
http://www.amibroker.com<BR>
<BR>
<BR>
----- Original Message ----- <BR>
From: <gmulhall@xxxx><BR>
To: <amibroker@xxxxxxxxxxxxxxx><BR>
Sent: Sunday, April 22, 2001 11:23 AM<BR>
Subject: [amibroker] Channel Breakout - Exrem problem.<BR>
<BR>
<BR>
> Folks,<BR>
> <BR>
> Attached is a variation on Tomasz's breakout code. This avoids the <BR>
> problem of having to specify a percentage threshold as it uses the <BR>
> average true range to dynamicaly determine if there has been a <BR>
> breakout.<BR>
> <BR>
> There is also code to ensure you are only looking at a stock which is <BR>
> outperforming it's index and that index is out performing the whole <BR>
> of market index (XAO - All ordinaries in Aust). <BR>
> <BR>
> It's simple but pretty effective. The idea comes from Chris <BR>
> Tate's 'The Art of Trading' Wrightbooks.<BR>
> <BR>
> I still find exrem removes buy signals which I'm not expecting it to. <BR>
> Any ideas anyone. <BR>
> <BR>
> Tomasz ??<BR>
> <BR>
> Geoff<BR>
> <BR>
> <BR>
> /* Breakout  - Afl implementation by Geoff Mulhall 18/4/2001 */<BR>
> <BR>
> dollars = 5000;<BR>
> <BR>
> range = 20;<BR>
> maLong = 150;<BR>
> maShort = 13;<BR>
> maRelStr = 2;<BR>
> <BR>
> /* sufficient liquidity ie share purchased less than 2% of weekly <BR>
> volume*/<BR>
> <BR>
> cond1 = dollars/close < 0.02 * sum(volume,maLong)/(maLong/5);<BR>
> <BR>
> /* Breakout Criteria */<BR>
> <BR>
> channeltop = ref(hhv(high,range), -1);<BR>
> channelbottom = ref(llv(low,range),-1);<BR>
> oneAtr = ref(atr(range),-1);<BR>
> <BR>
> cond2 = close > channeltop + oneAtr; <BR>
> <BR>
> /* one white soldiers detected */<BR>
> <BR>
> cond3 = close > open; <BR>
> <BR>
> /* gradient of the relative strength is increasing compared to its <BR>
> index  */<BR>
> <BR>
> cond4 = ma(relstrength(""), maRelStr) >= ref(ma(relstrength(""), <BR>
> maRelStr), -1 * maRelStr);<BR>
> <BR>
> /* relative strength of the stocks index is increasing compared to <BR>
> XAO*/<BR>
> <BR>
> indexStr = relstrength("XAO")/relstrength("");<BR>
> <BR>
> cond5 = ma(indexStr,maRelStr) >= ref(ma(indexStr, maRelStr), -1 * <BR>
> maRelStr);<BR>
> <BR>
> buy = cond1 AND cond2 AND cond3 AND cond4 AND cond5;<BR>
> <BR>
> sell = 0; <BR>
> <BR>
> /* buy = exrem(buy,sell); */ <BR>
> /* sell = exrem(sell,buy); */<BR>
> <BR>
> <BR>
> <BR>
>  <BR>
> <BR>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ <BR>
> <BR>
> <BR>
<BR>
</tt>

<br>

<!-- |**|begin egp html banner|**| -->

<table border=0 cellspacing=0 cellpadding=2>
<tr bgcolor=#FFFFCC>
<td align=center><font size="-1" color=#003399><b>Yahoo! Groups Sponsor</b></font></td>
</tr>
<tr bgcolor=#FFFFFF>
<td width=470><br>Click Hereto Find Software Faster</td>
</tr>
<tr><td><img alt="" width=1 height=1 src="http://us.adserver.yahoo.com/l?M=162801.1342250.2934640.1280005/D=egroupmail/S=1700007389:N/A=599089/rand=143630832";></td></tr>
</table>

<!-- |**|end egp html banner|**| -->



<br>
<tt>Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service</tt>
</br>

</body></html>

--------------------------------------------------------------------
Mail2Web - Check your email from the web at
http://www.mail2web.com/ .