**"Optimized Trend Tracker" (OTT)**is an effective trend-following indicator created by

**Anıl Özekşi**. It aims to detect the current trend direction based on an elegant mathematical construct. The key defining characteristic of OTT is its reliance on a trailing-stop mechanism. This enables OTT to identify price movements and follow the price until a reversal occurs. The widespread adoption of OTT in various algo-trading platforms has fostered the development of diverse applications of the indicator over time. Examining its history, eight distinct applications emerge.

*1) OTT - Optimized Trend Tracker*

2) TOTT - Twin Ott

3) OTT Channel - Half Channel & Fibonacci Channel

4) RISOTTO - Rsi Ott

5) SOTT - Stochastic Ott

6) HOTT & LOTT - Highest-Lowest Ott + Sum Option

7) ROTT - Relative Ott

8) FT - "Fırsatçı" Trend

BONUS: RTR - Relative True Range

2) TOTT - Twin Ott

3) OTT Channel - Half Channel & Fibonacci Channel

4) RISOTTO - Rsi Ott

5) SOTT - Stochastic Ott

6) HOTT & LOTT - Highest-Lowest Ott + Sum Option

7) ROTT - Relative Ott

8) FT - "Fırsatçı" Trend

BONUS: RTR - Relative True Range

Each system functions as an independent indicator and the "OTT Collection" is intended to present all of them in a single script.

**ORIGINALITY**

Primarily, this script introduces previously unreleased OTT applications on Tradingview (RISOTTO, ROTT, FT). In contrast to previously published examples that treat OTT as a variable, this script portrays OTT as a function, rendering it adaptable for more intricate computations. Consequently, OTT has evolved into a versatile tool capable of facilitating complex analyses. Furthermore, this script offers an innovative feature that permits the blocking of consecutive signals in the same direction, catering to user preferences. (This feature is crucial for all indicators utilizing band structures such as TOTT and HOTT-LOTT).

**USAGE**

It is simple to use. The settings section of the indicator groups the parameters. In first group, the System parameter allows you to select the OTT system you want to display on the chart. Activating the Pyramiding parameter enables the display of consecutive signals in the same direction (for TOTT and HOTT-LOTT). In the second group you can change the display options with the Barcolor, Signal and Bars parameters. The OTT system you select is configured with the parameters in the group with the corresponding system heading. (For example, suppose you select OTT CHANNEL in the system parameter. The parameters defining the channels are grouped under the heading "OTT CHANNELS" in the settings section.) Also the parameters you chose are displayed in table form on the chart screen. The table also presents the total number of bars on the chart and the number of signals generated by the selected system.

**MECHANICS**

Let's take a look at how the indicator works. This indicator incorporates eight distinct OTT systems, each characterized by unique parameters, lines, and signals. (Exception: OTT Channel does not include any referenced signals.)

**1) WHAT IS "OTT"?**

**OTT**comprises two lines: Support and Target. There's an up-trending market when the Support is superior to the Target, and a down-trending market when the Support is inferior to the Target. It is governed by two parameters. The Support (moving average) is determined by the Length parameter, while the Multiplier parameter is employed for percentage calculations. Lower values are adept at capturing short-term fluctuations, whereas higher values are more adept at identifying long-term trends. These principles apply to all parameters within the indicator.

*DETAILED INFO : The OTT function in the script automatically performs the calculation process described in this section. So, if you know how OTT works you can skip the details. To comprehend its functioning, it's essential to grasp the "MOST" indicator, also devised by Anıl Özekşi. The fundamental principle of MOST involves creating bands that function akin to a trailing stop-loss. Initially, a moving average, referred to as the 'Support,' is established. (Anıl Özekşi employs VAR/VIDYA as the moving average type in all his systems.) Subsequently, the Support line is adjusted both upward and downward by a percentage multiplier to establish a band system. In the context of the trailing stop-loss concept, when the Support line approaches either the lower or upper band, the respective band ceases to move in parallel with the Support line and becomes horizontal. Consequently, the Support always intersects the band at some point. The values of the upper or lower bands, determined by this intersection, are referred to as the MOST line. OTT is generated by consolidating the values of MOST shifted upwards and downwards by half the coefficient percentage into a single line using the same method as above, and calculating the value of this line from two bars ago. Support is the data series of OTT and it serves as a source in OTT function. The OTT line is named as "Target" in this scipt. Support and Target will automatically vary according to the OTT application selected in the "System" parameter.*

**2) WHAT IS "TOTT"?**

**Twin OTT**, also known as the "OTT Band," involves three parameters: Length, Multiplier, and Band Multiplier. It consists of three lines: Support, Upper Line, and Lower Line. OTT is determined by the Length and Multiplier parameters, while TOTT is calculated by adjusting OTT upwards and downwards as per the Band Multiplier parameter. The indicator generates signals based on the intersections of the Support and these two new OTT levels.

