Login Page - Create Account

Support Board


Date/Time: Thu, 15 Oct 2026 17:21:41 +0000



[Programming Help] - Subject: Renko bar High/Low showing zero range during Replay (ACSIL, AutoLoop=1)

View Count: 241

[2026-08-29 04:47:10]
User936721 - Posts: 32
I'm running an ACSIL study (AutoLoop = 1) on a Renko chart (4-tick brick size, GCZ26 futures). In live trading, sc.High - sc.Low shows a realistic range for each bar (median ~1 tick, consistent with genuine brick formation).

When I run the same chart through Sierra Chart's Replay feature, sc.High - sc.Low comes back as exactly zero for nearly every bar — confirmed consistently across three different Replay configurations (Every Tick mode at 10x speed, and Tick Playback at 1x speed), so it isn't specific to one playback speed or detail level.

Question: Does Sierra Chart's Replay engine reconstruct genuine completed Renko bricks the same way live processing does, or can it expose the study to intermediate/intrabar tick updates as if they were distinct bars during Replay — which would explain degenerate (zero-range) OHLC values? If so, is there a recommended setting or ACSIL check (e.g. sc.IsFullRecalculation, a specific Replay-mode flag, or a required Data/Trade Service Settings option) to ensure the study only processes genuinely completed Renko bars during Replay, matching live behavior?

[2026-08-31 13:43:25]
John - SC Support - Posts: 48217
We did a test of this to ensure there is not something odd occurring, but we are not seeing any issues with this.

Although it should not matter in this case, keep in mind that the actual High and Low are different from the Renko High and Low. Refer to the following:
Renko Bar Charts: Renko Open, High, Low, Close Values

The following is the code we used to test:

[
#include "sierrachart.h"

SCDLLName("Testing")

SCSFExport scsf_SimulationModeState(SCStudyInterfaceRef sc)
{
  // Setup References
  SCSubgraphRef High = sc.Subgraph[0];
  SCSubgraphRef Low = sc.Subgraph[1];
  SCSubgraphRef Diff = sc.Subgraph[2];

  if (sc.SetDefaults)  
  {
    sc.GraphName = "Testing";
    sc.AutoLoop = 1;
    sc.GraphRegion = 0;

    High.Name = "High";
    High.DrawStyle = DRAWSTYLE_LINE;
    High.DrawZeros = true;

    Low.Name = "Low";
    Low.DrawStyle = DRAWSTYLE_LINE;
    Low.DrawZeros = true;

    Diff.Name = "Diff";
    Diff.DrawStyle = DRAWSTYLE_LINE;
    Diff.DrawZeros = true;
    
    return;
  }

  High[sc.Index] = sc.High[sc.Index];
  Low[sc.Index] = sc.Low[sc.Index];
  Diff[sc.Index] = High[sc.Index] - Low[sc.Index];
}



For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2026-08-31 13:55:35]
User936721 - Posts: 32
I think I may have found the actual mechanism, and I’d really appreciate your confirmation either way.

My hypothesis: when a new Renko bar/brick is created, its High, Low, and Open all legitimately equal the single price that triggered it — so there genuinely is zero range at the instant a bar starts, in both Live and Replay. In live trading, by the time a study happens to read the current bar, real time has passed and several more ticks have usually already arrived, so it naturally shows a non-zero range by then. In Replay — especially Every Tick mode at 10x — I suspect my AutoLoop=1 study is being invoked on every single tick, so a large share of my sc.High[sc.Index] - sc.Low[sc.Index] reads are landing on bars that have only just been created, with one tick in them so far. If that’s right, it isn’t a Replay reconstruction issue at all — it’s simply that I’m sampling the currently-forming bar rather than the last completed one.

Could you confirm whether that’s what’s happening? Specifically:

  1.  During Replay (Every Tick mode), is the AutoLoop=1 study callback invoked on every incoming tick, including ticks that don’t complete a bar?
  2.  If so, would checking sc.Index - 1 instead of sc.Index, or gating the read with sc.GetBarHasClosedStatus(sc.Index), be the correct/recommended way to only ever read fully-completed Renko bars?

I tried a quick version of this myself:

if (sc.GetBarHasClosedStatus(sc.Index) == BHCS_BAR_HAS_CLOSED)
{
Diff[sc.Index] = sc.High[sc.Index] - sc.Low[sc.Index];
}


If that’s the right fix, brilliant — I just want to make sure I’m not missing something else, and that this is genuinely the expected/documented behaviour during Replay rather than a quirk specific to Renko charts.

Thanks again for your help — really appreciate the support team digging into this
[2026-08-31 17:49:15]
John - SC Support - Posts: 48217
1. The study is called at every tick (trade). It doesn't matter what that trade is doing relative to the bar.

When a new bar is started, it will have the same High and Low value and hence a difference of 0 at that moment.

2. This is something you need to figure out for your particular study and what you want to see/accomplish.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2026-09-01 12:02:48]
User936721 - Posts: 32
Many thanks John. Much appreciated

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account