Optimized Trend Tracker OTT is an indicator that provides traders to find an existing trend or in another words to know which side of the current trend we are on.
We are under the effect of the uptrend in cases where the prices are above OTT , under the influence of a downward trend, when prices are below OTT it is possible to say that we are.
The first parameter in the OTT indicator set by the two parameters is the period/length. OTT will be much sensitive to trend movements if it is smaller. And vice versa, will be less sensitive when it is longer. As the period increases it will become less sensitive to little trends and price actions. In this way, your choice of period, will be closely related to which of the sort of trends you are interested in.
The OTT percent parameter in OTT is an optimization coefficient. Just like in the period small values are better at capturing short term fluctuations, while large values will be more suitable for long-term trends.
(description from original author: KivancOzbilgic)
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 |
//PRC_Optimized Trend Tracker | indicator //24.03.2021 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //converted from pinescript // --- settings length=2 //OTT Period percent=1.4 //OTT Percent mav = 0// MA type (0=SMA,1=EMA,2=WMA,3=Wilder,4=Triangular,5=End point,6=Time series,7 = Hull,8 = ZeroLag, 9=VAR ShowSupport = 1 //show MA ; 1=true / 0=false // --- end of settings src = customclose if barindex>length*2 then if mav>8 then //VAR (vidya MA) once Period = MAX(length, 4) series = src Smooth = 5 once SC = 2 / (Smooth + 1) AbsCMO = (ABS(Chandle[Period](Series))) / 100 IF BarIndex < Period THEN mavg = Series ELSE mavg = (SC * AbsCMO * Series) + (1 - (SC * AbsCMO)) * mavg ENDIF else mavg = average[length,mav](src) ENDIF fark=MAvg*percent*0.01 longStop = MAvg - fark if longstop[1]>0 then longStopPrev = longStop[1] else longStopPrev = longStop endif if MAvg > longStopPrev then longStop = max(longStop, longStopPrev) endif shortStop = MAvg + fark if shortStop[1]>0 then shortStopPrev = shortStop[1] else shortStopPrev = shortStop endif if MAvg < shortStopPrev then shortStop= min(shortStop, shortStopPrev) endif once dir = 1 if dir=-1 and mavg>shortstopprev then dir = 1 elsif dir=1 and mavgMT then OTT = MT*(200+percent)/200 else OTT = MT*(200-percent)/200 endif mavgshow=undefined if showsupport then mavgshow = mavg endif endif return OTT[2] style(line,3), mavgshow |
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
Thanks @Nicolas. I tried to use it as Trend in a proorder system, but don’t know why, it doesn’t work. The system stop. Do you have the same problem? Have a nice day
He is right. MT and mavgMT are not defined and causing errors…..