MACD CCI Overlay

Category: Indicators By: stephane2.0 Created: February 20, 2020, 1:11 PM
February 20, 2020, 1:11 PM
Indicators
5 Comments

Paint the candlesticks with conditions based on CCI and MACD.

  • green color when  cci [14] > 0 and macd line > signal line
  • red color when cci [14] < 0 and macd line < signal line
  • grey color when cci > 0 and macd line< signal line or cci < 0 and macd line> signal line
// Variable

a=CCI[14](typicalPrice)
b=MACDline[12,26,9](close)
c = ExponentialAverage[9](b)


//Hausse
if a > 0 and b > c then
r = 0
b = 0
g = 255

//Baisse
elsif a < 0 and b < c then
r = 255
b = 0
g = 0

//Neutre
elsif a > 0 and b < c OR a < 0 and b > c then
r = 195
g = 195
b = 195
endif

DRAWCANDLE(open,high,low,close) coloured(r,g,b)
 
RETURN

Download
Filename: MACD-CCI-overlay.itf
Downloads: 265
stephane2.0 Junior
This author is like an anonymous function, present but not directly identifiable. More details on this code architect as soon as they exit 'incognito' mode.
Author’s Profile

Comments

Logo Logo
Loading...