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

[amibroker] Re: Plot Shapes



PureBytes Links

Trading Reference Links



Dale has pointed out something I overlooked, yet is very important.
 
Equity(1) and Equity(2) allow visualization of stops which Equity(0) does not.  You can use the code below to demonstrate, and I've added a few pics to clarify.
 
However, you will note that the equity line incorporates the stops and does not change regardless of the equity flavor you use (0 - 2).  So, all that is affected is the plotting of buys, sells, shorts, covers, and stops.
 
If I missed anything holler, and I'm sure Tomasz will jump in if needed.
 
 SetTradeDelays(1, 1, 1, 1);
 
Buy = StochD() > 50;Sell = StochD() < 50;
ApplyStop(stopTypeProfit, stopModePercent,   5.00, 1, True, 0);
 WhichEquity = Param("Which Equity Flavor 0 - 2?", 0, 0, 2, 1); if (WhichEquity == 1){   MyEquity = Equity(1); }
if (WhichEquity == 2) {   MyEquity = Equity(2); }   if (WhichEquity == 0){  MyEquity = Equity(); }GraphXSpace = 5;Plot(C, "Close", colorDefault, styleCandle);Plot(MA(C, 20), "20 bar MA", colorRed, styleLine + styleThick);Plot(MyEquity, "Equity", colorDefault, styleLine + styleLeftAxisScale);PlotShapes(Buy * shapeUpArrow,                      Buy * colorBrightGreen, 0, Buy * L, -15);PlotShapes((Sell == 3) * shapeHollowDownArrow,                      (Sell == 3) * colorAqua, 0, (Sell == 3) * H, -15);PlotShapes(Sell * shapeDownArrow,                      Sell *
 colorYellow, 0, Sell * H, -15);
		Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢


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








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 the Yahoo! Terms of Service.







Attachment: Description: ""

Attachment: Description: ""

Attachment: Description: ""