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

[amibroker] Re: Basic breakout code ?



PureBytes Links

Trading Reference Links

It signals a price breakout that is higher (or lower) than the closing
range of the previous 20 days (default values, which are independently
adjustable).  If you want to make it more precise ("expanding rapidly
beyond the trading range") you'll need to define that and add it to
the condition(s).

As to the volume, you can add the volume criteria to both conditions
if you want, but I assumed (perhaps mistakenly on my part) you were
looking for buy-only conditions.  Going long with rising volume is
typically a good idea, but selling or going short on rising volume is
more of a hit-or-miss proposition, in my experience.


Luck,

Sebastian


--- In amibroker@xxxxxxxxxxxxxxx, Richard Jay <lists@xxx> wrote:
>
> Thanks Sebastian ... could you explain in plain English (briefly) what 
> this is looking for ??. I would add something like "Volume > Ref(
Volume 
> * 1.25, -1 )" to check for Volume but I'm not sure why you say it would 
> only be needed on Cond1.
> 
> Richard.
> 
> sebastiandanconia wrote:
> 
> >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@> 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 :)
> >>
> >>    
> >>
> >
> >
> >
> >
> >
> >
> >
> >
> >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
> >
> >
> >
> > 
> >
> >
> >
> >
> >  
> >
>






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/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/