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

Re: [amibroker] Bow Tie



PureBytes Links

Trading Reference Links

I'm now a bit lost as to what your after.

Attached is my Bow Tie - which I think does the job - I've used the cross/hhv combination not hold.

There needs to be a bit of work in setting the scan lengths. I've guessed at what might be appropriate ie 20 days = maMedium in my code.

My scan picks up ABC on the ASX. I'm assuming you'll make this a buy when it closes above 0.55 again. ie closes above the high before the current pullback - and this is my assumption of the type of stock your after.

Geoff  


----- Original Message ----- 
From: David Holzgrefe 
To: amibroker@xxxxxxxxxxxxxxx 
Sent: Monday, May 14, 2001 9:44 PM
Subject: Re: [amibroker] Bow Tie


Thanks TJ just when I think I got the formula right ..
could a few of the ami users have a look at it and see if it displays as per the theory :
I checked it against a few quickly but im a bit cross eyed at the moment from starring at code ....

TJ I'll have play with you easy version tomorrow :))))

thanks again David
----- Original Message ----- 
From: Tomasz Janeczko 
To: amibroker@xxxxxxxxxxxxxxx 
Sent: Monday, May 14, 2001 9:11 PM
Subject: Re: [amibroker] Bow Tie


Hello David,

I looked at your formula at here is my comment:

cond1=cross (ma(close, 10 ),ema (close, 30));
cond2=ref(cross (ma(close, 10 ),ema (close, 30)),-1)>0;
cond3=ref(cross (ma(close, 10 ),ema (close, 30)),-2)>0;
cond4=ref(cross (ma(close, 10 ),ema (close, 30)),-3)>0;
cond5=ref(cross (ma(close, 10 ),ema (close, 30)),-4)>0;
cond6=ref(cross (ma(close, 10 ),ema (close, 30)),-5)>0;
cond7=ref(cross (ma(close, 10 ),ema (close, 30)),-6)>0;
cond8=ref(cross (ma(close, 10 ),ema (close, 30)),-7)>0;
cond9=ref(cross (ma(close, 10 ),ema (close, 30)),-8)>0;
cond10=ref(cross (ma(close, 10 ),ema (close, 30)),-9)>0;

condtrue=cond1 or cond2 or cond3 or cond4 or cond5 or cond6 and cond7 and cond8 and cond9;
All above statements could be replaced by a single:
condtrue = hold( cross( ma( close, 10 ), ema( close, 30 ) ), 10 );

There is no need for a magic with "reseting" back to false.

Best regards,
Tomasz Janeczko


----- Original Message ----- 
From: David Holzgrefe 
To: amibroker@xxxxxxxxxxxxxxx 
Sent: 14 May, 2001 11:58
Subject: Re: [amibroker] Bow Tie


so what i realy need is a way cancel the true if the condition becomes false

iff var0<1 then var1 = 0 ; ???
or something similar 
----- Original Message ----- 
From: Tomasz Janeczko 
To: amibroker@xxxxxxxxxxxxxxx 
Sent: Monday, May 14, 2001 7:21 PM
Subject: Re: [amibroker] Bow Tie


Hi,

In fact Steve's solution:

var0 = cross (ma(close, 10 ),ema (close, 30) ) ;
var1 = IIF(HHV(var0,-10) = 1,1,0) ;

is equivalent to

var1 = Hold( var0, 10 );

so var1 remains true if at least one "true" signal occured within previous 10 bars. 

Best regards,
Tomasz Janeczko
----- Original Message ----- 
From: Geoff Mulhall 
To: amibroker@xxxxxxxxxxxxxxx 
Sent: 14 May, 2001 10:06
Subject: [amibroker] Bow Tie


David,

I think Steve's second email is a good solution using Cross in conjunction with HHV - it allows you to look backward in time. 

I'll continue to play around as this scan it something I will use.

Tomasz,

Can you please confirm that the Hold condition sets the array to 1 forward in time the specified number of slots in the hold result array from the first position where it was set to 1 (ie true) ?

Thanks,

