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

Re: [amibroker] Equity function - what it does part two



PureBytes Links

Trading Reference Links


Hello all,
 
Thought to share some learnings for those needing further clarity on exactly what the difference is in flag 0, 1, and 2 for the Equity function.
 
Here's the headline:  it has everything to do with plotshapes and little else.  All three flavors offer the same values for equity.  What Equity(1) does is exrem the buys and sells for you so that your plotshapes will show up only on the day of the buy or sell.  Equity(2) exrems and adds the delay.  Equity(0) does no exreming or delaying so that you'll get a plotshape for every day you are on a buy or sell.
 
Well, that's it.  For me it was a mystery solved as I really thought there was something more going on with the three flavors.
 
Here's some code to illustrate:
 
Buy = Cross(MACD() , 0);
Sell = Cross(0, MACD());
 
WhichEquity = Param("Which Equity Flavor 0 - 2?", 0, 0, 2, 1);
 
if (WhichEquity == 1)
{
 
 
		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.