This is the corrected version of the T3 moving average. This function measure deviations of the T3 values if the changes are not significant, then the value is “flattened”. So it can be used to spot ranging market or potential reversal zones.
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 |
//PRC_Corrected T3 | indicator //25.08.2018 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //original idea from mladen (MT5 indi) // --- settings inpPeriod = 10 // Period Hot = 0.7 // T3 hot ({-1.5..1.5}) // --- end of settings // T3 price = customclose // Price Period = MAX(inpPeriod, 1) if barindex>Period then e1 = ExponentialAverage[Period](price) e2 = ExponentialAverage[Period](e1) e3 = ExponentialAverage[Period](e2) e4 = ExponentialAverage[Period](e3) e5 = ExponentialAverage[Period](e4) e6 = ExponentialAverage[Period](e5) b = Hot b2 = (b * b) b3 = (b * b * b) c1 = -b3 c2 = (3 * b2) + (3 * b3) c3 = (-6 * b2) - (3 * b) - (3 * b3) c4 = 1 + (3 * b) + b3 + (3 * b2) avg = c1 * e6 + c2 * e5 + c3 * e4 + c4 * e3 //Corrected function n=Period SA = avg v1 = SQUARE(STD[n](close)) v2 = SQUARE(CA[1]-SA) if(v2<v1) then k=0 else k=1-v1/v2 CA=CA[1]+K*(SA-CA[1]) endif //color r=139 g=0 b=139 if avg>CA then r=30 g=144 b=255 endif endif return avg coloured(r,g,b) style(dottedline,1) as "T3", ca coloured(r,g,b) style(line,2) as "corrected T3" |
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 :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials