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

[amibroker] Re: An easy one



PureBytes Links

Trading Reference Links

Bill,

Hope this helps (it's in the manual)

typeLoss=2;typeProfit=3;typeTrailing=4;typeNBar=6;
BuyCond=<<Your Condition>>
BuyPrice=0.995*Ref(C,-1);
Buy=IIf(L<0.995*Ref(C,-1) AND BuyCond,1,0);
SellPrice=C;
Sell=0;
ApplyStop(stopTypeProfit,stopModePercent,1,True);
ApplyStop(stopTypeTrailing,stopModePercent,3,True);
ApplyStop(3,1,10); //STOP After 10Bars
Equity(1);
PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorGreen,0,C-ATR(1));
PlotShapes(IIf
(Sell==typeNBar,shapeDownArrow,shapeNone),colorRed,0,C+ATR(1));
PlotShapes(IIf
(Sell==typeProfit,shapeSmallDownTriangle,shapeNone),colorBrightGreen,
0,C+ATR(1));
PlotShapes(IIf
(Sell==typeTrailing,shapeSmallDownTriangle,shapeNone),colorRed,0,C+AT
R(1));

Regards
Leo

--- In amibroker@xxxxxxxxxxxxxxx, "wavemechanic" <wd78@xxxx> wrote:
> Here's an easy one for the experts here.  After including 
ApplyStop in a formula, how does one display the stop on a chart?
> 
> Thanks.
> 
> Bill



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/