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

Re: [amibroker] How to keep buying in an uptrend?



PureBytes Links

Trading Reference Links

Instead of Cross, which detects ONLY the crossing point, try High > 
Ref(High,-1) + Alpha. It will get a new Buy on every bar while this is 
still true. I think you want to leave BuyPrice alone since the 
backtester Buys at BuyPrice. It seems you probably want BuyPrice = next 
bar open, not sure though.

Terry

Andre wrote:

>This sounds so basic, yet, I can't figure out how to do it:
>
>I want to keep buying when today's price crosses yesterday's high plus 
>a "fudge factor", Alpha:
>
>  BuyPrice = Ref(High,-1)+ Alpha ;
>  Buy = Cross(High, BuyPrice) ;
>
>This works on the FIRST day after a downtrend, as today's high crosses 
>yesterday's high, but it does not work on the following day, as the 
>uptrend continues, as at that point we stay "above" the crossing point.
>How do I create a construction that keeps buying every day of an 
>uptrend at yesterday's high?
>
>Thx,
>
>Andre
>  
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/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/