// --- settings
eintPeriod = 33
edblHigh1 = 0.04
edblLow1 = -0.04
atrPeriod = 14
// --- end of settings
atr = AverageTrueRange[atrPeriod](close)
dblTma = TriangularAverage[eintPeriod](close)
if barindex>eintPeriod then
dblPrev = dblTma[1]
gadblSlope = ( dblTma - dblPrev ) / atr
//BUY ONLY
if ( gadblSlope[0] > edblHigh1 ) then
if(close < open) then
drawcandle(open,high,low,close)coloured(0,128,0)
else
drawcandle(open,high,low,close)coloured(0,255,0)
endif
//SELL ONLY
elsif ( gadblSlope[0] < edblLow1 ) then
if(close < open) then
drawcandle(open,high,low,close)coloured(255,0,0)
else
drawcandle(open,high,low,close)coloured(178,34,34)
endif
else
if(gadblSlope[0] < gadblSlope[1]) then
if(close < open) then
drawcandle(open,high,low,close)coloured(255,105,180)
else
drawcandle(open,high,low,close)coloured(128,0,128)
endif
if(gadblSlope[0] > gadblSlope[1]) then
if(close < open) then
drawcandle(open,high,low,close)coloured(32,178,170)
else
drawcandle(open,high,low,close)coloured(0,0,205)
endif
endif
endif
return
Hi it just the last area that i’m trying to make…
Pick colour to go dark pink if close above open price
Blue to go dark blue if close below open price.
if(gadblSlope[0] < gadblSlope[1]) then
if(close < open) then
drawcandle(open,high,low,close)coloured(255,105,180)
else
drawcandle(open,high,low,close)coloured(128,0,128)
endif
if(gadblSlope[0] > gadblSlope[1]) then
if(close < open) then
drawcandle(open,high,low,close)coloured(32,178,170)
else
drawcandle(open,high,low,close)coloured(0,0,205)