Login Page - Create Account

Support Board


Date/Time: Sat, 18 May 2024 19:29:06 +0000



Post From: Is there a way to detect the last bar of the simulation during Autotrade BackTest?

[2020-04-12 11:18:16]
User909904 - Posts: 14
Hello,
Is there a way to detect that the autotrade is processing the last bar of the simulation during Autotrade BackTest?
Is there a variable that indicates that? I was unable to find that.
When sc.IsReplayRunning() turns from 1 -> I would like to run the cleanup but still within the simulation.
I would like to close all positions at the end of the BackTest so they add up correctly in the statistics and do a dynamic variables cleanup.

Thanks!