Support Board
Date/Time: Sun, 12 Jan 2025 15:02:26 +0000
[Programming Help] - Background Coloring from Spreadsheet
View Count: 1615
[2017-03-05 20:00:24] |
JayShea - Posts: 92 |
Hello Was unable to find a solution in a review of 300+ posts with "Spreadsheet" in the search feature. I would like to color the chart background with a specific color (only two colors) if prompted by a signal (alert). Until there is a reverse signal, I want each subsequent chart space to have the same color background. Column K has a formula that says if value in column BI > 0, True, otherwise 0. No problem there. Column L has a formula that says if value in column BI > 0, True, otherwise 0. No problem there. I would like Column M to have the words "White" or "Brown" subject to the last signal (alert). The formula for Cell M3 that I wrote is: =IF(K3=True, "White", IF(L3=True, "Brown", M4)) Except for a small red triangle in the upper right corner of the cell, the formula provides no text and is blank. I hope there's a solution and it can help not only my formula writing but that of others as well. Thanks JD |
[2017-03-06 07:59:37] |
Sierra Chart Engineering - Posts: 104368 |
This can be accomplished by using the "Background" Subgraph Draw Style with the Spreadsheet Study. Refer to: Chart Studies: Background (ACSIL: DRAWSTYLE_BACKGROUND) Here is an example formula you can use to test: =if(e3>e4, 1, -1) Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing Date Time Of Last Edit: 2017-03-06 08:53:10
|
[2017-03-06 16:46:30] |
JayShea - Posts: 92 |
Dear Support Excellent start. Thank you. Attached is a chart. It shows my attempt to incorporate into two spreadsheet columns the formula you kindly suggested. The spreadsheet formulas are whether the yellow or black arrow has appeared in a cell. It is not a direct copy of your example. The yellow arrow at 7:00-AM indicates an uptrend and therefore I'd like that background to be colored (e.g. grey) as well as all following backgrounds the same color until a black down arrow (10:30-AM) reverses the trend and that background and all subsequent backgrounds are a new color (e.g. blue) until a yellow up-arrow appears. Looking at the attached chart, the black arrow appears, the background changes color to blue, the next background changes and then the backgrounds revert to grey instead of continuing as blue. I accept my own lack of articulation and will patiently explain my goals if the above is inadequate. Cheers JD |
ESH7 5 Min #1 2017-03-06 07_51_55.208.png / V - Attached On 2017-03-06 16:43:25 UTC - Size: 91.77 KB - 299 views |
[2017-03-06 17:53:29] |
Sierra Chart Engineering - Posts: 104368 |
We do not provide formula programming help. If the formula returns a positive value in a particular cell, then the primary Subgraph Color will be used for the corresponding chart bar. If the formula returns a negative value in a particular cell, then the secondary Subgraph Color will be used for the corresponding chart bar. As long as that is working, that is all we can help with. Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy: https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service: Sierra Chart Teton Futures Order Routing |
[2017-03-06 19:14:58] |
Sawtooth - Posts: 4149 |
Try this: For grey background from Yellow arrow to Black arrow, e.g. in cell P3: =IF(yellowarrow,1,IF(blackarrow,0,P4)) For blue background from Black arrow to Yellow arrow, e.g. in cell Q3: =IF(blackarrow,1,IF(yellowarrow,0,Q4)) |
To post a message in this thread, you need to log in with your Sierra Chart account: