Profile Picture

How to develop System Results Plugin

Posted By johan 2 Years Ago
Message
Posted Thursday July 02 2015
I am running a CFD account, which, as a result of leverage, has different aspects to it than the normal System Results.  At this stage I have developed all the different metrics, and do an output to the Console.  I want to output this to System Results.  I also have a daily equity ISeries that I want to output to a chart.  I am a self taught C# programmer and stumble by, by means of examples.  It has been quite easy to develop custom indicators, but I can not find any methodology and examples on System Results plugins.  Is it possible that somebody can assist me and/or point me to methodology as well as examples.

Here is for example the first  WriteLine to the Console, just to get a feeling what I want to achieve:

Console.WriteLine("Date {0} Total Equity {1} Total Commission {2} Total Interest {3} Trading Days {4} Number of Trades {5}", SystemData.CurrentDate, Math.Round(totalEquity, 4), Math.Round(totalCommission, 4), Math.Round(totalSystemInterest, 4), tradingDays, SystemData.SystemStatistics.CurStat.TotalTrades);

Thanks for any help!
Posted Thursday July 02 2015
I have been able to get the Sample Plugin started. Three questions:
- If I want to display parameters from my system, how can I access them from the ResultsControl
- Similar on the output of my custom fields, eg equityTotal
- I still have no clue on charting.  I only want one chart and it can be inserted on the results tab.  I basically want to chart a series (which I have in a RList, but converted to Series) with my daily equity values.
Posted Monday July 06 2015
To get started, refer to the code for the existing system results plugins, which is included in the RightEdge sample code under RightEdgePlugins\SystemResults.

The built-in system results plugins uses DevExpress charts, which you would need to buy a license to in order to use in your code.  I'd suggest looking at OxyPlot, which is free and open source, for your charts.

You can pass data from your trading system to the system results plugin via the SystemData.CustomString property.  You could convert your data to a string and store it in that field, or write it out to a file and put the filename in that field for the system results plugin to read.

Let me know if you still have questions.

Thanks,
Daniel
Posted Tuesday July 07 2015
Thanks Daniel.  I got the System Results running with using the CustomString property.  Will try my hands at the chart.  One more question - I am using a ListView to display the results, but am struggling to print it.  I have set CanPrint() to true, but am still not getting it to print.  Do I need to change anything else?
Posted Tuesday July 07 2015
You need to implement the Print() method.  Returning true from CanPrint() will enable the print command for your results tab, and then Print() will be called when the command is invoked.

Thanks,
Daniel


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems