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 • 02/15/2024 #

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

  2. Iván • 02/15/2024 #

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

  3. Iván • 02/15/2024 #

    //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 • 02/15/2024 #

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

  5. Madrosat • 02/15/2024 #

    Hello Ivan
    Did you try a strategy with this indicator

  6. Iván • 02/15/2024 #

    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
RakeshPoluri I have a question about the bands on the candles. Is it bollinger bands or something else?
Nicolas I think that's 2 Bollinger Bands
Emperor.it "style(line,2)" C'è una guida ai parametri che si possono modificare ? Tipo stile della lin...
IV Mcm https://www.prorealcode.com/programming-with-prorealtime/
Daniele Maddaluno Écrivez-moi où vous préférez you can easily find me on LinkedIn
AK27 C'est payant visiblement sur linkdin je peux pas vous envoyer, discord vous avez ?
Pensera Bonjour Nicolas, comment est-il possible de backtester cet indicateur? cela fait une erreu...
Nicolas Oui bien sûr, il doit y avoir pas mal de sujets dans le forum à ce propos.
simmerseb Bonjour, merci beaucoup pour cet indicateur je le trouve très clair et pertinent.
Manu L. Bonjour Nicolas, j'ai créé un screener avec l'aide à la prog en TF weekly mais je voudrai...
wtangsiri C'est exactement le même signal que donne le croisement et le décroisement de deux EMA (7 et...
PHAN100 bonjour, j'ai un bug sur le programme recopié prorealtime me dit qu'il y a un problème à ...
IV Mcm Vous devez faire un clic droit sur le prix > propriété > ajouter indicateur Si vous...
punch1 Fonctionne pas chez moi il s'affiche rien pourtant j'ai bien fait le clic droit sur le prix ...
punch1 Je peux te faire un screen d'ecran si tu as un email :)
ferros bonjour , super votre indicateur!!!! est-il possible de l'avoir en histograme +1 /-1 por en...
IV Mcm V2 is coming
SudhirRN is this code working for on tradingview plartform?
Nicolas No. All our codes are made to be used with ProRealTime trading platform: https://www.proreal...
Nicolas Il doit s'agir d'un mauvais copier/coller. Je suggère de télécharger le fichier itf contenu ...
Bard Hello @Nicolas, I can get this to display in a separate indicator panel but not on Price as ...
Stenozar Hi @Nicolas, how can I put the bands on price? Thanks, Stefano
Fabian Hi IV Mcm, have you drawn the rectangles (Dinamic, Range) by yourself in the chart or are...
IV Mcm Myself to illustrate ;)
oraclus Bonjour indicateur très intéressant existe t il un screener qui détecte les actions qui donn...
IV Mcm Ce n'est pas le but de cet indicateur, mais avec un peu d'entraînement vous pourriez le code...
Yantra Thank you for sharing your good work!
Nicolas le code est déjà sur cette page, inutile de fournir un autre format ?! Les fichiers itf sont...
Novice-Surfer Hello IV Mcm, You are my leader ! Your work is incredibly precise, thank you very much f...
Mikolajek Merci pour votre excellent travail !
mickey992 salut merci pour ton partage et ton travaille
patapouf Hi Vivien René I just discovered your “Ordered trend-following stocks Screener”. Great work...
afanitro424 its not plotting on chart but instead as it's own histogram directly below chart? How to fix...
Nicolas by adding the indicator on the chart :)
Nicolas Oui c'est possible. Merci de ne pas poster des demandes qui sont hors sujets. Pour les deman...
Igor Merci pour cet itf. Question : comment faire pour instruire un screener ?
Nicolas tester le croisement du Close avec la première valeur de l'indicateur : "TrailingStop", faci...
Dunstan I would like to get guidance_ How do I access and attach this indicator to my MT5 platform...
Nicolas You can't, use prorealtime, it's way better
jc84 Thank you very much for this indicator , not provided by PRT I was actually working at thi...
Nicolas Oui le code est correct et il fonctionne, j'ai de bons résultats sur la liste NASDAQ par exe...
pincherman Bonjour :-) J'ai coller le script dans prorealtime pour jouer avec le supertrend et j'ai un...
Nicolas Vous l'avez sans doute collé au mauvais endroit, dans l'éditeur de code pour les stratégies,...

Top