Backtesting issue with For Loop and Log after new update: limited to 50,000 entries
Backtesting issue with For Loop and Log after new update: limited to 50,000 entries
19 Aug 2023, 12:48
Hi,
I have a long code and needs checking for errors. I have a lot of Print method added to check the code. I have just recently updated to the lastest software. I used to be able to get over 1 million entries in the log, but after the update, the cbot just stops executing without any errors once the log has reach 50,000.
Can Spotware fix this error, please? This is very inconvenient and problematic.
Thanks.
Replies
PhoenixCapital
19 Aug 2023, 13:46
( Updated at: 21 Dec 2023, 09:23 )
It works on live trading, but not on backtest. Backtesting is the issue.
This is the image for live trading with the test count at 1 million.
@PhoenixCapital
PhoenixCapital
19 Aug 2023, 13:07 ( Updated at: 21 Dec 2023, 09:23 )
Here is a simple code for testing.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;
namespace cAlgo.Robots
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
public class NewcBot : Robot
{
public int testCount = 60000;
protected override void OnStart()
{
for (int i = 0; i < testCount; i++)
{
Print(i);
}
}
protected override void OnTick()
{
// Handle price updates here
}
protected override void OnStop()
{
// Handle cBot stop here
}
}
}
Here is the image. It just stops at 50,000 entries on the log.
@PhoenixCapital