Geoff 
----- Original Message ----- 
From: David Holzgrefe 
To: amibroker@xxxxxxxxxxxxxxx 
Sent: Monday, May 14, 2001 10:07 AM
Subject: Re: [amibroker] ref 


ok I'm concerned that if the condition changes ami will still hold it true
even though it is now false using the hold()
."This true result is held true over the number of periods specified even if
a "false" result is generated. "


I don't wish to extend the condition forcing a false signal.
What I wanted was if condition x is meet then as long as its true look for
the next condition .
I guess you can see the intent in the bow tie formula.

has the ma10,ma20 ,ma30 crossed in the last xn days
if yes
has the pull back occurred
if yes
has the higher high occurred
if all 3 conditions are true then signal a buy

Geoff's multi condition does it but was looking for a cleaned way to
express it .
Maybe i just have to nest a bunch of conditions and if there true nest
another.

DOES THIS MAKE sense to anyone or is my logic out of sync

/* Bow Tie conditions - Short term moving average has crossed the long term
moving average sometime in the last xn days - Add more conditions for more
days */

cond1=cross (ma(close, 10 ),ema (close, 30));
cond2=ref(cross (ma(close, 10 ),ema (close, 30)),-1)>0;
cond3=ref(cross (ma(close, 10 ),ema (close, 30)),-2)>0;
cond4=ref(cross (ma(close, 10 ),ema (close, 30)),-3)>0;
cond5=ref(cross (ma(close, 10 ),ema (close, 30)),-4)>0;
cond6=ref(cross (ma(close, 10 ),ema (close, 30)),-5)>0;
cond7=ref(cross (ma(close, 10 ),ema (close, 30)),-6)>0;
cond8=ref(cross (ma(close, 10 ),ema (close, 30)),-7)>0;
cond9=ref(cross (ma(close, 10 ),ema (close, 30)),-8)>0;
cond10=ref(cross (ma(close, 10 ),ema (close, 30)),-9)>0;


SYNTAX hold( EXPRESSION, periods )
RETURNS ARRAY
FUNCTION Extends a "true" result of EXPRESSION for the specified number of
periods. This true result is held true over the number of periods specified
even if a "false" result is generated.
EXAMPLE hold( cross(rsi(14),70),5 )

----- Original Message -----
From: "Steve Wiser" <slwiserr@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, May 13, 2001 8:31 PM
Subject: Re: [amibroker] ref


> David:
>
> Check out the function "Hold". I think this will do what youare asking.
>
> Steve
>
>
> HOLD:
>
> SYNTAX hold( EXPRESSION, periods ) RETURNS ARRAY FUNCTION
>
> Extends a "true" result of EXPRESSION for the specified number of periods.
>
> This true result is held true over the number of periods specified even if
> a "false" result is generated.
>
> EXAMPLE hold( cross(rsi(14),70),5 )
>
>
> At 08:29 PM 5/13/01 +1000, you wrote:
> >TJ is there a way for ami to look for a condition true over xn periods
> >
> >eg
> >
> >ref(cross (ma(close, 10 ),ema (close, 30)),-10)>0;
> >
> >so that ami look for the true condition over the last 10 periods
> >no just 10 periods ago ?
> >
> >may have asked this before
> >
> >
> >Thanks David
> >
> >Your use of Yahoo! Groups is subject to the
> ><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


Yahoo! Groups Sponsor 
       
       

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


