Optimized Trend Tracker OTT

Optimized Trend Tracker OTT

Optimized Trend Tracker OTT is an indicator that provides traders to find an existing trend or in another words to see 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.

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.

In addition, when OTT is used with the support line in it, buy and sell signals
it will become a producing indicator.

You can use OTT default alarms and Buy Sell signals like:

1-
BUY when Prices are above OTT
SELL when Prices are below OTT

2-
BUY when OTT support Line crosses over OTT line.
SELL when OTT support Line crosses under OTT line.

3-
BUY when OTT line is Green and makes higher highs.
SELL when OTT line is Red and makes lower lows.

Text from his author: KivancOzbilgic

Share this

Risk disclosure:

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 : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. MaoRai54 • 311 days ago #

    Hi, many thanks for this indicator but it doesn’t work. Need to define the AverageTypeVAR

  2. Iván • 310 days ago #

    Hi! If you download the indicator the variable will be defined. Anyway here you have again with default parameters:

  3. Iván • 310 days ago #

    //PRC_Optimized Trend Tracker | indicator
    //version = 0
    //14.02.24
    //Iván González @ http://www.prorealcode.com
    //Sharing ProRealTime knowledge
    ////developer: ANIL ÖZEKŞİ
    //////inputs
    src = customclose
    length = 2 //OTT period
    percent = 1.4 //OTT percent
    showsupport = 1 //Show Support Line
    showsignalsk = 1 //Show Support Line Crossing Signals
    showsignalsc = 0 //Show Price/OTT Crossing Signals
    highlight = 0 //Show OTT Color Changes
    highlighting = 1 //Highlighter On/Off
    AverageTypeVAR = 1 // use VAR average
    mav = 1 //Moving Average Type
    ///////indicator
    ////VAR
    if barindex < 9 then
    var = src
    else
    valpha=2/(length+1)
    if src > src[1] then
    vud1= src-src[1]
    vdd1= 0
    elsif src < src[1] then
    vud1= 0
    vdd1=src[1]-src
    else
    vud1=0
    vdd1=0
    endif
    vUD=summation[9](vud1)
    vDD=summation[9](vdd1)
    vCMO=(vUD-vDD)/(vUD+vDD)
    VAR=(valpha*abs(vCMO)*src)+(1-valpha*abs(vCMO))*VAR[1]
    endif
    if barindex < length then
    Mavg = src
    dir = 1
    else
    if AverageTypeVAR then
    Mavg = var
    else
    Mavg=average[length,mav](src)
    endif
    fark = Mavg*percent*0.01

    longStop = Mavg – fark
    longStopPrev = longStop[1]

    if Mavg > longStopPrev then
    longStop = max(longStop,longStopPrev)
    else
    longStop = longStop
    endif

    shortStop = Mavg + fark
    shortStopPrev = shortStop[1]

    if Mavg < shortStopPrev then
    shortStop = min(shortStop,shortStopPrev)
    else
    shortStop = shortStop
    endif

    if dir = -1 and Mavg > shortStopPrev then
    dir = 1
    elsif dir = 1 and Mavg < longStopPrev then
    dir = -1
    else
    dir = dir[1]
    endif
    endif

    if dir = 1 then
    MT = longStop
    else
    MT = shortStop
    endif

    if Mavg > MT then
    OTT = MT*(200+percent)/200
    else
    OTT = MT*(200-percent)/200
    endif

    pALL = OTT[2]
    ///////////OTT colors
    if highlight then
    if OTT[2]>OTT[3] then
    r=76
    g=175
    b=80
    else
    r=255
    g=82
    b=82
    endif
    else
    r=184
    g=0
    b=117
    endif
    //////////print signals
    buysignal = Mavg crosses over OTT[2]
    sellsignal = Mavg crosses under OTT[2]

    if buysignal and showsignalsk then
    drawarrowup(barindex,low-0.25*averagetruerange[10](close))coloured(“green”)
    elsif sellsignal and showsignalsk then
    drawarrowdown(barindex,high+0.25*averagetruerange[10](close))coloured(“red”)
    endif

    buySignalc = src crosses over OTT[2]
    sellSignallc = src crosses under OTT[2]

    if buySignalc and showsignalsc then
    drawtext(“▲”,barindex,low-0.25*averagetruerange[10](close))coloured(“green”)
    elsif sellSignallc and showsignalsc then
    drawtext(“▼”,barindex,high+0.25*averagetruerange[10](close))coloured(“red”)
    endif

    if Mavg > OTT then
    r1=0
    g1=250
    b1=0
    else
    r1=250
    g1=0
    b1=0
    endif

    mplot = (high+low+close+open)/4

    if highlighting then
    colorbetween(mplot,pALL,r1,g1,b1,40)
    endif

    return Mavg*showsupport as “Media” coloured(0,0,250)style(dottedline,2),pALL as “OTT”coloured(r,g,b)style(line,2)

  4. MaoRai54 • 310 days ago #

    Thanks, now it’s OK. in your first code at line 15-16 it’s missing.

  5. Madrosat • 310 days ago #

    Hello Ivan
    Did you try a strategy with this indicator

  6. Iván • 310 days ago #

    Hi. No I didn’t. This is a code translation requested by an user a few days ago.

