Changing TMA Slope indicator by Nicolas to appear on candle sticks!!
Forums › ProRealTime English forum › ProBuilder support › Changing TMA Slope indicator by Nicolas to appear on candle sticks!!
- This topic has 21 replies, 3 voices, and was last updated 5 years ago by crolakstrading.
Tagged: drawcandle, slope, TMA
-
-
12/25/2018 at 3:38 PM #87631
Regarding TMA Slope indicator by Nicolas!!
https://www.prorealcode.com/prorealtime-indicators/tma-slope/
Think this indicator will work amazingly on candlesticks itself.. So I was wondering rather than using it as a separate indicator if we can make the indicator work on candlesticks itself would be great!! ie: when indicator change colours.. candles go green, dark green, red, dark red and purple and blue etc..!!
Just have a kind request if anyone can make this possible??
Thank you in advance
R
01/08/2019 at 8:43 AM #88141This modified version below color the candlesticks depending of the slope of the TMA.
TMA Slope color on candlesticks1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950//PRC_TMA Slope Norm | indicator//31.10.2017//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//translated from MT4 code// --- settingseintPeriod = 20edblHigh1 = 0.04edblLow1 = -0.04atrPeriod = 100// --- end of settingsatr = AverageTrueRange[atrPeriod](close)dblTma = TriangularAverage[eintPeriod](close)if barindex>eintPeriod thendblPrev = dblTma[1]gadblSlope = ( dblTma - dblPrev ) / atrif ( gadblSlope[0] > edblHigh1 ) thenif(gadblSlope[0] < gadblSlope[1]) thendrawcandle(open,high,low,close)coloured(0,128,0)elsedrawcandle(open,high,low,close)coloured(0,255,0)endifelsif ( gadblSlope[0] < edblLow1 ) thenif(gadblSlope[0] < gadblSlope[1]) thendrawcandle(open,high,low,close)coloured(255,0,0)elsedrawcandle(open,high,low,close)coloured(178,34,34)endifelseif(gadblSlope[0] < gadblSlope[1]) thendrawcandle(open,high,low,close)coloured(255,105,180)elsedrawcandle(open,high,low,close)coloured(0,128,128)endifendifendifreturn01/08/2019 at 6:37 PM #88197Hi Nicolas,
This is brilliant.. Thank you very very much!
I have tried to add variables to this but it doesn’t seem to work for some reason.. Please will you be able to check this to see what’s wrong?01/09/2019 at 9:50 AM #8822201/09/2019 at 4:56 PM #88265Thanks again Nicolas.. Managed to get it right!!
Is there anyway to add up to identify open and close price?
ie: if a down candle – candle close below open price to go very darker darker colour – according to this it will go green on an up trend but on that trend down candle to go darker green and if a down trend to go other way around??01/10/2019 at 10:57 AM #8829601/10/2019 at 4:37 PM #88319Hi Nicolas,
what i mean by the trend is.. according to the original indicator ”“Buy Only” or “Sell only”
to identify the open and close price in the candles.. ie: if its Buy only now all candles will go green and can’t find the open and the close price so if its “Buy Only” price close below open price to go darker green or any other way to find the open and close price??Sorry if i’m making it complicated…
01/10/2019 at 5:24 PM #88324Well, this is a new version, candlesticks are coloured depending of if they are bullish/bearish and with a condition made of the slope above or below the High1 and Low1 levels. They are grey when ranging.
123456789101112131415161718192021222324252627282930313233343536373839404142434445// --- settingseintPeriod = 20edblHigh1 = 0.04edblLow1 = -0.04atrPeriod = 100// --- end of settingsatr = AverageTrueRange[atrPeriod](close)dblTma = TriangularAverage[eintPeriod](close)if barindex>eintPeriod thendblPrev = dblTma[1]gadblSlope = ( dblTma - dblPrev ) / atr//BUY ONLYif ( gadblSlope[0] > edblHigh1 ) thenif(close < open) thendrawcandle(open,high,low,close)coloured(0,128,0)elsedrawcandle(open,high,low,close)coloured(0,255,0)endif//SELL ONLYelsif ( gadblSlope[0] < edblLow1 ) thenif(close < open) thendrawcandle(open,high,low,close)coloured(255,0,0)elsedrawcandle(open,high,low,close)coloured(178,34,34)endifelse//if(gadblSlope[0] < gadblSlope[1]) then//drawcandle(open,high,low,close)coloured(255,105,180)////elsedrawcandle(open,high,low,close)coloured(128,128,128)//endifendifendifreturn1 user thanked author for this post.
01/14/2019 at 12:58 AM #88502This is great.. thank you Nicolas!!
01/18/2019 at 1:35 AM #89008last part of the code123456789101112131415endifelseif(gadblSlope[0] < gadblSlope[1]) thenif(close < open) thendrawcandle(open,high,low,close)coloured(32,178,170)elsedrawcandle(open,high,low,close)coloured(199,,21,133)elsedrawcandle(open,high,low,close)coloured(240,128,128)elsedrawcandle(open,high,low,close)coloured(25,25,112)endifendifendifHi Nicolas,
I have managed to change the last two colour into pick and blue according to the original indicator instead of all white!! is there a way to make it dark pick and dark blue.. just to identify the close open price.. exactly like you did to buy only and sell only!!!
sorry I’m asking loads here… this is the last thing i’m asking… i cant get this right and 🙁 try to add up but getting an error!!01/23/2019 at 9:27 AM #8939701/23/2019 at 10:02 AM #89400Maybe this will help https://www.prorealcode.com/wp-content/uploads/2015/09/P1jHlnG.jpg ?
1 user thanked author for this post.
01/23/2019 at 11:12 AM #89413!!!
1 user thanked author for this post.
01/23/2019 at 7:07 PM #8948351 Error123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051// --- settingseintPeriod = 33edblHigh1 = 0.04edblLow1 = -0.04atrPeriod = 14// --- end of settingsatr = AverageTrueRange[atrPeriod](close)dblTma = TriangularAverage[eintPeriod](close)if barindex>eintPeriod thendblPrev = dblTma[1]gadblSlope = ( dblTma - dblPrev ) / atr//BUY ONLYif ( gadblSlope[0] > edblHigh1 ) thenif(close < open) thendrawcandle(open,high,low,close)coloured(0,128,0)elsedrawcandle(open,high,low,close)coloured(0,255,0)endif//SELL ONLYelsif ( gadblSlope[0] < edblLow1 ) thenif(close < open) thendrawcandle(open,high,low,close)coloured(255,0,0)elsedrawcandle(open,high,low,close)coloured(178,34,34)endifelseif(gadblSlope[0] < gadblSlope[1]) thenif(close < open) thendrawcandle(open,high,low,close)coloured(255,105,180)elsedrawcandle(open,high,low,close)coloured(128,0,128)endifif(gadblSlope[0] > gadblSlope[1]) thenif(close < open) thendrawcandle(open,high,low,close)coloured(32,178,170)elsedrawcandle(open,high,low,close)coloured(0,0,205)endifendifendifreturnHi 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)01/28/2019 at 4:49 PM #89847 -
AuthorPosts
Find exclusive trading pro-tools on