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

[amibroker] Re: Bars since Buy signal - how to code in AFL ?



PureBytes Links

Trading Reference Links


Hi Terry. Will have to take extra care with the double equal signs
when checking for value. As a newbie am amazed how much AFL can do
with short concise code. Thanks again for you help.
vb


--- In amibroker@xxxxxxxxxxxxxxx, Terry <MagicTH@xxxx> wrote:
> Didn't study your concept, but in your code example you have a redundant
> statement in that you are setting Buy = Low and Low = your condition (no
> harm, no benefit unless you are plotting Low or something later on,
but you
> could plot Buy just the same)
> 
> Anyhow, you probably aren't getting many sells because you ARE
getting many
> buys that are less than 7 days apart. Your sell statement only
checks the
> LAST buy condition. So, it will never exit until you have 2 Buy
conditions
> that are more than 7 days apart.
> 
> Buy = Low = LLV(Low, 6) AND Close > Ref(Close, -1);
> Sell = BarsSince (Buy) == 7;
> -- 
> Terry
> 
> 
> From: "vb_MCSE" <av_inon@xxxx>
> Reply-To: amibroker@xxxxxxxxxxxxxxx
> Date: Sun, 31 Oct 2004 16:23:34 -0000
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: Bars since Buy signal - how to code in AFL ?
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "vb_MCSE" <av_inon@xxxx> wrote:
> > 
> > Hi:
> > Caught this Trend Change system from an old Tradestation video from
> Omega.
> >  
> > Hi:
> > Caught the following on an old Tradestation video from Omega:
> >  
> > Buy signal when:
> >  Today's Low is lower than the lowest Low of past 6 days
> >  AND
> >  Today's Close is Greater Than Yesterday's Close.
> >  
> > Sell signal when:
> >  If Bars Since Entry = 7 then Sell on Close.
> >  
> 
> Just tried another variation and now I get tons of buy signals and a
> few sell signals.
>  
> Buy = Low = LLV(Low, 6) AND Close > Ref(Close, -1);
> Sell = BarsSince (Buy) == 7;
>  
> The Sell signal should occur 7 bars after each buy signal. I think I'm
> getting closer. Any suggestions would be most appreciated.
>  
> vb
> 
> 
> 
> 
> 
> Check AmiBroker web page at:
> http://www.amibroker.com/
> 
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> 
> 
> Yahoo! Groups Sponsor
>  
>  ADVERTISEMENT
> 
<http://us.ard.yahoo.com/SIG=129uuhvn0/M=315388.5543473.6613715.3001176/D=g
>
roups/S=1705632198:HM/EXP=1099326221/A=2372354/R=0/SIG=12id813k2/*https://ww
> w.orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS>
> 
> 
> 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
> <mailto:amibroker-unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
> *  
> * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
> <http://docs.yahoo.com/info/terms/> .





------------------------ Yahoo! Groups Sponsor --------------------~--> 
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.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/