What is the max size of the backtest log and can it be increased?
Created at 29 Oct 2018, 00:30
What is the max size of the backtest log and can it be increased?
29 Oct 2018, 00:30
What is the max size of the backtest log and can it be increased?
Replies
... Deleted by UFO ...
PanagiotisCharalampous
29 Oct 2018, 14:07
Hi lec0456,
Note that I am referring to replacing the Print function and writing to a text file instead. See below an example
using System; using System.Linq; using System.IO; using cAlgo.API; using cAlgo.API.Indicators; using cAlgo.API.Internals; using cAlgo.Indicators; namespace cAlgo.Robots { [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FileSystem)] public class NewcBot : Robot { private string fiName; private StreamWriter _fileWriter; protected override void OnStart() { _fileWriter = new StreamWriter("c:\\Users\\pcharalampous.CTRADER\\Documents\\log.txt"); // Put your initialization logic here } protected override void OnTick() { _fileWriter.WriteLine(Symbol.Bid); } protected override void OnStop() { _fileWriter.Close(); } } }
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
29 Oct 2018, 11:34
Hi lec0456,
The limit is ten thousand rows. If you need more, you can consider using a custom file and log your information there.
Best Regards,
Panagiotis
@PanagiotisCharalampous