avatar
Register or

Likes

avatar avatar avatar avatar
Related users ' posts
Iván
2 months ago
Madrosat Bonjour ivan Quelle différence il y a t il entre Extra trend et ultra trend lequel est le p...
MaoRai54 dear Ivan, it seems to be very interesting but please clarify what are all the lines I see i...
Iván Hi! you have the answer in the last line of code... MacdMiddle as "histo" style(histogra...
kats Le Top , a utiliser avec le nuage violet et alerte TN pour plus de précision.
roccafragius Hello Ivan, very good job! May I ask you to translate teh script from TradingView named Tre...
Iván Hi! yes. You can ask for it here: https://www.prorealcode.com/free-code-conversion/
roccafragius Thank you so much Ivan! I created this request in english Translate from TradingView Indicat...
Regisnew très bel indicateur merci
Jean2139 Bonjour Yvan, Merci pour ton indicateur que je trouve très intéressant. Je suppose que tu ...
Suffi Hier eine kleine Korrektur: //-----Inputs-----------------------------------------// MALengt...
kats Bonjour, J'ai une question etes vous trader? Je m'explique , j'ai téléchargé tous les indi...
Faisalx Hola Ivan. Thanks for your great job. I would appreciate if you have look at my request http...
roccafragius Thank you for all these useful information!! Very great job Ivan! THank you so much
geroniman Merci Ivan, super travail. On peut toujours compter sur toi pour apporter des innovations su...
Stenozar Ciao IVAN , mi da errore per la riga 49 "print tema low"; puoi suggerirmi la modifica da met...
Iván Avete provato a scaricare il file .itf?
AndyB72 Caricato ora sulla V12, nessun errore.
Iván Allora crei un nuovo post. Lo aspetterò.
Stenozar Ciao Ivan, ho inserito il post con la richiesta di traduzione. Se puoi vedere, grazie!
Iván perfect!
kats BONSOIR c bon merci j ai trouve ce weekend merci de votre reponse cdlt
the_giorgio Hi, nice work I would like to understand something about prorealtime code. With your ...
Iván Hello. When you use the drawcandle() instruction then in the configuration window you add ...
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
Iván
9 months ago
Iván Si lo descargas e importas en tu PRT verás que se han creado las variables para luego config...
WhyAskOZ Hi, Ivan As always you are doing great coding. The code works on my PRT, however the issu...
Iván You can delete in the last line (return) the configuration for color. Delete coloured(xx,xx,...
Bernard13 (Je réécris mon commentaire -français- en français car certains mots ne correspondaient pas ...
Iván 1000 indicateurs !!! brutaux
Lean Me parece muy buen indicador, y se complementa muy bien en mi sistema, ¿podrías crear un scr...
Iván Gracias! Para el screener sólo tienes que copiar el indicador y poner como condición de búsq...
Lean Muchas gracias Iván, ya lo he podido crear.
Doddge Hola Iván, ¿sería posible crear un screener que indique cuándo las velas coloreadas del indi...
RTR Ivan thank you for the pro-screener. I a trying to understand how to write the signals from ...
Iván Hi, Lines 62 and 63. These lines define buy and sell conditions.
Iván Hi You should delete from the indicator code all drawing functions and all variables not us...
Iván I've created a screener to show [longcondition or shortcondition]
Chrisinobi Hallo Ivan, Danke das ist Perfekt !! Kannst du bitte in der Screener-Bibliothek die itf. hoc...
Iván
10 months ago
cjr30 Simplemente modifica las lineas 19 y 21 por las siguientes: drawtext("▲",barindex,low-0.1*a...
groelandes Gracias!!
WhyAskOZ i copied the code into strategy and it gives error on line 21 and 23. it says " Line 1: ...
Iván
10 months ago
Madrosat Hello Ivan You have interesting topics on indicators , smart supertrend, optimised trend t...
Iván Hi! thanks. All of these codes are translations requested in the forum. I've on mind to back...
Raspete01 Buenos días Iván, estoy intentando llevar el código eliminando los colores y pasando un Back...
Iván
11 months ago
winnie37 Hi Ivan, if i want to use it, and call the oscillator value (in grey, green or red), how to...
Iván The oscillator is smoothtype. In inputs there is de lag to configure the output

Top