**3) WHAT IS "OTT CHANNEL"?**

Similar to TOTT, the

**OTT CHANNEL**is also based on shifted OTT levels, employing a similar calculation method. The primary distinction lies in the fact that TOTT has a single Band Multiplier, whereas OTT CHANNEL incorporates two line multipliers for the band. It encompasses four parameters: Length, Multiplier, Upper Line Multiplier, and Lower Line Multiplier. OTT is defined by the Length and Multiplier parameters. The Upper Line Multiplier and Lower Line Multiplier parameters establish the channel boundaries by shifting the OTT line. Subsequently, levels are drawn between the upper and lower lines. The additional Channel Type parameter determines which levels are displayed on the chart. The "Half Channel" option draws channels shifted by half the coefficient. The "Fibonacci Channel" option draws channels shifted by 0.382 and 0.618 coefficients. The "Both" option plots all levels.

**4) WHAT IS "RISOTTO"?**

OTT also has application examples in momentum oscillators.

**RISOTTO**utilizes the RSI indicator and operates with three parameters. The RSI is defined by the Length 1 parameter, while the Support is determined by the Length 2 parameter. The Multiplier parameter is utilized for percentage calculations. RISOTTO comprises two lines: Support and Target. To ensure more stable calculations, a constant (+1000) is added to the oscillator average when applying OTT to momentum oscillators. This approach eradicates nonsensical results stemming from percentage calculations when the oscillator reaches a value of 0. The indicator generates signals based on the intersection of these two lines.

**5) WHAT IS "SOTT"?**

**Stochastic OTT**is an another example of application on oscillator. Its working principle is akin to that of RISOTTO. It operates with three parameters. The Stochastic %k is defined by the Length 1 parameter, while the Stochastic %d is determined by the Length 2 parameter. The Multiplier parameter is utilized for percentage calculations. SOTT comprises two lines: Support and Target. The indicator generates signals based on the intersection of these two lines.

**6) WHAT IS "HOTT-LOTT"?**

OTT can be applied to the highest and lowest series as well.

**HOTT-LOTT**operates with three parameters: Length, Multiplier, and Sum N Bars. The highest and lowest series are defined by the Length parameter. The Multiplier parameter is utilized for percentage calculations. It encompasses two lines: Upper Line and Lower Line, where HOTT employs the highest series and LOTT uses the lowest series. If the 'High' price surpasses HOTT, the indicator generates Long signals. Similarly, if the 'Low' price falls below LOTT, the indicator generates Short signals. When the Sum N Bars option is activated, signals are generated based on the confirmation concept for N bars.

**7) WHAT IS "ROTT"?**

**Relative OTT**serves as a valuable tool for long-period filters. ROTT operates with two parameters. The Support is determined by the length parameter and equals twice the moving average. The Multiplier parameter is utilized for percentage calculations. The indicator generates signals based on the intersection of these two lines.

**8) WHAT IS "FT"?**

**"Fırsatçı" (opportunistic) Trend**is a system that revolves around two levels, namely major and minor OTT. It operates with three parameters: Length, Major Multiplier, and Minor Multiplier. FT comprises two lines, Support and Target. The indicator generates signals based on the intersection of these two lines.

**9) WHAT IS "RTR"?**

**Relative True Range**is not an OTT system; however, it serves as a complementary feature. It does not have any referenced signals. RTR is devised to obtain a normalized result of the current market volatility. It operates with two parameters: ATR, which is determined by the Length 1 parameter, and RTR, defined by the Length 2 parameter.

**A TIP**

If any indicator is defined in function form instead of the OTT function, the applications can also be adapted for different indicators.

*E.g. Supertrend, PMAX, AlphaTrend, etc.*

**UPDATE**

Anıl Özekşi is a competent algotrader who shares his work with open sources. I will update the indicator as new applications are released.

**DISCLEIMER**

This is just an indicator, nothing more. The script is for informational and educational purposes only. The use of the script does not constitute professional and/or financial advice. The responsibility for risks associated with the use of the script is solely owned by the user. Do not forget to manage your risk. And trade as safely as possible. Good luck!

The alert functions have been added and the required outputs for backtesting have been generated.

TOTT calculation has been revised. (There is no significant difference between TOTT and TOTTO calculations. However, to avoid multiple TOTT definitions in community scripts, the difference has been corrected and the previous calculation has been made a comment line.)

Update Notes :

1) With this update, Anıl Özekşi's new indicators MOTT (Multiple Optimized Trend Tracker) and BOOTS (Bollinger Optimized Trend Tracker Spread) have been added to the collection. Both indicators generate long and short signals and a version with signals has not yet been released on Tradingview. That's a necessary :)

