CM Willams %R and CCI BackGround Highlight

CM_Willams %R and CCI BackGround Highlight

Created By User Request

Indicator Highlights:

Creates Red BackGround Highlight if CCI Or Williams %R are Above Upper Line (User Defined)

Creates Green BackGround Highlight if CCI Or Williams %R are Below Lower Line (User Defined)

Ability to Turn On/Off either Williams %R or CCI Highlights in Inputs Tab via Check Boxes.

Ability To Set All Parameters for CCI and Williams %R in Inputs Tab.

Ability to Set High/Low “Threshold” Lines for Both CCI and Williams %R in Inputs Tab.

***I was asked if you could plot Back Ground Highlights on Two Individual Indicators AND have it show if BOTH Indicators were Overbought and Oversold.
***The answer is Yes. On the Chart Above I have the same Shade of Red and Green for Both Indicators. However, you will notice when Both Indicators Show OverBought…Both Plot Red Back Ground Highlights Which = a Brighter Red. The same is True for Oversold Conditions. The Green Shows a Brighter Shade of Green.

***VERY IMPORTANT - It is difficult for a programmer to release Indicators with this feature because depending on what color background you use on your charts…THE COLORS LOOK COMPLETELY DIFFERENT. So If You Don’t Use The Black Back Ground Shown Above You Most Likely Will Need To Adjust The Transparency, and Possibly The Colors Themselves!!!!

Reference Page
TimWest BackGrnd Highlight!  What
Remove from Favorite Scripts Add to Favorite Scripts
//Created by ChrisMoody on 10-17-2014 by user request.

study(title="CM_Willams %R and CCI BackGround Highlight", shorttitle="CM_%R and CCI", overlay=true)
length = input(21, minval=1, title="Williams %R Length")
willTL = input(10, minval=5, maxval=95, title="Williams %R Trigger Lines, 20 Converts to -20,-80...10 = -10,-90 etc.")
length2 = input(30, minval=1, title="CCI Length")
cciT = input(200, minval=50, maxval=200, title="CCI Trigger Lines, Converts to +100,-100 - +200,-200 etc.")
scci = input(true, title="Show CCI BackGround Highlight")
swill = input(true, title="Show Williams %R BackGround Highlight")
//CCI Code
ma = sma(close, length2)
cci = (close - ma) / (0.015 * dev(close, length2))
cciTA = 0 + cciT
cciTB = 0 - cciT
//CCI Criteria Definitions
cciA = cci > cciTA ? 1 : 0
cciB = cci < cciTB ? 1 : 0
//CCI Color Plots
condCCI = scci and cciA ? red : scci and cciB ? lime : na 
//Williams %R Definitions
upper = highest(length)
lower = lowest(length)
//Williams %R Criteria
willR = 100 * (close - upper) / (upper - lower)
willRAbove = willR > (0 - willTL) ? 1 : 0
willRBelow = willR < (-100 + willTL) ? 1 : 0
//Williams %R Color Definitions
condWill = swill and willRAbove ? red : swill and willRBelow ? lime : na

//Background Highlights
bgcolor(condCCI, transp=70)
bgcolor(condWill, transp=70)
2 years ago
looks great, excellent, thank you
ChrisMoody PRO guidoisot
2 years ago
Thanks For Saying So!!!
2 years ago
That is a great indeed! Coloring when 2 indicators hit!
ChrisMoody PRO 2use
2 years ago
Glad your a satisfied customer 2use
2use ChrisMoody
2 years ago
I will actually try to learn to combine other indicators based of this. Was it too hard to fix this?
ChrisMoody PRO 2use
2 years ago
No...The code is actually like 5 lines just looks a little longer since I added in the checkboxes to turn On/Off plots for the CCI and Williams. Plus I added in ability to change High and Low lines for Williams and CCI
Ideas Scripts Chart
United States
United Kingdom
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out