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

[amibroker] Trading NDO with Equity()



PureBytes Links

Trading Reference Links

Hi All - Like Herman, I am currently doing virtually all my work with the Equity() function, but I am running into a very frustrating problem. When trading NDO, Equity() returns the value of the equity line at the open, which is OK *except* that on the last bar, it apparently gives equity value at the close. Then when the next data bar gets added, the last bar becomes the next-to-last bar and the value for that bar changes from equity-at-close to equity-at-open like all the other bars.
 
The problem I am having is that this makes it very hard to use the equity line itself as a part of any NDO system because the changing values on the last bar will cause bad signals to appear and then disappear the next day, and it can also delay the appearance of valid signals until the day after they should have appeared.
 
I have been trying to write a workaround for this by using different formulas to adjust the value of the last bar and then watch that bar to see if it still changes the next day. Although this works with some settings, it is not really working too well in general because I need to account for variations such as different PositionSizes, different Margin, etc. and I don't know exactly how AB calculates these things internally. I am just wondering if anyone has run into this problem already and found a workable solution? Since Equity() uses the old backtester, and sometimes returns different values than the new backtester, I don't think using the custom interface to get the required info will necessarily always give the correct numbers for the Equity() function either.
 
TJ, if you see this, do you think it might be possible to add a switch to Equity() that allows the last bar of an NDO equity line to display value at the open like all other bars? Or, since only you know AB's internal calculations, would it be possible to provide a formula that would "reverse" the last bar's value back to equity-at-open and that will work under all circumstances?  Thanks very much to everyone for any help they can give!
 
Steve
__._,_.___

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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___