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

Re: Bow Tie



PureBytes Links

Trading Reference Links

Then the solution is to set the statement equal to the word buy and 
do the exrem(buy,sell) on two sets of this statement. The first set 
is the HHV is true and the second on is where HHV is false. Hope 
this is clear.

Steve

--- In amibroker@xxxx, "David Holzgrefe" <dtholz@xxxx> wrote:
> 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@xxxx 
> 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@xxxx 
> 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@xxxx 
> 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@xxxx>
> Sent: Sunday, May 13, 2001 8:31 PM
> Subject: Re: [amibroker] ref
> 
> 
> > David:
> >
> > Check out the function "Hold". I think this will do what 
you are 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. 
> 
> 
> Yahoo! Groups Sponsor 
> 
> 
> 
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.