PureBytes Links
Trading Reference Links
|
Hi, can anyone tell me why trailing and N-bar stops are not plotted? In
the AA backtest it shows both stops being activated correctly. Not sure
about the Equity(?) statement....should it be 0 or 1? I have trade
delays set to (1,1,1,1) and "activate stops immediately" in the AA
settings.
TIA.....Keith
// Buy/Sell CONDITIONS //
Buy = Cross(MA(C,9),MA(C,30));
Sell = 0;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
// STOPS //
Equity(1);
/*
1 - regular exit
2 - Max. loss
3 - profit target
4 - trailing
5 - n-bar stop
6 - ruin stop
*/
ApplyStop(stopTypeNBar, stopModeBars, 10);
ApplyStop(stopTypeTrailing,stopModePoint, 3 * Nz(ATR(14)));
/* PLOTTING & DISPLAYS */
PlotShapes(IIf(Sell==6,shapeDownTriangle,shapeNone),colorRed,0,L,-20);
PlotShapes(IIf(Sell==5,shapeHollowCircle,shapeNone),colorBlue);
PlotShapes(IIf(Sell==4,shapeCircle,shapeNone),colorAqua,0,L,-20);
PlotShapes(IIf(Sell==3,shapeStar,shapeNone),colorBlue,0,L,-20);
PlotShapes(IIf(Sell==2,shapeStar,shapeNone),colorWhite,0,L,-20);
PlotShapes(IIf(Sell==1,shapeDownArrow,shapeNone),colorYellow,0,L,-20);
PlotShapes(shapeUpArrow*Buy , colorBrightGreen,0,L,-20);
Colorbar = IIf(C > Ref(C, -1), colorBlue, IIf(C<
Ref(C,-1),colorRed,colorGreen));
Plot(Close, "Close", Colorbar, styleBar );
------------------------ Yahoo! Groups Sponsor --------------------~-->
Try Online Currency Trading with GFT. Free 50K Demo. Trade
24 Hours. Commission-Free.
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/
|