Support Board
Date/Time: Fri, 07 Feb 2025 17:58:51 +0000
[User Discussion] - Paint MACD Histogram
View Count: 3128
[2016-01-26 21:56:49] |
User550516 - Posts: 9 |
Wonder if anyone could help me or point me to someone who could. I would like to know how to paint the MACD histogram green if last bar closes higher than previous bar. Paint it red if last bar closes below previous bar. Any help appreciated.
|
[2016-01-26 23:53:11] |
Sawtooth - Posts: 4173 |
Use the Color Bar Based On Alert Condition study. You'll need a separate instance for each color. You'll need 3 instances, one for higher, lower, and equal. They need to be below the MACD study in the Studies to Graph list. -Set the Based On to the MACD study -Set the Chart Region to the same as the MACD study -Set the Output When Condition True to Use Input Data -Set the Input Data to MACD Diff -Set the Draw Style to Bar -Set the colors of each -Use these formulas: =C>C[-1] =C<C[-1] =C=C[-1] |
[2016-01-27 01:34:43] |
User550516 - Posts: 9 |
So I would need 3 instances open for green and 3 instances open for red. When you say use these formulas I would input first formula in to alert condition for the first instance and then the 2nd formula into 2nd instance and so on. Thanks a lot for the help.
|
[2016-01-27 01:51:28] |
Sawtooth - Posts: 4173 |
One instance for each color; one for green, one for red, one for when the closes are equal, three total. You use one of the formulas in each instance. The other settings apply to all three instances. |
[2016-01-27 02:03:10] |
User550516 - Posts: 9 |
OK I got it thanks so much. I really appreciate you taking the time to help me.
|
[2016-01-27 20:15:37] |
User380760 - Posts: 88 |
use auto-coloring, select "based on slope", or "based on angle gradient".
Date Time Of Last Edit: 2016-01-27 20:17:47
|
2016-01-27_15-16-48.png / V - Attached On 2016-01-27 20:17:43 UTC - Size: 97.47 KB - 509 views |
[2016-01-27 22:41:41] |
User550516 - Posts: 9 |
Just wondering if you have any thoughts as to why that some of the Histogram bars that appear to be greater than previous bar are not painting green (=C>C[-1]. This was the formula input for this instance.
|
[2016-01-27 23:15:54] |
User550516 - Posts: 9 |
I would like the MACD Histogram bar difference to be the trigger rather than stock price.
|
[2016-01-27 23:27:59] |
Sawtooth - Posts: 4173 |
I misunderstood you to say you wanted to use the price bar closes. If you are referring to the MACD Diff bars, than instead use the suggestion in post #6. |
[2016-01-28 22:17:59] |
User550516 - Posts: 9 |
I adjusted color bar to slope but it appears to still be referencing off of price bar. Any other suggestions.
|
[2016-01-29 00:12:57] |
Sawtooth - Posts: 4173 |
Remove all three Color Bar studies. Then, in the MACD study, set the Auto-coloring of the MACD Diff to 'Based on Slope'. There should be no formulas in the Alerts tab of the MACD study. |
[2016-01-29 00:37:39] |
User550516 - Posts: 9 |
Thanks so much for your patience. That did it, exactly what I was wanting.
|
To post a message in this thread, you need to log in with your Sierra Chart account: