OPEN-SOURCE SCRIPT

Multiple OTT

Updated
Multiple OTT (MOTT) is a development on the Optimized Trend Tracker (OTT) indicator of Anıl Özekşi that is shared in his algorithmic trading courses by himself.

There are 5 lines in MOTT:
-The top (cyan) line is originally an OTT line, which uses the Highest price values in a default length of 80 bars in its calculation.
-The bottom line (purple) is also an OTT line but conversely uses the Lowest prices in the same period.
-The dotted third line in the middle (green) is the exact average of the top and bottom lines.
-The dotted Cyan line: (Top+Middle)/2 and
dotted Purple line: (Bottom+Middle)/2 are also the averages of their two neighbors.

Default values:
Length of the Highest and Lowest Price period (High & Low Period): 80
OTT optimizing percent: 1.4
OTT Length: 2 (Also Moving Average Length when displayed)
Default Moving Average Type of OTT Calculation: VIDYA(VAR) VARIABLE INDEX DYNAMIC MOVING AVERAGE

These values are designed for daily time frame, so they have to be optimized in other timeframes by the user. (Ex: Higher values can be considered in lower time frames)

BUY when the price crosses above the MOTT lines.
STOP when the price crosses back below the same MOTT line.
SELL when the price crosses below the MOTT lines.
STOP when the price crosses back above the same MOTT line.

As you can see, every line can be considered a trade signal like Fibonacci Levels. If optimized meaningfully, lines can also show users significant support and resistance levels. Traders can use those levels in partial buys and sells.

Developer Anıl Özekşi advises that traders may have more accurate signals when using a short-period moving average instead of closing prices. So, I added the VIDYA moving average with the same default length ( 2 ) used in OTT calculation. You can check the "SHOW MOVING AVERAGE?" box on the settings tab of the indicator.
Release Notes
offset feature added to the OTT lines regarding a demand from the developer (Anıl Özekşi)
anilozeksiBands and ChannelsFR3762kivancoptimizedtrendtrackerOTT

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Telegram t.me/AlgoRhytm

YouTube (Turkish): youtube.com/c/kivancozbilgic

YouTube (English): youtube.com/c/AlgoWorld
Also on:

Disclaimer