Forums › ProRealTime English forum › ProBuilder support › Changing TMA Slope indicator by Nicolas to appear on candle sticks!! › Reply To: Changing TMA Slope indicator by Nicolas to appear on candle sticks!!
01/08/2019 at 8:43 AM
#88141
This modified version below color the candlesticks depending of the slope of the TMA.
TMA Slope color on candlesticks
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
//PRC_TMA Slope Norm | indicator //31.10.2017 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //translated from MT4 code // --- settings eintPeriod = 20 edblHigh1 = 0.04 edblLow1 = -0.04 atrPeriod = 100 // --- end of settings atr = AverageTrueRange[atrPeriod](close) dblTma = TriangularAverage[eintPeriod](close) if barindex>eintPeriod then dblPrev = dblTma[1] gadblSlope = ( dblTma - dblPrev ) / atr if ( gadblSlope[0] > edblHigh1 ) then if(gadblSlope[0] < gadblSlope[1]) then drawcandle(open,high,low,close)coloured(0,128,0) else drawcandle(open,high,low,close)coloured(0,255,0) endif elsif ( gadblSlope[0] < edblLow1 ) then if(gadblSlope[0] < gadblSlope[1]) 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 drawcandle(open,high,low,close)coloured(255,105,180) else drawcandle(open,high,low,close)coloured(0,128,128) endif endif endif return |