Currently using cTrader all the operational information of your automated strategies (cBot) or indicators are displayed on the platform in the log tab, unfortunately, if you ever close the platform or stop and re-start the robot, all that information is lost.
What Is It?
The data logger is a .NET assembly that you add to your cBot or indicator as a referenced AddOn, this takes away all the complex code and allows you to use the data logger with a few lines of code. All the data is wriiten to files on your computer, a new file is created each day to help you investigate.
"Data Logging Has Never Been So Easy"
Logging Automated Strategies (cBots)
It can be very useful when you run your robot to record all signal and trade activity, also you would want to know when something strange has happened, a small error in the code of your software can cause huge financial losses. Strange behaviour in your algo that has got you banging your head against the wall can easily be identified with some well-placed logging logic in your source code.
Logging Custom Indicators
You can also add the logging code to custom indicators for analysis, all the information is stored in files to be opened with your favourite software, notepad, excel and many more.
How to Use Logging for Back-Testing
cTrader uses server time for backtesting and not your current time, if you start your back-test on the 01.01.2012, this will be the first date, so you will need to add this as a parameter to each call for Info, Warning and Error, an example of this is below.
Back-Test Code with extra parameter
TradeLogger.Info("RSI > 80 " + _rsi.Result.LastValue.ToString("0.0000"), Server.Time);
Forward-Test Code for Normal Running of the Robot Without Parameter
TradeLogger.Info("RSI > 80 " + _rsi.Result.LastValue.ToString("0.0000");
Watch a Video Demo
You can expand screen full size as well as set it to 1080p HD
Ok, hands in the air. I noticed my mistake of the incorrect values for SMA, I should have used a RSI indicator to demonstrate logging information when the RSI value is > 80 or < 20. I hope that you still understand what I was trying to show you and if I get time I will record the video again. It is a Friday afternoon and many strange things usually happen towards the end of the day. The example code has been updated using the RSI instead of SMA.
Data Analysis Integration Service
We offer a fee based service to integrate and configure the data logging into your existing robots or indicators, if you wish to discuss this with us please contact us at email@example.com for a quote.