Login Page - Create Account

Support Board


Date/Time: Sat, 20 Apr 2024 00:52:03 +0000



[Programming Help] - Colour Bar alert question

View Count: 869

[2018-01-23 15:40:33]
samual sprat - Posts: 343
Hi,

I've got colour bar alerts which use simple alert formulas. They reference a future bar condition. I'm finding that when I load the study that contains it then it calculates all bars on the chart that meet the criteria, but it doesn't work in realtime. Is there a way to do this in realtime? FYI this is an example of the script i'm using, it checks for inside bars and colours the inside bar

=AND(
H[1]<H, L[1]>L,
H[2]<H, L[2]>L,
)

Thanks
S
[2018-01-23 20:37:45]
Sawtooth - Posts: 3975
The Color Bar study does not recalculate for a previous bar's alerts.
You could force a recalc with Kiwi's Recalc custom study, found in kiwi15.dll, here:
request for a very simple ACSIL study

Or you could use this:
=AND(
H<H[-2], L>L[-2],
H[-1]<H[-2], L[-1]>L[-2]
)
and get the alert in the real-time bar where it occurs.
[2018-01-24 00:19:10]
samual sprat - Posts: 343
You super star!

The kiwi dll works perfectly. Was worried it would refresh the screen but it does it in the background - awesome.

I would have preferred to do it in the alert code as you mentioned but most of the problem colour bar alerts which don't repaint need to reference the future bar as I need this bar to be painted, if that makes sense.

Thanks Tom
S

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

Login

Login Page - Create Account