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
manchokcity can we have it in mql4 platform? or how or which platform do we use it?
camporan I don't use MetaTrader so I won't be able to do the translation myself. Sorry!
Alexander9 This can for amibroker ? . Thanks
riz001 thnk u
geroniman bonjour Nicolas, j ai un indicateur le Tiger . J aiemrai placer des fleches buy et sell dire...
Nicolas Merci de formuler les demandes sur le forum. ça n'est pas le bon endroit et hors sujet ici ! ;)
avatar
Anonymous Hi robertogozzi - thank you very much for sharing this strategy. I have performed various ...
robertogozzi Thank you samsampop.
Dotan Hello guys I really appreciate this coding effort but can I use this code for Mt5 Forex Trad...
ggolfet Thanks Nicolas, I imported the itf file and solved the problem.
Hasardeur Hallo Nicolas, i tried to code the multi period heat map in combination with the Ehler’s ...
Nicolas Please open a new topic with the code in forum.
LucioleLucide Clean view, thanks for sharing
dertopen hi where i can found the window for candle configuration?
paolosab69 Ciao! . I have seen the pictures that explain this metod but i don't understand when is mome...
winnie37 yes. "No ground breaking math here, but I am finding very useful and some algo based on it i...
Jan Wind Also interesting to know what does not work, which set up you use, saves me investigating ! ...
winnie37 i just set the proorder like this: buy when 50/100/200 phase >0 and sell when under 0, go...
Vinks_o_7
6 years ago
IV Mcm I've always wondered how to make the ADX faster, thank you!
Vinks_o_7 You welcome !
Vinks_o_7 Another variation that may be more accurate : we calculate the average of normalized DI's in...
nfulcher Please could someone explain how the following code is calculated:- iDI = TEMA[3](DI[DI2]...
oakenstream Jan, I find sometimes that the priceexit variable is never set. It seems to happen when the ...
Matt66612 I do not understand the first time I launch the backtest I got the same result as you. but ...
coscar Ottimo lavoro. come sempre!
luxrun Nello studio di Sepiashvili viene descritto anche un altro indicatore, il Q-indicator, che è...
avatar
unkown ;-) sfido chiunque a riuscirci!
avatar
unkown infatti basta leggere i post degli altri....
nicola papangelo ciao Francesco vorrei contattarti su facebook o in privato. Grazie
Janfi Hello, I'm new to ProRealCode and I do not understand the following summation[n](indicator...
Kaci It seems he's just checking that the previous MACD is < 0 for maximum one period ? I'...
Daniel Martin Hi do you know how have and entry after the second cross? There is crosses below 0 and cross...
Maik2404 wie kann ich den Code bekommen Paul?
jens_kittner Works with US Crude at 1h as well!
Jean-Claude REGIS Je préconise de regarder les graphiques H1 et M15 pour visualiser la tendance de fond et d'...
capgros Bonjour @Nicolas, Thanks a lot for this tool, it is very useful for me. I would like to s...
Hans63 Would you add the possibility to color also the Heikin Ashi and bar chart?
Nicolas That's possible, please open a new topic in the indicator forum explaining what you need exa...
Nicolas
6 years ago
BSTrend
v10.3
BSTrend
10
Indicators
Florian Legeard C’est à dire sur le prix et non sur le temps ? Merci
Rohit82189 bstrend repaints
Nicolas No, it doesn't repaint.
cfta Hi Fulvio, many thanks for sharing this clever indicator, much appreciated. As Pepsmile ment...
cfta Sorry adding the PRT to code didn't work in the above comment so I guess we will have to set...
juanj Something appears to be wrong with this formula as graphing t shows t to almost never be wit...
Nicolas
7 years ago
Maxime Baudin Interesting, Thank you! :)
franck-david Bonjour Nicolas , actuellement je me forme grace a vos videos tres tres bien expliques mer...
Nicolas Merci. ça n'est pas le lieu pour poser ce genre de question :) Merci d'utiliser le forum Pro...
Vonasi Discussion on this indicator/filter can be found here: https://www.prorealcode.com/topic/121...
Vonasi Forum discussion on these indicators can be found here: https://www.prorealcode.com/topic/av...
jennr29 Hi. Is it possible to convert this code to an mq4 file?
Nicolas Sorry but our website is dedicated to prorealtime programming. However, you can ask for priv...

Top