PureBytes Links
Trading Reference Links
|
Try this, it looks back to the 4th occurence of not inside days, this
includes the current bar which is assumed that inside day could not
provide a sell signal
Countbars = barindex() - valuewhen( inside()==0, barindex(), 4 );
sell = C < ref( llv( L, countbars ), -1 );
--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm
On 12/27/05, sslack88 <jzzpiano88@xxxxxxxxxxx> wrote:
> Does anyone know how to code the following?
>
> I want to create a BUY signal based on this pattern:
>
> BUY when today's close (C) is above yesterdays close.
>
> SELL when the Close is below the Lowest Low Value (LLV) of the past
> (3) days
>
> * Ignore all Inside (INSIDE) days. (this is the hard part).
>
> Inside days is the tricky part. Here is an example,
>
> Bar 1 = Todays Close
> Bar 2 = Yesterday Close
> Bar 3, etc.
>
> Day 1 Bar 1, Low 1100
> Day 2 Ignore, Inside Day
> Day 3 Bar 2, Low 1080
> Day 4 Bar 3, Low 1070
>
> Day 2 is ignored because it is an inside day. Therefore, the three
> bar pattern is calculated using (4) days. If there were (2) inside
> days we would use (5) days, etc. The SELL would be set at 1070 in
> this example.
>
> Let me know if you need more infor. Thanks!
>
>
>
>
>
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|