Login Page - Create Account

Support Board


Date/Time: Tue, 01 Jul 2025 00:15:06 +0000



Post From: Renko Chart Bar Based Backtesting Flattening Issue

[2024-02-17 16:54:17]
User431178 - Posts: 728

int BarTime = sc.BaseDateTimeIn[sc.Index].GetTime();

As you are not using time based bars, you might be better suited using one of the below, as you would then not be reliant on a new bar starting.

sc.LatestDateTimeForLastBar.GetTime();
sc.BaseDataEndDateTime[sc.Index].GetTime();

If you go with the end date time option, you also need to set sc.MaintainAdditionalChartDataArrays in the set defaults section.



Also internally time values are floating point variables.
Therefore they suffer from precision issues when comparing them.

This is not true, they used to be, but since more than 3 years have been 64-bit int.