Display equity in a pane
Author: Ben_Zurich
Creation Date: 9/13/2012 9:26 AM
profile picture

Ben_Zurich

#1
Is it possible to show the equity in a pane as a series?

I checked the forum but did not get a simple answer to that question.

I think as the equity is available only at the very end of the calculation of a strategy, it must be accessed at the very end of the Execute() method.

I am trading just one symbol.
profile picture

Eugene

#2
I'm a bit lazy to list all answers to this question, so let's stop after including just a handful of them:

Equitycurve on the Chartpane
Access to data/stats normally displayed in the performance tab during a backtest
How to get day-by-day exposure data (both long and short)?
Tracking Portfolio Equity bar by bar and position sizing

The matter may not look simple but the Wiki article they all point to is really making things simple and convenient.
profile picture

Eugene

#3
Typing this over and over is inefficient, so I've added your question to the FAQ, finally:

How to display portfolio equity (exposure, drawdown etc.) series and/or access them in scripts?
profile picture

Ben_Zurich

#4
Hi Eugene,

I'm coming back to the problem of accessing equity, which I have not solved until now.

Although I have a single symbol strategy (i.e. not a dataset), I followed the rules outlined in

QUOTE:
WealthScript Techniques | Interacting Dynamically with Portfolio Level Equity


I was not able to finish the job. When accessing external symbols within my 'Donor' strategy, I'm always getting the null object, regardless whether I synchronize or not. My code is attached.

I have studied the lengthy forum thread

QUOTE:
Accessing SystemResults


and like to ask: Is this method still unsupported ?

and

is there an easier way to access equity for single symbol strategies ?

Thank you for any help!

PS: it was not possible to attach a file
profile picture

Eugene

#5
Hi Ben,

QUOTE:
When accessing external symbols within my 'Donor' strategy, I'm always getting the null object, regardless whether I synchronize or not.


I confirm that. Here's a Q&D workaround for accessing external symbols in "donor" strategies based on use of the GetAllDataForSymbol method from Community Components:

CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).