Login Page - Create Account

Support Board


Date/Time: Fri, 12 Sep 2025 07:47:20 +0000



Post From: Color Background Based on Slope of Stoch

[2016-08-04 02:05:40]
Sawtooth - Posts: 4263
Try this:

Add three instances of the Color Background Based On Alert Condition study, one each for up, down and equal.
Set the Chart Region to all the same region as the Stoch study, then hide the Stoch study.

For the upsloping %K, use this formula on Alerts tab of the Color Background study:
=ID1.SG1>ID1.SG1[-1]

For the downsloping %K, use this formula on Alerts tab of the Color Background study:
=ID1.SG1>ID1.SG1[-1]

For the flat %K, use this formula on Alerts tab of the Color Background study:
=ID1.SG1=ID1.SG1[-1]

where ID1 is the Stoch study, edit as needed.

Size the chart region small so that it looks like a horizontal bar.