The TMA Slope oscillator is a simple slope of a Triangular Moving Average compared and normalized with the Average True Range of the last 100 periods (default setting).
This specific version add 2 triggers to give trading signals according to the slope:
- Above superior trigger, the trend is bullish, so trading is “Buy Only”
- Below inferior trigger, the trend is bearish, trading is “Sell Only”
- If the slope is included between these 2 levels, the market is probably ranging and no new orders should be initiated
These trading signals should be compared between different timeframes (attached examples), for a better accuracy.
Converted from an MT4 indicator, by a request in the English ProBuilder forum.
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 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
//PRC_TMA Slope Norm | indicator //31.10.2017 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //translated from MT4 code defparam drawonlastbaronly=true // --- 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 gadblUp1 = gadblSlope[0] gadblUp2 = 0 gadblDn1 = 0 gadblDn2 = 0 gadblMid1 = 0 gadblMid2 = 0 else gadblUp1 = 0 gadblDn1 = 0 gadblDn2 = 0 gadblUp2 = gadblSlope[0] gadblMid1 = 0 gadblMid2 = 0 endif elsif ( gadblSlope[0] < edblLow1 ) then if(gadblSlope[0] < gadblSlope[1]) then gadblUp2 = 0 gadblDn1 = 0 gadblUp1 = 0 gadblDn2 = gadblSlope[0] gadblMid1 = 0 gadblMid2 = 0 else gadblUp2 = 0 gadblUp1 = 0 gadblDn2 = 0 gadblDn1 = gadblSlope[0] gadblMid1 = 0 gadblMid2 = 0 endif else if(gadblSlope[0] < gadblSlope[1]) then gadblMid2 = gadblSlope[0] gadblMid1 = 0 gadblUp1 = 0 gadblUp2 = 0 gadblDn1 = 0 gadblDn2 = 0 else gadblMid1 = gadblSlope[0] gadblMid2 = 0 gadblUp1 = 0 gadblUp2 = 0 gadblDn1 = 0 gadblDn2 = 0 endif endif endif if gadblSlope>0 then offset = edblLow1 else offset = edblHigh1 endif drawtext("#gadblSlope#",barindex,offset*2,Dialog,Bold,16) if gadblSlope>edblHigh1 then drawtext("Buy Only",barindex,offset*3,Dialog,Standard,18) coloured(0,255,0) elsif gadblSlope<edblLow1 then drawtext("Sell Only",barindex,offset*3,Dialog,Standard,18) coloured(255,0,0) else drawtext("Ranging",barindex,offset*3,Dialog,Standard,18) coloured(100,100,100) endif return gadblUp1 coloured(0,128,0) style(histogram,1), gadblUp2 coloured(0,255,0) style(histogram,1), gadblDn1 coloured(178,34,34) style(histogram,1), gadblDn2 coloured(255,0,0) style(histogram,1), gadblMid1 coloured(0,128,128) style(histogram,1), gadblMid2 coloured(255,105,180) style(histogram,1), edblHigh1 coloured(100,100,100) style(dottedline) , edblLow1 coloured(100,100,100) style(dottedline) |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Tx Nicolas. Looks very interresting. No text display on my charts. Any specific option to tick somewhere on the PRT interface to have it displayed or … ?
Tx again and in advance.
Be sure to have these settings set with these values:
//edblHigh1 = 0.04
//edblLow1 = -0.04
(not sure if it’s the case in the ITF file..).
Ok, got it ! Great ! Tx
Hi Nocolas.. I’m really bog fan of this indicator! is there any possibility make this indicator works on the chart itself… i mean changing colours on the candle stick according to the indicator??
Hi Nicolas.. I’m really big fan of this indicator! is there any possibility to make this indicator works on the chart itself… i mean changing colours on the candle stick according to the indicator??
Sorry for the typo above and thanks in advance.
Yes, that’s possible. Please open a new topic in the forum.
Just saw your reply thank you!! I will open up a new topic!!