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

Re: [amibroker] Newbie question on Applystop



PureBytes Links

Trading Reference Links

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/


------------------------ 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/