TV-1ndicators

Non-Repainting Awesome Oscillator[TV1ndicator]

Non-Repainting Awesome Oscillator (NRAO) is an improved standard Awesome Oscillator
NRAO, unlike the built-in AO, does not repaint the values calculated on real-time bars when using an alternative timeframe .
The modification is based on the current version of the built-in Awesome Oscillator - 27.0

Comparison of AO and NRAO

In the following screenshot AO(gaps on), AO(gaps off), NRAO\(non-repainting off), NRAO(non-repainting on) , the chart timeframe is 1 minute, and the indicator timeframe is 10 minutes:
Starting from 9:17, the chart worked in real time.

The following screenshot shows the same indicators for the same period, but after refreshing the page at 10:21:

The repainting of the built-in AO's minute-to-minute data when the "Wait for timeframe closes" option is turned off is obvious.

Even turning on the "Wait for timeframe closes" option, which in theory should prevent repainting, does not help. On historical data, the value is calculated at the close of the bar of an alternative timeframe, and is displayed at 9, 19, 29,39,... minutes of the chart.
On real data, the AO value is calculated at the close of the first bar of the chart timeframe, the opening of which coincides with the opening of a bar of an alternative timeframe, and is displayed at 10, 20, 30, 40,... minutes of the chart.
In addition, AO displays a value on the first real-time bar, which will disappear if you refresh the page after some time.

NRAO(non-repainting off) works similarly to AO(gaps off).
NRAO(non-repainting on) calculates and displays values in the same way both in history and in real time.

P.S. I publish this indicator in order to describe the problem using its example. The vast majority of built-in indicators are subject to such repaint. Unfortunately, sometimes repaint can lead to an erroneous trading decision. Not only beginners, but sometimes even experienced traders face this problem. Over many years of practice, I have repeatedly encountered situations where my clients were disappointed in their strategies as soon as they realized that standard indicators on alternative timeframes were repainting, and the strategy I wrote using indicators without repainting did not work quite as they expected.
I hope this example will help in the future to avoid unnecessary mistakes when using built-in indicators on alternative timeframes.
If you find this modification useful for other built-in indicators, write what other indicators without repainting you would like to see.



Non-Repainting Awesome Oscillator (NRAO)- это усовершенствованный стандартный Awesome Oscillator
NRAO в отличии от встроенного AO не перерисовывает значения, рассчитанные на барах реального времени при использовании альтернативного таймфрейма.
За основу модификации взята актуальная версия встроенного Awesome Oscillator - 27.0

Сравнение работы AO и NRAO

На следующем скриншоте отображены AO(gaps on), AO(gaps off), NRAO(non-repainting off), NRAO(non-repainting on) на таймфрейме графика 1 минута, и таймфрейме индикаторов 10 минут:
Начиная с 9:17 график работал в реальном времени.

На следующем скриншоте отображены те же индикаторы за тот же период, только после обновления страницы в 10:21:

Перерисовка ежеминутных данных встроенного AO при выключенной опции "Дождаться закрытия интервала" видна сразу.

Даже включение опции "Дождаться закрытия интервала", которая по идее должна была бы исключить перерисовку, не избавляет встроенный AO от неё. На исторических данных значение рассчитывается на закрытии бара альтернативного таймфрейма, и отображается на 9, 19, 29,39,... минутах графика.
На реальных данных значение AO рассчитывается на закрытии первого бара таймфрейма графика, открытие которого совпадает с открытием бара альтернативного таймфрейма, и отображается на 10, 20, 30, 40,... минутах графика.
Кроме того AO отображает значение на первом баре реального времени, которое не будет отображено, если обновить страницу спустя некоторое время.

NRAO(non-repainting off) работает аналогично AO(gaps off).
NRAO(non-repainting on) рассчитывает и отображает значения одинаково как на истории, так в реальном времени.

P.S. Я публикую этот индикатор для того, чтобы на его примере описать проблему. Подобной перерисовке подвержено абсолютное большинство встроенных индикаторов. К сожалению, иногда подобная перерисовка может привести к ошибочному торговому решению. С этой проблемой сталкиваются не только новички, но иногда и бывалые трейдеры. За многолетнюю практику я не один раз сталкивался с ситуациями, когда мои клиенты были разочарованы в своих стратегиях, как только они понимали, что стандартные индикаторы на альтернативных таймфреймах иногда перерисовываются, и написанная мной стратегия с использованием индикаторов без перерисовки работает не совсем так как они ожидали. Искренне надеюсь, что этот пример поможет вам в будущем избежать лишних ошибок при использовании встроенных индикаторов на альтернативных таймфреймах.
Если вы считаете полезным такую доработку для других встроенных индикаторов, пишите в отзывах какие еще индикаторы без перерисовки вы бы хотели видеть.
Skyddat skript
Detta skript publiceras med stängd källkod och du kan använda det fritt. Du kan ange den som favorit för att använda den i ett diagram. Du kan inte visa eller ändra dess källkod.
Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?