Support Board
Date/Time: Fri, 07 Feb 2025 18:05:36 +0000
Post From: Auto-coloring of Subgraph based on +/- over another subgraph
[2024-12-31 13:34:41] |
emmanuel - Posts: 62 |
There's a way you can cheat to create the appearance of auto-coloring the subgraph. Let's say subgraph X is ID1.SG1 and MovingAvg(X) is ID1.SG2. 1. Add a Spreadsheet Formula study to the chart, and set the formula to: IF(ID1.SG1 > ID1.SG2, ID1.SG1, 0) 2. Copy the 1st Spreadsheet Formula study and change the formula to: IF(ID1.SG1 < ID1.SG2, ID1.SG1, 0) 3. Adjust the subgraph colors in both Spreadsheet Formula studies, as needed. This will produce two new subgraphs rendered in the same chart region, but since they alternatively only produce values when X is above or below MovingAvg(X), and be default subgraphs don't render zero values, you should see what appears to be a single subgraph which changes color. If you see weird connecting lines, you may need to use "Line skip zeros". See Chart Studies: Avoiding Vertical Joining Line for Study Subgraphs |