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

[amibroker] Re: Basic breakout code ?



PureBytes Links

Trading Reference Links

Here's a simple Turtle-style breakout indicator that will display as
arrows on a price chart.  That should get you started.

Defining your volume criteria and adding it to Cond1 will be good
practice for you.:)  S.


Upds = Param("Uperiods", 20, 6, 252, 1); 
Dpds= Param("Dperiods", 20, 6, 252, 1);
 
Cond1=C>HHV(Ref(C,-1),Upds);
Cond2=C<LLV(Ref(C,-1),Dpds);

Cond3=Flip(Cond1,Cond2);

Buy= Cond3 AND Ref(Cond3,-1)==0;
Sell = Cond3==0 AND Ref(Cond3,-1); 

shape=Buy*shapeUpArrow+Sell*shapeDownArrow;

PlotShapes(shape,IIf(Buy, colorGreen, colorRed),0,IIf(Buy, Low,High));


--- In amibroker@xxxxxxxxxxxxxxx, "Richard Jay" <lists@xxx> wrote:
>
> I was browsing the AFL library trying to find something that will
> highlight a breakout but couldn't find anything. Is this too vague a
> request to be able to code ?  All I'm thinking of is a candle that is
> expanding rapidly beyond the trading range of the last xx bars AND a
> volume bar xx% higher than the last xx bars. Has nobody coded this
> before ?
> 
> P.S Sorry if I'm posting too many messages but I have lots of
> questions about AB :)
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Protect your PC from spy ware with award winning anti spy technology. It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/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/