Login Page - Create Account

Support Board


Date/Time: Fri, 29 Mar 2024 13:00:21 +0000



[Programming Help] - Study/Alert/Code for Color Change based on MA Close

View Count: 909

[2020-12-22 20:51:03]
User750859 - Posts: 2
Hi. Been digging into help topics trying to suss this out and lets just say I'm not too good at programming. Thought I'd ask for help here instead. Basically I'm trying to create a study where it changes the background color or possibly candle bar color (not sure yet what I would prefer for use/atheistic yet) anyhow basically I want the color change to be based on a close above and also close below a T3 moving average applied to a 3min Cumulative Delta Volume study chart. When bar closes above the MA background turns green. Closes below background turns red. I sure this concept has been created and used before so I humbly ask for help to expedite and can get this going too. Thanks in advance.
imageMAcrossColors.jpg / V - Attached On 2020-12-22 20:46:50 UTC - Size: 185.49 KB - 279 views
Attachment Deleted.
[2020-12-23 03:41:10]
User750859 - Posts: 2
I realize this is probably quite simple and I have found similar examples. But I'm having trouble creating what I am specifically after. I want to have the candle bars color change on close (green above; red below) of this T3 MA on the CumDeltaVol. Both of these are studies T3 'study' applied to CumDeltaVol 'study' so I'm a bit lost. I know I'm risking looking like a dunce but I've been digging around for several hours and I know someone out there could set me straight in like 2 minutes. Thanks.
[2020-12-26 04:08:41]
Sawtooth - Posts: 3952
Try this:

Add 2 instances of the Color Bar Based On Alert Condition study, one for each color.
- Set the Chart Region to the one you want to color.
- Set the Draw Style to either Color Bar or Background.
- Use these formulas on the Alerts tab:
Above (green):
=ID2.SG4>ID1.SG1
Below (red):
=ID2.SG4<ID1.SG1


Note: The studies must be in this order in the Studies to Graph list:
Cumulative Delta - Volume
T3
Color Bar Based On Alert Condition
Color Bar Based On Alert Condition

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

Login

Login Page - Create Account