------=_NextPart_001_0077_01C0DCC2.5837EC40
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4134.600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>David,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'm now a bit lost as to what your 
after.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Attached is my Bow Tie - which I think does the job 
- I've used the cross/hhv combination not hold.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>There needs to be a bit of work in settingthe scan 
lengths. I've guessed at what might be appropriate ie 20 days = maMedium in my 
code.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>My scan picks up ABC on the ASX. I'm assuming 
you'll make this a buy&nbsp;when it closes above 0.55 again.&nbsp;ie closes 
above the high before the current pull back - and this is my assumption of the 
type of stock your after.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Geoff&nbsp;&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV 
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
<A title=dtholz@xxxx href="mailto:dtholz@xxxx";>David 
Holzgrefe</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=amibroker@xxxxxxxxxx 
href="mailto:amibroker@xxxxxxxxxxxxxxx";>amibroker@xxxxxxxxxxxxxxx</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, May 14, 2001 9:44 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [amibroker] Bow Tie</DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><BR></DIV>
<DIV><FONT face=Arial size=2>Thanks TJ just when I think I got the formula 
right ..</FONT></DIV>
<DIV><FONT face=Arial size=2>could a few of the ami users have a lookat it 
and see if it displays as per the theory :</FONT></DIV>
<DIV><FONT face=Arial size=2>I checked it against a few quickly but im a bit 
cross eyed at the moment from starring at code ....</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>TJ I'll have play with you easy version tomorrow 
:))))</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>thanks again&nbsp; David</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV 
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
Tomasz Janeczko 
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=amibroker@xxxxxxxxxxxx 
href="mailto:amibroker@xxxxxxxxxxxxxxx";>amibroker@xxxxxxxxxxxxxxx</A></DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, May 14, 2001 9:11 
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [amibroker] Bow Tie</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hello David,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I looked at your formula at here is my 
comment:</FONT></DIV>
<DIV>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT color=#0000ff>cond1=cross (ma(close, 10 ),ema (close, 
30));<BR>cond2=ref(cross (ma(close, 10 ),ema (close, 
30)),-1)&gt;0;<BR>cond3=ref(cross (ma(close, 10 ),ema (close, 
30)),-2)&gt;0;<BR>cond4=ref(cross (ma(close, 10 ),ema (close, 
30)),-3)&gt;0;<BR>cond5=ref(cross (ma(close, 10 ),ema (close, 
30)),-4)&gt;0;<BR>cond6=ref(cross (ma(close, 10 ),ema (close, 
30)),-5)&gt;0;<BR>cond7=ref(cross (ma(close, 10 ),ema (close, 
30)),-6)&gt;0;<BR>cond8=ref(cross (ma(close, 10 ),ema (close, 
30)),-7)&gt;0;<BR>cond9=ref(cross (ma(close, 10 ),ema (close, 
30)),-8)&gt;0;<BR>cond10=ref(cross (ma(close, 10 ),ema (close, 
30)),-9)&gt;0;</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT color=#0000ff>condtrue=cond1 or cond2 or cond3 or cond4 or 
cond5 or cond6 and cond7 and cond8 and cond9;</FONT></DIV></BLOCKQUOTE>
<DIV><FONT face=Arial size=2>All above statements could be replacedby a 
single:</FONT></DIV>
<DIV><FONT face=Arial size=2>condtrue = hold( cross( ma( close, 10 ), ema( 
close, 30 ) ), 10 );</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>There is no need for a&nbsp;magic with 
"reseting" back to false.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Best regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Tomasz Janeczko</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV 
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
<A title=dtholz@xxxx href="mailto:dtholz@xxxx";>David 
Holzgrefe</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A 
title=amibroker@xxxxxxxxxxxxxxx 
href="mailto:amibroker@xxxxxxxxxxxxxxx";>amibroker@xxxxxxxxxxxxxxx</A> 
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> 14 May, 2001 11:58</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [amibroker] Bow 
Tie</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>so what i realy need is a way cancelthe true 
if the condition becomes false</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>iff var0&lt;1 then var1 = 0 ; 
???</FONT></DIV>
<DIV><FONT face=Arial size=2>or something similar </FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV 
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
<A title=tj@xxxx href="mailto:tj@xxxx";>Tomasz 
Janeczko</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A 
title=amibroker@xxxxxxxxxxxxxxx 
href="mailto:amibroker@xxxxxxxxxxxxxxx";>amibroker@xxxxxxxxxxxxxxx</A> 
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, May 14, 2001 7:21 
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [amibroker] Bow 
Tie</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>In fact Steve's solution:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>var0 = cross (ma(close, 10 ),ema (close, 30) ) ;<BR>var1 = 
IIF(HHV(var0,-10) = 1,1,0) ;<BR></DIV>
<DIV><FONT face=Arial size=2>is equivalent to</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>var1 = Hold( var0, 10 );</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>so var1 remains true if at least 
one&nbsp;"true" signal occured within&nbsp;previous 10 
bars.&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Best regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Tomasz Janeczko</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV 
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
<A title=gmulhall@xxxx 
href="mailto:gmulhall@xxxx";>Geoff Mulhall</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A 
title=amibroker@xxxxxxxxxxxxxxx 
href="mailto:amibroker@xxxxxxxxxxxxxxx";>amibroker@xxxxxx</A> 
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> 14 May, 2001 10:06</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [amibroker] Bow 
Tie</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>David,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I think Steve's second email is a 
good&nbsp;solution using Cross in conjunction with&nbsp;HHV - it 
allows you to look backward in time. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'll continue to play around as this scan 
it something I will use.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Tomasz,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Can you please confirm that the Hold 
condition sets the&nbsp;array to 1 <U>forward</U> in time the 
specified number of slots in the hold result array from&nbsp;the first 
position where it was set to 1 (ie true) ?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Geoff</FONT>&nbsp;</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px;BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV 
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
<A title=dtholz@xxxx 
href="mailto:dtholz@xxxx";>David Holzgrefe</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A 
title=amibroker@xxxxxxxxxxxxxxx 
href="mailto:amibroker@xxxxxxxxxxxxxxx";>amibroker@xxxxxxxx</A> 
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, May 14, 2001 
10:07 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [amibroker]ref 
</DIV>
<DIV><BR></DIV><TT>ok I'm concerned that if the condition changes 
ami will still hold it true<BR>even though it is now false using the 
hold()<BR>."This true result is held true over the number of periods 
specified even if<BR>a "false" result is generated. "<BR><BR><BR>I 
don't wish to extend the condition forcing a false signal.<BR>What I 
wanted was if condition x is meet then as long as its true look 
for<BR>the next condition .<BR>I guess you can see the intent in the 
bow tie formula.<BR><BR>has the ma10,ma20 ,ma30 crossed in the last 
xn days<BR>if yes<BR>has the pull back occurred<BR>if yes<BR>has the 
higher high occurred<BR>if all 3 conditions are true then signal a 
buy<BR><BR>Geoff's multi&nbsp; condition does it but was looking for 
a cleaned way to<BR>express it .<BR>Maybe i just have to nest a 
bunch of conditions and if there true nest<BR>another.<BR><BR>DOES 
THIS MAKE sense to anyone or is my logic out of sync<BR><BR>/* Bow 
Tie conditions - Short term moving average has crossed the long 
term<BR>moving average sometime in the last xn days - Add more 
conditions for more<BR>days */<BR><BR>cond1=cross (ma(close, 10 
),ema (close, 30));<BR>cond2=ref(cross (ma(close, 10 ),ema (close, 
30)),-1)&gt;0;<BR>cond3=ref(cross (ma(close, 10 ),ema (close, 
30)),-2)&gt;0;<BR>cond4=ref(cross (ma(close, 10 ),ema (close, 
30)),-3)&gt;0;<BR>cond5=ref(cross (ma(close, 10 ),ema (close, 
30)),-4)&gt;0;<BR>cond6=ref(cross (ma(close, 10 ),ema (close, 
30)),-5)&gt;0;<BR>cond7=ref(cross (ma(close, 10 ),ema (close, 
30)),-6)&gt;0;<BR>cond8=ref(cross (ma(close, 10 ),ema (close, 
30)),-7)&gt;0;<BR>cond9=ref(cross (ma(close, 10 ),ema (close, 
30)),-8)&gt;0;<BR>cond10=ref(cross (ma(close, 10 ),ema (close, 
30)),-9)&gt;0;<BR><BR><BR>SYNTAX&nbsp; hold( EXPRESSION, periods 
)<BR>RETURNS&nbsp; ARRAY<BR>FUNCTION&nbsp; Extends a "true" result 
of EXPRESSION for the specified number of<BR>periods. This true 
result is held true over the number of periods specified<BR>even if 
a "false" result is generated.<BR>EXAMPLE hold( cross(rsi(14),70),5 
)<BR><BR>----- Original Message -----<BR>From: "Steve Wiser" 
&lt;slwiserr@xxxx&gt;<BR>To: 
&lt;amibroker@xxxxxxxxxxxxxxx&gt;<BR>Sent: Sunday, May 13, 20018:31 
PM<BR>Subject: Re: [amibroker] ref<BR><BR><BR>&gt; 
David:<BR>&gt;<BR>&gt; Check out the function "Hold".&nbsp; I think 
this will do what you are asking.<BR>&gt;<BR>&gt; 
Steve<BR>&gt;<BR>&gt;<BR>&gt; HOLD:<BR>&gt;<BR>&gt; SYNTAX hold( 
EXPRESSION, periods ) RETURNS ARRAY FUNCTION<BR>&gt;<BR>&gt; Extends 
a "true" result of EXPRESSION for the specified number of 
periods.<BR>&gt;<BR>&gt; This true result is held true over the 
number of periods specified even if<BR>&gt; a "false" result is 
generated.<BR>&gt;<BR>&gt; EXAMPLE hold( cross(rsi(14),70),5 
)<BR>&gt;<BR>&gt;<BR>&gt; At 08:29 PM 5/13/01 +1000, you 
wrote:<BR>&gt; &gt;TJ is there a way for ami to look for a condition 
true over xn periods<BR>&gt; &gt;<BR>&gt; &gt;eg<BR>&gt; 
&gt;<BR>&gt; &gt;ref(cross (ma(close, 10 ),ema (close, 
30)),-10)&gt;0;<BR>&gt; &gt;<BR>&gt; &gt;so that ami look for the 
true condition over the last 10 periods<BR>&gt; &gt;no just 10 
periods ago ?<BR>&gt; &gt;<BR>&gt; &gt;may have asked this 
before<BR>&gt; &gt;<BR>&gt; &gt;<BR>&gt; &gt;Thanks David<BR>&gt; 
&gt;<BR>&gt; &gt;Your use of Yahoo! Groups is subject to the<BR>&gt; 
&gt;&lt;<A 
href="http://docs.yahoo.com/info/terms/";>http://docs.yahoo.com/info/terms/</A>&gt;Yahoo! 
Terms of Service.<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt;<BR>&gt; 
Your use of Yahoo! Groups is subject to <A 
href="http://docs.yahoo.com/info/terms/";>http://docs.yahoo.com/info/terms/</A><BR>&gt;<BR>&gt;<BR>&gt;<BR><BR></TT><BR><BR><TT>Your 
use of Yahoo! Groups is subject to the <A 
href="http://docs.yahoo.com/info/terms/";>Yahoo! Terms of 
Service</A>.</TT> <BR></BLOCKQUOTE><BR><BR><TT>Your use of Yahoo! 
Groups is subject to the <A 
href="http://docs.yahoo.com/info/terms/";>Yahoo! Terms of 
Service</A>.</TT> <BR></BLOCKQUOTE><BR><BR><TT>Your use of Yahoo!Groups 
is subject to the <A href="http://docs.yahoo.com/info/terms/";>Yahoo! 
Terms of Service</A>.</TT> <BR></BLOCKQUOTE><BR><BR><TT>Your use ofYahoo! 
Groups is subject to the <A 
href="http://docs.yahoo.com/info/terms/";>Yahoo! Terms of Service</A>.</TT> 
<BR></BLOCKQUOTE><BR><BR><TT>Your use of Yahoo! Groups is subject to the <A 
href="http://docs.yahoo.com/info/terms/";>Yahoo! Terms of Service</A>.</TT> 
<BR></BLOCKQUOTE><BR><BR><TT>Your 
use of Yahoo! Groups is subject to the <A 
href="http://docs.yahoo.com/info/terms/";>Yahoo! Terms of Service</A>.</TT> 
<BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_001_0077_01C0DCC2.5837EC40--

Attachment:

Attachment: Description: "Description: Binary data"