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

Re: [amibroker] Newbie question on Applystop



PureBytes Links

Trading Reference Links

Sell will appear 5 bars after eavery buy, not necessarliy the last one
try using Hold function


On Sat, 11 Dec 2004 11:42:04 +1100, Keith Osborne
<kosborn3@xxxxxxxxxxxxxx> wrote:
> 
> Thanks, did that and now the buy arrows work correctly BUT the sell
> occurs the very next bar not 5 bars after the buy. I also included a
> parameter function to allow me to vary the number of bars but nothing
> changes when I use the parameter slide.
> 
> Thoughts?
> 
> Keith
> 
> kaveman perth wrote:
> 
> > try this
> > Sell = ApplyStop(stopTypeNBar, stopModeBars, 5);
> >
> >
> > On Fri, 10 Dec 2004 22:40:32 -0000, traderkeith2000
> > <kosborn3@xxxxxxxxxxxxxx> wrote:
> > >
> > >
> > > I know the answer is simple but I cannot see what is wrong with the
> > > code below.
> > >
> > > It correctly displays the first green buy arrow but then no sell or
> > > nothing after that for years. I suspect some problem with Sell = 0;
> > > and applystop interaction.
> > >
> > > Would appreciate any help.
> > >
> > > thanks.....Keith
> > >
> > > _SECTION_BEGIN("Range Breakout");
> > > // Range breakout //
> > >
> > > #include<Position Sizing.afl>;
> > >
> > > Buy = (H-L) > Ref((H-L),-1) AND (L+(H-L)/2) > Ref(H,-1) AND H >
> > EMA(C,20);
> > > Sell = 0;
> > >
> > > Buy = ExRem(Buy,Sell);Sell = ExRem(Sell,Buy);
> > >
> > > ApplyStop(stopTypeNBar, stopModeBars, 5);
> > >
> > > Plot(EMA(C,20),"EMA - 20 Period", colorYellow,styleLine);
> > > Plot(C, "Close", colorRed, styleBar);
> > > PlotShapes(shapeUpArrow*Buy+shapeDownArrow*Sell,
> > > IIf(Buy,colorBrightGreen,colorYellow));
> > > _SECTION_END();
> > >
> > >
> > > 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
> > >
> > >
> > >
> > >
> > >
> >
> >
> > --
> > Cheers
> > Graham
> > http://e-wire.net.au/~eb_kavan/ <http://e-wire.net.au/%7Eeb_kavan/>
> >
> >
> > 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
> > click here
> > <http://us.ard.yahoo.com/SIG=1290guu31/M=298184.5639630.6699735.3001176/D=groups/S=1705632198:HM/EXP=1102810313/A=2434971/R=0/SIG=11eeoolb0/*http://www.netflix.com/Default?mqso=60185400>
> >
> >
> >
> > ------------------------------------------------------------------------
> > *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/>.
> >
> >
> 
> 
> 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
> 
> 
> 
> 
> 


-- 
Cheers
Graham
http://e-wire.net.au/~eb_kavan/


------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/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/