How to develop a Strategy Performance |
In a first of its kind, ArthaChitra lets the user to create his/her own Strategy Performance summery and performance reports including how the same will be displayed by defining custom xaml templates.
In Strategy Performance View, the contents as visible in the Summery tab can be user defined by building custom PerformanceBase codes. In the Performance tab both the content and the UI/View can be configured by building custom PerformanceBase scripts and by designing custom Xaml templates.
The Performance userCode is inherited from the PerformanceBase class. If the user wishes to display any value in the Summeries tab then he must implement the ISummeryT interface. If the user wants to display the values in the Performance tab then he must implement the IPerformanceT interface. Additionally the user can write custom Xaml templates and change the whole look and feel of the Performance tab.
public class ClassName : PerformanceBase, ISummery<double>, IPerformance<double> { //you code including implementation of the ISummery<> and IPerformance<> interfaces }
The OnStateChanged method is called whenever the State of the script is changed. The various states which a Performance class have are:
protected override void OnStateChange() { //your code here }
The OnTransaction is called whenever the strategy triggers a transaction (when both the legs, i.e. entry and its corresponding exit, are filled). User has to calculate the metrics based on the values as provided by the ITransaction interface.
protected override void OnTransaction(ITransaction transaction) { //your code here }