Login Page - Create Account

Support Board


Date/Time: Thu, 08 May 2025 05:26:06 +0000



Post From: Replay divergence for multiple charts

[2024-11-22 15:40:51]
skalaydzhiyski - Posts: 71
Hello,

I wanted to replay multiple charts in sync, but when doing it using Chartbook or Link Number replay I can only replay them with 1 second set and that is too slow.

My solution to that is a custom study I wrote with ACSIL which uses sc.StartChartReplay() to trigger all charts separately with a for loop and this gives me exactly what I want - I can have multiple charts replaying with 120x speed and everything is working as expected.

I was concerned that charts might diverge so I wrote another ACSIL study to track the divergence between 2 charts using sc.LatestDateTimeForLastBar from the current chart the study is applied on and a persistent SCDateTime& read from another chart which has the corresponding value for sc.LatestDateTimeForLastBar.

This seems to do the trick more or less, but I am constantly seeing divergence of about 300ms even though when I look at the charts this doesn't seem to be true.

I think my approach is a bit overengineered at this point so I wanted to reach out to you and ask if you can share a better way to track if 2 charts' replays are in sync ?

Or even better - a better of doing fast replays of multiple charts.

All the best,
Date Time Of Last Edit: 2024-11-22 15:44:54