Login Page - Create Account

Support Board


Date/Time: Sun, 23 Feb 2025 18:29:58 +0000



[Programming Help] - Signal calculation with in the bar

View Count: 618

[2021-02-16 16:04:26]
User61576 - Posts: 445
I am attaching a cpp file I found of the delta divergence

I am trying to cause the signal (tSetupSubgraph) to appear before the bar is closed (and not as it's now when the signal shows at the end of the bar) but after a minimal amount of volume traded.

can someone please guide me on how to do this?

thanks!
attachmentDeltaDivergence_v5_q.cpp - Attached On 2021-02-16 15:57:31 UTC - Size: 12.34 KB - 336 views
[2021-02-16 16:26:18]
norvik_ - Posts: 106
This may be done by two ways. You can refer to lower time frame, or make your own inside bar calculations using sc.ReadIntradayRecordsForBarIndexAndSubIndex. First method is a bit easier, second will give you flexibility and full control over each tick.
[2021-02-17 15:40:04]
ForgivingComputers.com - Posts: 1012
This if block at line 268 causes the calculations that follow to wait until the bar has closed:

if(sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_CLOSED)

You can try changing it to
if(true)
and see what happens.

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

Login

Login Page - Create Account