2) A boolean "Color" option has also been added. With this option, users can color the candles generated by the indicator (according to the signal direction).

3) Some parameters have been renamed for ease of use. Calculations have not been changed.

WHAT IS "MOTT"?

"Multiple OTT" is a kind of channel system, just like OTT Channels. The difference is that MOTT is constructed on four equal zones between HOTT and LOTT. In addition, OTT Channels do not generate any signals, whereas MOTT has long and short signals. The signal generation method provides an example calculation that can be used for many different channel structures. But first let's talk about the levels. MOTT consists of five levels. The highest and lowest levels are the familiar HOTT and LOTT. The middle level is the arithmetic average of the highest and lowest level. The remaining two levels are named "Mid Upper Line" & "Mid Lower Line" and are calculated as the arithmetic average of the middle level and the highest and lowest levels respectively. Signal generation occurs when the Support (moving average) crosses these levels to the upside or downside. As long as Support continues its upward movement, the long position is maintained, and when the downward movement starts, a short position is formed when the intersection with any of the levels occurs. The reverse of this situation occurs as a shift from a short position to a long position. There are two exceptions : Support & LOTT intersection is ignored when holding a Long position and Support & HOTT intersection is ignored when holding a Short position. MOTT has a total of four parameters. The Support Length parameter defines the length of the Support. The HL Length parameter defines the length of HOTT and LOTT. The OTT Multiplier parameter is used in OTT. The Referance parameter shifts the levels (offset).

WHAT IS "BOOTS"?

In fact, the "Bollinger OTT Spread" is based on using Bollinger Bands as a source in HOTT & LOTT :). Of course, there are slight differences in the calculation, but the basic logic can be summarized in this way. First of all, when creating the Bollinger Band, we use VAR/VIDYA instead of the default SMA, as in every OTT system. After creating the Upper and Lower Bollinger bands, we find the average of both of them separately and use these values as a source in OTT. And as usual, we generate long and short signals depending on their intersection with Support. "BOOTS" consists of three lines and has three parameters. Support Length defines the length of Support. BB Length defines the length of the Bollinger Bands. And OTT Multiplier is used in OTT.

1) With this update, Anıl Özekşi's new indicators MOTT (Multiple Optimized Trend Tracker) and BOOTS (Bollinger Optimized Trend Tracker Spread) have been added to the collection. Both indicators generate long and short signals and a version with signals has not yet been released on Tradingview. That's a necessary :)

2) A boolean "Color" option has also been added. With this option, users can color the candles generated by the indicator (according to the signal direction).

3) Some parameters have been renamed for ease of use. Calculations have not been changed.

WHAT IS "MOTT"?

"Multiple OTT" is a kind of channel system, just like OTT Channels. The difference is that MOTT is constructed on four equal zones between HOTT and LOTT. In addition, OTT Channels do not generate any signals, whereas MOTT has long and short signals. The signal generation method provides an example calculation that can be used for many different channel structures. But first let's talk about the levels. MOTT consists of five levels. The highest and lowest levels are the familiar HOTT and LOTT. The middle level is the arithmetic average of the highest and lowest level. The remaining two levels are named "Mid Upper Line" & "Mid Lower Line" and are calculated as the arithmetic average of the middle level and the highest and lowest levels respectively. Signal generation occurs when the Support (moving average) crosses these levels to the upside or downside. As long as Support continues its upward movement, the long position is maintained, and when the downward movement starts, a short position is formed when the intersection with any of the levels occurs. The reverse of this situation occurs as a shift from a short position to a long position. There are two exceptions : Support & LOTT intersection is ignored when holding a Long position and Support & HOTT intersection is ignored when holding a Short position. MOTT has a total of four parameters. The Support Length parameter defines the length of the Support. The HL Length parameter defines the length of HOTT and LOTT. The OTT Multiplier parameter is used in OTT. The Referance parameter shifts the levels (offset).

WHAT IS "BOOTS"?

In fact, the "Bollinger OTT Spread" is based on using Bollinger Bands as a source in HOTT & LOTT :). Of course, there are slight differences in the calculation, but the basic logic can be summarized in this way. First of all, when creating the Bollinger Band, we use VAR/VIDYA instead of the default SMA, as in every OTT system. After creating the Upper and Lower Bollinger bands, we find the average of both of them separately and use these values as a source in OTT. And as usual, we generate long and short signals depending on their intersection with Support. "BOOTS" consists of three lines and has three parameters. Support Length defines the length of Support. BB Length defines the length of the Bollinger Bands. And OTT Multiplier is used in OTT.