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
-
-
01/29/2019 at 6:18 PM #8997001/29/2019 at 6:21 PM #8997301/30/2019 at 12:03 AM #89994
😉 sorry again to bother you.. promise that will be the last thing i ask you on this!!! thanks in advance
01/30/2019 at 9:47 AM #90013Here is the code and commented, I’m sure you’ll find easily where to change color depending of the conditions of where is the curve:
123456789101112131415161718192021222324252627282930313233343536373839// --- 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 ) then //above the higher lineif(close < open) thendrawcandle(open,high,low,close)coloured(0,128,0) //light blueelsedrawcandle(open,high,low,close)coloured(0,255,0) //dark blueendif//SELL ONLYelsif ( gadblSlope[0] < edblLow1 ) then //below the lower lineif(close < open) thendrawcandle(open,high,low,close)coloured(255,0,0) //light redelsedrawcandle(open,high,low,close)coloured(178,34,34) //dark redendifelse //ranging between the 2 linesif(gadblSlope[0] < gadblSlope[1]) thendrawcandle(open,high,low,close)coloured(255,105,180) //curve is decliningelsedrawcandle(open,high,low,close)coloured(128,128,128) //curve is ascendingendifendifendifreturnSorry but i’m still struggling to understand what you need exactly about the colors 🙂
01/30/2019 at 2:26 PM #90062sorry im confusing you.. this great as it is and now more clear!! it just last two in the code //the ranging between the 2 lines.lets say12if(gadblSlope[0] < gadblSlope[1]) thendrawcandle(open,high,low,close)coloured(255,105,180) //curve is declining (Pink to go Dark pink if close < open)and1drawcandle(open,high,low,close)coloured(128,128,128) //curve is ascending (grey to go dark grey if close > open)sorry again for complicating…. i think happy with you created already!! thank you nicolas01/31/2019 at 11:56 AM #90134Hopefully this new code will be the good one!! 😆
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647// --- 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 ) then //above the higher lineif(close < open) thendrawcandle(open,high,low,close)coloured(0,128,0) //light blueelsedrawcandle(open,high,low,close)coloured(0,255,0) //dark blueendif//SELL ONLYelsif ( gadblSlope[0] < edblLow1 ) then //below the lower lineif(close < open) thendrawcandle(open,high,low,close)coloured(255,0,0) //light redelsedrawcandle(open,high,low,close)coloured(178,34,34) //dark redendifelse //ranging between the 2 linesif(gadblSlope[0] < gadblSlope[1]) thenif close>open thendrawcandle(open,high,low,close)coloured(255,105,180) //curve is declining and close>openelsedrawcandle(open,high,low,close)coloured(139,58,98) //curve is declining and close<openendifelseif close<open thendrawcandle(open,high,low,close)coloured(128,128,128) //curve is ascending and close<openelsedrawcandle(open,high,low,close)coloured(66,66,66) //curve is ascending and close>openendifendifendifendifreturn1 user thanked author for this post.
02/01/2019 at 7:09 PM #90268Wow… This exactly what i was trying to explain!!! thanks a million Nicolas.. this can be really used as a trading system!! need to change numbers and try!! thank you again!!
-
AuthorPosts
Find exclusive trading pro-tools on
Similar topics: