BitradertrackerEste Indicador ya no consiste en líneas móviles que se cruzan para dar señales de entrada o salida, si no que va más allá e interpreta gráficamente lo que está sucediendo con el valor.
Es un algoritmo potente, que incluye 4 indicadores de tendencia y 2 indicadores de volumen.
Con este indicador podemos movernos con las "manos fuertes" del mercado, rastrear sus intenciones y tomar decisiones de compra y venta.
Diseñado para operar en criptomonedas.
En cuanto a qué temporalidad usar, cuanto más grande mejor, ya que al final lo que estamos haciendo es el análisis de datos y, por lo tanto, cuanto más datos, mejor. Personalmente recomiendo usarlo en velas de 30 minutos, 1 hora y 4 horas.
Recuerde, ningún indicador es 100% efectivo.
Este indicador nos muestra en las áreas de color púrpura (manos fuertes) y en las áreas de color verde (manos débiles) y al mostrármelo gráficamente ya el indicador vale la pena.
El mercado está impulsado por dos tipos de inversores, que se denominan manos fuertes o ballenas (agencias, fondos, empresas, bancos, etc.) y manos débiles o peces pequeños (es decir, nosotros).
No tenemos la capacidad de manipular un valor, ya que nuestra cartera es limitada, pero podemos ingresar y salir de los valores fácilmente ya que no tenemos mucho dinero.
Las ballenas pueden manipular un valor ya que tienen muchos bitcoins y / o dinero, sin embargo, no pueden moverse fácilmente.
Entonces, ¿como pueden comprar o vender sus monedas las ballenas? Bueno, ellos hacen su juego: Tratan de hacernos creer que la moneda esta barata cuando nos quieren vender sus monedas o hacernos creer que la moneda es cara cuando quieren comprar nuestras monedas. Esta manipulación se realiza de muchas maneras, la mayoría por noticias.
Nosotros, los pequeños peces, no podemos competir contra las ballenas, pero podemos descubrir qué están haciendo (recuerde, son lentas, mueven sus monstruosas cantidades de dinero) debemos movernos con ellas e imitarlas. Mejor estar bajo la ballena que delante de ella.
Con este indicador puedes ver cuando las ballenas están operando y reaccionar ; porque el enfoque matemático que los sustenta ha demostrado ser bastante exitoso.
Cuando las manos fuertes están por debajo de cero, se dice que están comprando. Lo mismo ocurre con las manos débiles. Generalmente, si las manos fuertes están comprando o vendiendo, el precio está lateralizado. El movimiento del precio está asociado con las compras y ventas realizadas por la mano débil.
Espero que les sea de mucha utilidad.
Bitrader4.0
This indicator no longer consists of mobile lines that intersect to give input or output signals, but it goes further and graphically interprets what is happening with the value.
It is a powerful algorithm, which includes 4 trend indicators and 2 volume indicators.
With this indicator we can move with the "strong hands" of the market, track their intentions and make buying and selling decisions.
Designed to operate in cryptocurrencies.
As for what temporality to use, the bigger the better, since in the end what we are doing is the analysis of data and, therefore, the more data, the better. Personally I recommend using it in candles of 30 minutes, 1 hour and 4 hours.
Remember, no indicator is 100% effective.
This indicator shows us in the areas of color purple (strong hands) and in the areas of color green (weak hands) and by showing it graphically and the indicator is worth it.
The market is driven by two types of investors, which are called strong hands or whales (agencies, funds, companies, banks, etc.) and weak hands or small fish (that is, us).
We do not have the ability to manipulate a value, since our portfolio is limited, but we can enter and exit the securities easily since we do not have much money.
Whales can manipulate a value since they have many bitcoins and / or money, however, they can not move easily.
So, how can whales buy or sell their coins? Well, they make their game: They try to make us believe that the currency is cheap when they want to sell their coins or make us believe that the currency is expensive when they want to buy our coins. This manipulation is done in many ways, most by news.
We, small fish, can not compete against whales, but we can find out what they are doing (remember, they are slow, move their monstrous amounts of money) we must move with them and imitate them. Better to be under the whale than in front of her.
With this indicator you can see when the whales are operating and reacting; because the mathematical approach that sustains them has proven to be quite successful.
When strong hands are below zero, they say they are buying. The same goes for weak hands. Generally, if strong hands are buying or selling, the price is lateralized. The movement of the price is associated with the purchases and sales made by the weak hand.
I hope you find it very useful.
Bitrader4.0
ابحث في النصوص البرمجية عن "algo"
META: STDEV Study (Scripting Exercise)While trying to figure out how to make the STDEV function use an exponential moving average instead of simple moving average , I discovered the builtin function doesn't really use either.
Check it out, it's amazing how different the two-pass algorithm is from the builtin!
Eventually I reverse-engineered and discovered that STDEV uses the Naiive algorithm and doesn't apply "Bessel's Correction". K can be 0, it doesn't seem to change the data although having it included should make it a little more precise.
en.wikipedia.org
Acc/DistAMA with FRACTAL DEVIATION BANDS by @XeL_ArjonaACCUMULATION/DISTRIBUTION ADAPTIVE MOVING AVERAGE with FRACTAL DEVIATION BANDS
Ver. 2.5 @ 16.09.2015
By Ricardo M Arjona @XeL_Arjona
DISCLAIMER:
The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the
author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets.
The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is.
Pine Script code MOD's and adaptations by @XeL_Arjona with special mention in regard of:
Buy (Bull) and Sell (Bear) "Power Balance Algorithm" by:
Stocks & Commodities V. 21:10 (68-72): "Bull And Bear Balance Indicator by Vadim Gimelfarb"
Fractal Deviation Bands by @XeL_Arjona.
Color Cloud Fill by @ChrisMoody
CHANGE LOG:
Following a "Fractal Approach" now the lookback window is hardcode correlated with a given timeframe. (Default @ 126 days as Half a Year / 252 bars)
Clean and speed up of Adaptive Moving Average Algo.
Fractal Deviation Band Cloud coloring smoothed.
>
ALL NEW IDEAS OR MODIFICATIONS to these indicator(s) are Welcome in favor to deploy a better and more accurate readings. I will be very glad to be notified at Twitter or TradingVew accounts at: @XeL_Arjona
Any important addition to this work MUST REMAIN PUBLIC by means of CreativeCommons CC & TradingView. Copyright 2015
Volume Pressure Composite Average with Bands by @XeL_ArjonaVOLUME PRESSURE COMPOSITE AVERAGE WITH BANDS
Ver. 1.0.beta.10.08.2015
By Ricardo M Arjona @XeL_Arjona
DISCLAIMER:
The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets.
The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is.
Pine Script code MOD's and adaptations by @XeL_Arjona with special mention in regard of:
Buy (Bull) and Sell (Bear) "Power Balance Algorithm" by :
Stocks & Commodities V. 21:10 (68-72):
"Bull And Bear Balance Indicator by Vadim Gimelfarb"
Adjusted Exponential Adaptation from original Volume Weighted Moving Average (VEMA) by @XeL_Arjona with help given at the @pinescript chat room with special mention to @RicardoSantos
Color Cloud Fill Condition algorithm by @ChrisMoody
WHAT IS THIS?
The following indicators try to acknowledge in a K-I-S-S approach to the eye (Keep-It-Simple-Stupid), the two most important aspects of nearly every trading vehicle: -- PRICE ACTION IN RELATION BY IT'S VOLUME --
A) My approach is to make this indicator both as a "Trend Follower" as well as a Volatility expressed in the Bands which are the weighting basis of the trend given their "Cross Signal" given by the Buy & Sell Volume Pressures algorithm. >
B) Please experiment with lookback periods against different timeframes. Given the nature of the Volume Mathematical Monster this kind of study is and in concordance with Price Action; at first glance I've noted that both in short as in long term periods, the indicator tends to adapt quite well to general price action conditions. BE ADVICED THIS IS EXPERIMENTAL!
C) ALL NEW IDEAS OR MODIFICATIONS to these indicator(s) are Welcome in favor to deploy a better and more accurate readings. I will be very glad to be notified at Twitter or TradingVew accounts at: @XeL_Arjona
Any important addition to this work MUST REMAIN PUBLIC by means of CreativeCommons CC & TradingView. --- All Authorship Rights RESERVED 2015 ---
RSI+StRSI+RVI+MFI+DMI+CCI+MACDH+OBV+Ichimoku Milky Way// © expert-x
// Created: 2023-12-21
// Last modified: 2025-02-14
// Version 6.0
//@version=6
////////////////////////////////////////////////////////////////////////////////////////////////////
indicator(title = 'RSI+StRSI+RVI+MFI+DMI+CCI+MACDH+OBV+Ichimoku Milky Way', format = format.price, overlay = false, precision = 2, shorttitle = 'Multi+Tool Milky Way X')
////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////// TOOLTIPS //////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
ENABLE_TOOLTIP = 'Включить/выключить'
ST1_ENABLE_TOOLTIP = 'Стратегия пересечения линией переворота, базовой линии'
ST2_ENABLE_TOOLTIP = 'Стратегия пересечения верховой линией 1, верховой линии 2'
TR_RT_ENABLE_TOOLTIP = 'Отключает отображенине ярлыков UP/Down Trend текущего таймфрейма'
TR_MTF_ENABLE_TOOLTIP = 'Отключает отображенине ярлыков UP/Down Trend дополнительных таймфреймов'
LAST_ENABLE_TOOLTIP = 'Удалит все ярлыки, кроме последних, по-каждому тайм-фрейму.'
TIMEFRAME_TOOLTIP = 'Выбор и активация дополнительного таймфрейма'
STYLE_TOOLTIP = 'Настройки цвета'
CCI_TOOLTIP = 'Как большинство осцилляторов, CCI был разработан, чтобы определять уровни перекупленности и перепроданности. Индикатор CCI делает это, измеряя отношение между ценой и Скользящей средней, или, если быть более точным, нормальные отклонения от этой Скользящей средней. Иными словами, CCI измеряет отклонение цены инструмента от ее среднестатистической цены. Индикатор CCI показывает, насколько текущая стоимость отклонилась от своего среднего значения. Высокие показатели говорят, что она намного выше стандартной. Низкие ― актив недооценен и вскоре станет дороже. Таким образом определяются зоны перекупленности и перепроданности, что является характерной чертой осцилляторов. CCI работает на всех таймфреймах и активах. Алгоритм прогнозирует разворот текущего тренда.'
RSI_TOOLTIP = 'RSI — это импульсный индикатор для технического трейдинга, который измеряет скорость изменения цены или данных. Увеличение импульса и рост цены указывают на активные покупки акций на рынке. При этом снижение импульса свидетельствует об увеличении давления продавцов. Кроме того, RSI позволяет трейдерам обнаружить признаки перепроданности и перекупленности рынка. Для этого цена актива оценивается по шкале от 0 до 100 за 14 периодов.'
STOCHASTIC_TOOLTIP = 'Стохастический RSI, или просто StochRSI - это индикатор технического анализа, используемый для определения того, перекуплен актив или перепродан, а также для определения текущих рыночных тенденций. Как следует из названия, StochRSI является производной от стандартного Индекса Относительной Силы (RSI) и как таковой, считается индикатором индикатора. Это тип осциллятора, означающий, что он колеблется выше и ниже центральной линии.\n' + 'Впервые StochRSI был описан в 1994 году, в книге Новый Технический Трейдер Стэнли Кролла и Тушар Чанде. Она часто используется биржевыми трейдерами, но также может применяться и в других торговых аспектах, к примеру для торгов на Forex или криптовалютой.\n' + 'Как работает StochRSI? Индикатор StochRSI генерируется из обычного RSI путем применения формулы Стохастического Осциллятора. Результатом является единый числовой рейтинг, который колеблется вокруг центральной линии (0,5) в диапазоне от 0 до 1. Однако существуют модифицированные версии StochRSI, которые умножают результаты на 100, поэтому значение находятся в диапазоне от 0 до 100 вместо 0 и 1. Также часто встречается 3-дневная простая скользящая средняя (SMA) вместе с линией StochRSI, которая выступает в качестве сигнала и предназначена для снижения торговых рисков.\n' + 'Стандартная формула Стохастического Осциллятора учитывает цену закрытия актива, а также его самые высокие и самые низкие точки в течение определенного периода. Однако когда формула используется для расчета StochRSI, она непосредственно применяется к данным от RSI (цены не учитываются).\n' + 'Stoch RSI = (Текущий RSI - Наименьший RSI)/(Наибольший RSI - Наименьший RSI) Как и в стандартном RSI, для StochRSI чаще всего используется настройка 14 периодов. 14 периодов, участвующих в расчете StochRSI, основаны на временных рамках графика. Таким образом, в то время как дневной график будет учитывать последние 14 дней (свечи), часовой график будет генерировать StochRSI на основе последних 14 часов.\n' + 'Периоды могут быть установлены в днях, часах или даже минутах, и их использование значительно варьируется от трейдера к трейдеру (в зависимости от их стратегии). Количество периодов также может быть скорректировано вверх или вниз, чтобы определить долгосрочные или краткосрочные тренды. 20-периодная настройка, это еще один довольно популярный параметр для StochRSI.\n' + 'Как уже упоминалось, некоторые графические шаблоны StochRSI присваивают значения в диапазоне от 0 до 100 вместо 0 до 1. На этих графиках центральная линия находится на уровне 50 вместо 0,5. Следовательно, сигнал перекупленности, который обычно возникает на уровне 0,8, будет обозначаться как 80, а сигнал перепроданности, на уровне 20, а не 0,2. Графики с настройкой от 0 до 100 могут выглядеть немного иначе, но практическая интерпретация по сути одна и та же.\n' + 'Как использовать StochRSI? Индикатор StochRSI приобретает наибольшее значение вблизи верхних и нижних границ своего диапазона. Поэтому основное использование индикатора заключается в определении потенциальных точек входа и выхода, а также разворотов цен. Таким образом, значение 0,2 или ниже, указывает на то, что актив вероятнее всего перепродан, а значение 0,8 или выше предполагает, что он может быть перекуплен.\n' + 'Кроме того, нахождение линий ближе к центру, также может предоставить полезную информацию относительно рыночных тенденций. Например, когда центральная линия выступает в качестве поддержки, а линии StochRSI постоянно движутся выше отметки 0,5, это может указывать на продолжение бычьего или восходящего тренда, особенно если линии начинают двигаться в направлении 0,8. Аналогично, последовательные колебания ниже 0,5 и отклонения к 0,2 указывают на нисходящий или медвежий тренд.'
MF_INDEX_TOOLTIP = 'Индикатор Money Flow Index (MFI) — это инструмент, используемый в техническом анализе для измерения давления покупки и продажи. Это делается путем анализа как цены, так и объёма. Расчет MFI генерирует значение, которое затем отображается как линия, которая перемещается в диапазоне 0-100, что делает его осциллятором. Когда MFI повышается, это указывает на увеличение покупательского давления.'
DMI_TOOLTIP = 'Что такое DMI: Индекс направленного движения (DMI) — это технический индикатор, используемый трейдерами для определения силы восходящего или нисходящего тренда на рынке.\n' + 'Индекс направленного движения (DMI) — это технический индикатор, используемый трейдерами для определения силы восходящего или нисходящего тренда на рынке. Он включает в себя два индекса направления и обычно используется в тандеме с индексом среднего направления движения (ADX). Таким образом, DMI отображается в виде трех линий выше или ниже свечного графика.\n' + 'Что такое DMI индикатор? DMI – индекс направленного движения – состоит из двух индексов направления: Plus Direction Indicator (также называемого индикатором положительного направления), обозначаемого DI+, и Minus Direction Indicator (также называемого индикатором отрицательного направления), обозначаемого DI-. Когда линия DI+ находится выше линии DI-, рынки находятся в бычьем тренде. И наоборот, когда линия DI- выше линии DI+, рынки находятся в медвежьем тренде. Когда линии показывают повторяющиеся пересечения — рынки находятся в нерешительности, и цены торгуются относительно стабильно.\n' + 'Сами по себе индексы DMI не скажут вам слишком многого, чего вы не смогли бы понять, взглянув на стандартный свечной график. Некоторые трейдеры используют точки пересечения в качестве торгового сигнала, поскольку они указывают на разворот тренда. Однако индексы DMI также включают третью строку, называемую индексом среднего направления движения (ADX).'
ADX_TOOLTIP = 'Что такое ADX: Индекс среднего направления движения (ADX) представляет собой индикатор относительной силы направленного тренда, обозначенного DI+ и DI-.\n' + 'Что такое ADX индикатор?ADX – индекс среднего направления движения – представляет собой индикатор относительной силы направленного тренда, обозначенного DI+ и DI-. Чтобы прочитать его, обратитесь к оси на диаграмме, которая показывает значение. В целом, значение ADX выше 25 указывает на то, что тренд относительно силен. Значение ниже 20 указывает на то, что тренд слабый или что рынки торгуются в боковом тренде. Также может случиться так, что рынки переживают период волатильности, и ADX не может определить четкий тренд ни в одном направлении.\n' + 'Значения DMI и ADX определяются на основе диапазона ценовых движений за последние 14 торговых периодов. Существуют математические формулы, которые позволят вам самостоятельно рассчитать значения; однако это сложно и в значительной степени не нужно для большинства трейдеров. Все, что вам нужно знать, это как интерпретировать значения DMI и ADX на графике и использовать их в своих торговых сигналах.\n' + 'Как использовать DMI и ADX в торговле.\n Вы можете видеть, что DMI и ADX представляются как один индикатор или как два отдельных индикатора, в зависимости от того, какие инструменты построения графиков вы используете. В Trading View при выборе среднего индекса направления отображается только график с линией ADX, тогда как при выборе индекса направленного движения отображается график как с линиями DI, так и с линией ADX.\n' + 'Индикаторы положительного (DI+) и отрицательного (DI-) направления. Если вы планируете использовать DMI и ADX в торговле, вам понадобятся два важных индикатора. Первый — это точка, когда линии DI+ и DI- пересекаются друг с другом, что указывает на разворот тренда.\n' + 'Тем не менее, вы должны быть осторожны, если линии DI+ и DI- уже пересекались несколько раз в предыдущие торговые периоды или проходят очень близко друг к другу, так как это указывает на то, что рынки не определились и ни быки, ни медведи не контролируют ситуацию. Чем дальше друг от друга находятся линии DI+ и DI-, тем сильнее индикатор тренда.\n' + 'Откуда взялись DMI и ADX? Индикаторы DMI и ADX были разработаны в 1970-х годах американским техническим аналитиком Дж. Уэллсом Уайлдером, автором книги «Новые концепции технических торговых систем». Он изобрел несколько технических индикаторов, которые сейчас используются трейдерами по всему миру, в том числе индекс относительной силы и Parabolic SAR.'
RVI_TOOLTIP = 'Индекс относительной волатильности - RVI. Технический индикатор RVI был разработан Дональдом Дорси в 1993 году, а затем описан в журнале Technical Analysis of Stocks and Commodities. В 1995 году индикатор был преобразован автором, и его обновленная версия была использована для анализа. По словам Дорси, индикатор RVI не является независимым инструментом технического анализа и может использоваться либо в качестве фильтра для других индикаторов, либо в качестве инструмента для указания на намерения, но не на возможности реализации ценовых моделей.\n' + 'Торговое использование.\n' + 'Главное преимущество RVI заключается в том, что он основан на индексе RSI и учитывает все уровни диверсификации, которые могут быть опущены RSI. Тем не менее, RVI является изменчивым индикатором, но не классическим осциллятором, поэтому неразумно использовать его независимо. Как следствие, лучше сочетать сигналы RVI с осцилляторными сигналами технического анализа, например, индикатором RSI.\n' + 'В случае, если индикатор RSI попадет в зону перепроданности, преодолевая 70% вместе с RVI, мы получаем мощный сигнал о том, что повышение цен скоро закончится и начнется снижение.\n' + 'Кроме того, если и индикаторы RSI, и RVI опадают ниже уровня 30%, другими словами, попадают в зону перекупленности, необходимо быть готовым к росту цен. В соответствии с этим лучше использовать комбинацию этих двух показателей, чем применять их самостоятельно.\n' + 'Когда RSI составляет более 70% или менее 30%, но RVI не подтверждает эти сигналы, лучше подождать, пока оба из них не покажут похожую картину, прежде чем открыть позицию.\n' + 'Другим вариантом применения RVI является выявление расхождений и конвергенции с ценой. Если цена идет вверх, пока индекс падает, это указывает на то, что цена скоро снизится (случай расхождения).\n' + 'Противоположная ситуация также верна для жизни: индекс падает, в то время как цена растет, что свидетельствует об ускорении цены (случай конвергенции).\n' + 'Формирование этих сигналов более актуально, когда RVI находится в зоне перекупленной или перепроданной. Но даже если индекс RVI попадет в нейтральную зону (между 30%-70%), сигналы расхождения/конвергенции также будут показательными.\n' + 'Учитывая, что RVI рассматривает больший масштаб параметров, чем индекс RSI, сигналы, полученные с помощью RVI, будут намного лучше.'
forceoverlay_tooltip = 'Данный параметр, отобразит этикетки Лонг/Шорт непосредственно на основном графике'
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// GROUPS ///////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
cci_set_group = 'CCI setup'
components = 'enable/disable components'
rd_algorithm_1_group = 'Long/Short Algorithm "CCI"'
rd_algorithm_2_group = 'Long/Short Algorithm "DMI & ADX"'
rd_algorithm_3_group = 'Long/Short Algorithm "STRSI"'
rd_algorithm_4_group = 'Long/Short Algorithm "EMA GC/DC"'
rd_algorithm_5_group = 'Long/Short Algorithm "MACD HISTOGRAM"'
rd_algorithm_6_group = 'Long/Short Algorithm "CCI"'
rd_algorithm_7_group = 'Long/Short Algorithm "OBV"'
rd_close_algorithm_group = 'Long/Short Close position algorithm'
rd_long_short_group = 'Long/Short strategy modul'
rd_ma_set = 'MA Settings'
rd_macd_group = 'MACD HISTOGRAM'
rd_mfi_set_group = 'Money Flow Index (MFI) setup'
rvi_group = 'Relative Volatility Index'
trend_group = 'Ichimoku UP/Down Trend'
// Рассчитываем нулевую линию
cci_zero_line = 50
dmiadx_zero_line = 75
macd_zero_line = 0
mfi_zero_line = 100
rsi_zero_line = 50
rvi_zero_line = 50
strsi_zero_line = 100
////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////// COMPONENTS ////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
show_trend_01_module_input = input.bool(true, title = 'Show Ichimoku trending strategy 1', group = components, tooltip = ST1_ENABLE_TOOLTIP)
show_trend_02_module_input = input.bool(false, title = 'Show Ichimoku trending strategy 2', group = components, tooltip = ST2_ENABLE_TOOLTIP)
show_rsi_modul_input = input.bool(true, title = 'Show "RSI" modul', group = components, tooltip = RSI_TOOLTIP)
show_rsi_ma_plot_input = input.bool(true, title = 'Show "RSI" smoothing line', group = components, tooltip = RSI_TOOLTIP)
show_rsi_divergence = input.bool(false, title = 'Show Divergence', group = components, tooltip = RSI_TOOLTIP)
show_stoc_rsi_modul_input = input.bool(true, title = 'Show "Stochastic RSI" modul', group = components, tooltip = STOCHASTIC_TOOLTIP)
show_rvi_modul_input = input.bool(false, title = 'Show "RVI" modul', group = components, tooltip = RVI_TOOLTIP)
show_rvi_ma_plot_input = input.bool(false, title = 'Show "RVI" smoothing line', group = components, tooltip = RVI_TOOLTIP)
show_rd_modul_input = input.bool(false, title = 'Show "DMI & ADX" modul', group = components, tooltip = DMI_TOOLTIP)
show_mfi_modul_input = input.bool(false, title = 'Show "MFI" modul', group = components, tooltip = MF_INDEX_TOOLTIP)
show_cci_modul_input = input.bool(true, title = 'Show "CCI" modul', group = components, tooltip = CCI_TOOLTIP)
show_cci_ma_plot_input = input.bool(true, title = 'Show "CCI" smoothing line', group = components, tooltip = CCI_TOOLTIP)
show_macd_histo_modul_input = input.bool(true, title = 'Show "MACD Histogram" modul', group = components, tooltip = ENABLE_TOOLTIP)
show_long_short_modul_input = input.bool(true, title = 'Show "Long/Short" strategy modul', group = components, tooltip = ENABLE_TOOLTIP)
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// Ichimoku Trend X /////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
conversionPeriods = input.int(13, minval = 1, title = 'Длина линии переворота', group = trend_group)
basePeriods = input.int(60, minval = 1, title = 'Длина линии стандарта', group = trend_group)
laggingSpan2Periods = input.int(60, minval = 1, title = 'Длина верховой линии 2', group = trend_group)
displacement = input.int(21, minval = 1, title = 'Опаздывающая линия', group = trend_group)
donchian(len) =>
math.avg(ta.lowest(len), ta.highest(len))
conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = math.avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)
base_offset = displacement - 1
contr_offset = -displacement + 1
////////////////////////////////////////////////////////////////////////////////////////////////////
plot(conversionLine, color = color.new(#2962FF, 0), title = 'Conversion Line', linewidth = 3, style = plot.style_line, display = display.none, force_overlay = true)
plot(baseLine, color = color.new(#B71C1C, 0), title = 'Base Line', linewidth = 3, style = plot.style_line, display = display.none, force_overlay = true)
plot(close, offset = contr_offset, color = #43A047, title = 'Lagging Span Line', linewidth = 3, style = plot.style_line, display = display.none, force_overlay = true)
p1 = plot(leadLine1, offset = base_offset, color = #A5D6A7, title = 'Leading Span Line 1', linewidth = 3, style = plot.style_line, display = display.none, force_overlay = true)
p2 = plot(leadLine2, offset = base_offset, color = #EF9A9A, title = 'Leading Span Line 2', linewidth = 3, style = plot.style_line, display = display.none, force_overlay = true)
kumo_cloud_upper_line = leadLine1 > leadLine2 ? leadLine1 : leadLine2
kumo_cloud_lower_line = leadLine1 < leadLine2 ? leadLine1 : leadLine2
plot(kumo_cloud_upper_line, offset = base_offset, title = 'Kumo Cloud Upper Line', force_overlay = true)
plot(kumo_cloud_lower_line, offset = base_offset, title = 'Kumo Cloud Lower Line', force_overlay = true)
fill(p1, p2, color = leadLine1 > leadLine2 ? color.rgb(67, 160, 71, 75) : color.rgb(244, 67, 54, 75))
downtrend_01 = ta.crossover(baseLine, conversionLine)
uptrend_01 = ta.crossunder(baseLine, conversionLine)
downtrend_02 = ta.crossover(leadLine1, leadLine2)
uptrend_02 = ta.crossunder(leadLine1, leadLine2)
uptrend_01_label_color_input = input.color(color.new(#1b5e20, 0), title = 'label uptrend_01', inline = 'trend_color1', group = trend_group, tooltip = STYLE_TOOLTIP)
downtrend_01_label_color_input = input.color(color.new(#e65100, 0), title = 'downtrend_01', inline = 'trend_color1', group = trend_group, tooltip = STYLE_TOOLTIP)
uptrend_02_label_color_input = input.color(color.new(#1b5e20, 0), title = 'label uptrend_02', inline = 'trend_color2', group = trend_group, tooltip = STYLE_TOOLTIP)
downtrend_02_label_color_input = input.color(color.new(#e65100, 0), title = 'downtrend_02', inline = 'trend_color2', group = trend_group, tooltip = STYLE_TOOLTIP)
label_textcolor_input = input.color(color.new(color.white, 5), title = 'label font color ', group = trend_group, tooltip = STYLE_TOOLTIP)
only_last_label = input.bool(false, title = 'Show only last label', group = trend_group, tooltip = LAST_ENABLE_TOOLTIP)
////////////////////////////////////////////////////////////////////////////////////////////////////
if show_trend_01_module_input ? downtrend_01 : bool(na)
label_downtrend_01 = label.new(x = na, y = na, text = '', force_overlay = true)
label.set_xy(label_downtrend_01, x = bar_index, y = low)
label.set_text(label_downtrend_01, text = 'DownTrend1⬇\nIchimoku\n' + 'TF' + str.tostring(timeframe.period))
label.set_yloc(label_downtrend_01, yloc = yloc.abovebar)
label.set_color(label_downtrend_01, color = downtrend_01_label_color_input)
label.set_style(label_downtrend_01, style = label.style_label_down)
label.set_textcolor(label_downtrend_01, textcolor = label_textcolor_input)
label.set_size(label_downtrend_01, size = size.small)
label.set_textalign(label_downtrend_01, textalign = text.align_center)
label.set_tooltip(label_downtrend_01, tooltip = 'Down Trend')
if only_last_label
label.delete(label_downtrend_01 )
else
na
if show_trend_01_module_input ? uptrend_01 : bool(na)
label_uptrend_01 = label.new(x = na, y = na, text = '', force_overlay = true)
label.set_xy(label_uptrend_01, x = bar_index, y = low)
label.set_text(label_uptrend_01, text = 'UpTrend1⬆\nIchimoku\n' + 'TF' + str.tostring(timeframe.period))
label.set_yloc(label_uptrend_01, yloc = yloc.belowbar)
label.set_color(label_uptrend_01, color = uptrend_01_label_color_input)
label.set_style(label_uptrend_01, style = label.style_label_up)
label.set_textcolor(label_uptrend_01, textcolor = label_textcolor_input)
label.set_size(label_uptrend_01, size = size.small)
label.set_textalign(label_uptrend_01, textalign = text.align_center)
label.set_tooltip(label_uptrend_01, tooltip = 'Up Trend')
if only_last_label
label.delete(label_uptrend_01 )
else
na
////////////////////////////////////////////////////////////////////////////////////////////////////
if show_trend_02_module_input ? downtrend_02 : bool(na) // and kumo_cloud_lower_line > open
label_downtrend_02 = label.new(x = na, y = na, text = '', force_overlay = true)
label.set_xy(label_downtrend_02, x = bar_index + base_offset, y = low)
label.set_text(label_downtrend_02, text = 'DownTrend2⬇\nIchimoku\n' + 'TF' + str.tostring(timeframe.period))
label.set_yloc(label_downtrend_02, yloc = yloc.abovebar)
label.set_color(label_downtrend_02, color = downtrend_02_label_color_input)
label.set_style(label_downtrend_02, style = label.style_label_down)
label.set_textcolor(label_downtrend_02, textcolor = label_textcolor_input)
label.set_size(label_downtrend_02, size = size.small)
label.set_textalign(label_downtrend_02, textalign = text.align_center)
label.set_tooltip(label_downtrend_02, tooltip = 'Down Trend')
if only_last_label
label.delete(label_downtrend_02 )
else
na
if show_trend_02_module_input ? uptrend_02 : bool(na) // and kumo_cloud_upper_line < open
label_uptrend_02 = label.new(x = na, y = na, text = '', force_overlay = true)
label.set_xy(label_uptrend_02, x = bar_index + base_offset, y = low)
label.set_text(label_uptrend_02, text = 'UpTrend2⬆\nIchimoku\n' + 'TF' + str.tostring(timeframe.period))
label.set_yloc(label_uptrend_02, yloc = yloc.belowbar)
label.set_color(label_uptrend_02, color = uptrend_02_label_color_input)
label.set_style(label_uptrend_02, style = label.style_label_up)
label.set_textcolor(label_uptrend_02, textcolor = label_textcolor_input)
label.set_size(label_uptrend_02, size = size.small)
label.set_textalign(label_uptrend_02, textalign = text.align_center)
label.set_tooltip(label_uptrend_02, tooltip = 'Up Trend')
if only_last_label
label.delete(label_uptrend_02 )
else
na
////////////////////////////////////////////////////////////////////////////////////////////////////
highUsePivot = fixnan(ta.pivothigh(15, 15) )
lowUsePivot = fixnan(ta.pivotlow(15, 15) )
volumeThresh = 20
shortVolume = ta.ema(volume, 5)
longVolume = ta.ema(volume, 10)
osc = 100 * (shortVolume - longVolume) / longVolume
////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////// LONG/SHORT INPUT ///////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
rd_consider_algo_1_input = input.bool(false, title = 'Activate CCI algorithm', group = rd_algorithm_1_group, tooltip = ENABLE_TOOLTIP)
rd_factor_rsi_open_long_algo_1_input = input.int(42, title = 'Factor RSI open Long', group = rd_algorithm_1_group, minval = 20, maxval = 50)
rd_factor_rsi_open_short_algo_1_input = input.int(58, title = 'Factor RSI open Short', group = rd_algorithm_1_group, minval = 51, maxval = 80)
cci_length = input.int(20, title = 'Length', minval = 1, group = rd_algorithm_1_group)
cci_src = input.source(hlc3, title = 'Source', group = rd_algorithm_1_group)
cci_plot_color_input = input.color(color.new(#4caf50, 0), title = 'CCI line color', group = rd_algorithm_1_group, tooltip = STYLE_TOOLTIP)
cci_smoothing_plot_color_input = input.color(color.new(#3179f5, 0), title = 'CCI smoothing line color', group = rd_algorithm_1_group, tooltip = STYLE_TOOLTIP)
cci_ma = ta.sma(cci_src, cci_length)
cci = (cci_src - cci_ma) / (0.15 * ta.dev(cci_src, cci_length)) // fill(cci_band1, cci_band0, color=color.rgb(33, 150, 243, 90), title="Background")
cci_ma(source, cci_length, type) =>
switch type
'SMA' => ta.sma(source, cci_length)
'EMA' => ta.ema(source, cci_length)
'SMMA (RMA)' => ta.rma(source, cci_length)
'WMA' => ta.wma(source, cci_length)
'VWMA' => ta.vwma(source, cci_length)
cci_typeMA = input.string(defval = 'SMMA (RMA)', title = 'Method', options = , group = rd_algorithm_1_group)
cci_smoothingLength = input.int(5, title = 'Length', minval = 1, maxval = 100, group = rd_algorithm_1_group)
cci_smoothingLine = cci_ma(cci, cci_smoothingLength, cci_typeMA)
cci_cross = ta.cross(cci, cci_smoothingLine)
plot(show_cci_modul_input ? cci + rsi_zero_line - cci_zero_line : na, color = cci_plot_color_input, title = 'CCI', linewidth = 3)
plot(show_cci_modul_input ? show_cci_ma_plot_input ? cci_smoothingLine + rsi_zero_line - cci_zero_line : na : na, color = cci_smoothing_plot_color_input, title = 'CCI Smoothing Line', linewidth = 3) // , display=display.none
////////////////////////////////////////////////////////////////////////////////////////////////////
rd_consider_algo_2_input = input.bool(false, title = 'Activate RSI algorithm', group = rd_algorithm_2_group, tooltip = ENABLE_TOOLTIP)
rd_factor_rsi_open_long_algo_2_input = input.int(30, title = 'Factor RSI open Long (1 - 50)', group = rd_algorithm_2_group, minval = 1, maxval = 50)
rd_factor_rsi_open_short_algo_2_input = input.int(70, title = 'Factor RSI open Short (50 - 100)', group = rd_algorithm_2_group, minval = 50, maxval = 100)
rd_ma(source, length, type) =>
switch type
'SMA' => ta.sma(source, length)
'Bollinger Bands' => ta.sma(source, length)
'EMA' => ta.ema(source, length)
'SMMA (RMA)' => ta.rma(source, length)
'WMA' => ta.wma(source, length)
'VWMA' => ta.vwma(source, length)
rd_rsi_length_input = input.int(19, title = 'RSI Length', group = rd_algorithm_2_group, minval = 1)
rd_rsi_plot_color_input = input.color(color.new(#b2b5be, 65), title = 'RSI plot color', group = rd_algorithm_2_group, tooltip = STYLE_TOOLTIP)
rd_rsi_source_input = input.source(close, title = 'Source', group = rd_algorithm_2_group)
rd_ma_type_input = input.string('Bollinger Bands', title = 'Method', group = rd_algorithm_2_group, options = )
rd_ma_length_input = input.int(5, title = 'MA Length', group = rd_algorithm_2_group)
rd_bb_mult_input = input.float(4.0, title = 'BB StdDev', group = rd_algorithm_2_group, minval = 0.001, maxval = 50)
rd_ma_plot_color_input = input.color(color.new(#787b86, 30), title = 'RSI-based MA plot color', group = rd_algorithm_2_group, tooltip = STYLE_TOOLTIP)
rd_RSI_Highest_Band_color = input.color(color.new(#ff5252, 30), title = 'RSI highest band', group = rd_algorithm_2_group, tooltip = STYLE_TOOLTIP)
rd_RSI_Upper_Band_color = input.color(color.new(color.white, 25), title = 'RSI upper band', group = rd_algorithm_2_group, tooltip = STYLE_TOOLTIP)
rd_MID_line_Band_color = input.color(color.new(color.white, 75), title = 'RSI middle band', group = rd_algorithm_2_group, tooltip = STYLE_TOOLTIP)
rd_RSI_Lower_Band_color = input.color(color.new(color.white, 25), title = 'RSI lower band', group = rd_algorithm_2_group, tooltip = STYLE_TOOLTIP)
rd_RSI_lowest_Band_color = input.color(color.new(color.green, 30), title = 'RSI lowest band', group = rd_algorithm_2_group, tooltip = STYLE_TOOLTIP)
rd_Fill_Color = input.color(color.new(#311b92, 70), title = 'RSI Background Fill', group = rd_algorithm_2_group, tooltip = STYLE_TOOLTIP)
rd_BB_Fill_Color = input.color(color.new(#5b9cf6, 75), title = 'Bollinger Bands Background Fill', group = rd_algorithm_2_group, tooltip = STYLE_TOOLTIP)
////////////////////////////////////////////////////////////////////////////////////////////////////
rd_consider_algo_3_input = input.bool(false, title = 'Activate STRSI algorithm', group = rd_algorithm_3_group, tooltip = ENABLE_TOOLTIP)
rd_factor_strsi_open_long_algo_3_input = input.int(10, title = 'Factor ST RSI open Long (1 - 50)', group = rd_algorithm_3_group, minval = 1, maxval = 100)
rd_factor_strsi_open_short_algo_3_input = input.int(90, title = 'Factor ST RSI open Short(50 - 100)', group = rd_algorithm_3_group, minval = 1, maxval = 100)
rd_strsi_smooth_k_input = input.int(4, title = 'K', group = rd_algorithm_3_group, minval = 1)
rd_strsi_smoot_d_input = input.int(3, title = 'D', group = rd_algorithm_3_group, minval = 1)
//rd_strsi_length_rsi_input = input.int(19, title = 'RSI Length', group = rd_algorithm_3_group, minval = 1)
rd_strsi_length_stoch_input = input.int(15, title = 'Stochastic Length', group = rd_algorithm_3_group, minval = 1)
//rd_strsi_src_input = input(close, title = 'RSI Source', group = rd_algorithm_3_group)
rd_strsi_plot_k_color_input = input.color(color.new(#2962FF, 5), title = 'Stochastic RSI(K) plot color', group = rd_algorithm_3_group, tooltip = STYLE_TOOLTIP)
rd_strsi_plot_d_color_input = input.color(color.new(#FF6D00, 5), title = 'Stochastic RSI(D) plot color', group = rd_algorithm_3_group, tooltip = STYLE_TOOLTIP)
////////////////////////////////////////////////////////////////////////////////////////////////////
rd_consider_algo_4_input = input.bool(false, title = 'Activate DMI & ADX algorithm', group = rd_algorithm_4_group, tooltip = ENABLE_TOOLTIP)
rd_factor_rsi_open_long_algo_4_input = input.int(35, title = 'Factor RSI open Long', group = rd_algorithm_4_group, minval = 1, maxval = 100)
rd_factor_rsi_open_short_algo_4_input = input.int(65, title = 'Factor RSI open Short', group = rd_algorithm_4_group, minval = 1, maxval = 100)
dmi_lensig = 19 //input.int(19, title = 'ADX Smoothing', group = rd_algorithm_4_group, minval = 1, maxval = 50) //14
dmi_len = 15 //input.int(15, minval=1, title = 'DI Length', group = rd_algorithm_4_group) //14
dmi_plot_adx_color_input = input.color(color.new(color.white, 10), title = 'ADX plot color', group = rd_algorithm_4_group, tooltip = STYLE_TOOLTIP) //#d1d4dc
dmi_plot_di_plus_color_input = input.color(color.new(#388e3c, 0), title = 'DI + plot color', group = rd_algorithm_4_group, tooltip = STYLE_TOOLTIP)
dmi_plot_di_minus_color_input = input.color(color.new(#f23645, 0), title = 'DI - plot color', group = rd_algorithm_4_group, tooltip = STYLE_TOOLTIP)
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// MACD HISTOGRAM ///////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
rd_consider_algo_5_input = input.bool(true, title = 'Activate MACD HISTOGRAM algorithm', group = rd_algorithm_5_group, tooltip = ENABLE_TOOLTIP)
rd_strsi_smooth_ls_input = input.int(15, title = 'K', group = rd_algorithm_5_group, minval = 1)
rd_factor_strsi_open_long_algo_5_input = input.int(37, title = 'Factor ST RSI open Long (1 - 50)', group = rd_algorithm_5_group, minval = 1, maxval = 100)
rd_factor_strsi_open_short_algo_5_input = input.int(63, title = 'Factor ST RSI open Short(50 - 100)', group = rd_algorithm_5_group, minval = 1, maxval = 100)
macd_fastlength = input.int(12, title = 'MACD fast length', group = rd_algorithm_5_group, minval = 1)
macd_slowlength = input.int(26, title = 'MACD slow length', group = rd_algorithm_5_group, minval = 1)
macd_signallength = input.int(9, title = 'MACD signal length', group = rd_algorithm_5_group, minval = 1)
macd_source = close
macd_histo_color_1 = color.new(color.lime, 70)
macd_histo_color_2 = color.new(color.green, 70)
macd_histo_color_3 = color.new(color.maroon, 70)
macd_histo_color_4 = color.new(color.red, 70)
macd_fastma = ta.ema(macd_source, macd_fastlength)
macd_slowma = ta.ema(macd_source, macd_slowlength)
macd_line = macd_fastma - macd_slowma
macd_signal = ta.ema(macd_line, macd_signallength)
macd_histo = macd_line - macd_signal
macd_plotcolor = if macd_histo > 0
macd_histo > macd_histo ? macd_histo_color_1 : macd_histo_color_2
else
macd_histo < macd_histo ? macd_histo_color_3 : macd_histo_color_4
// Определяем значения для верхней и нижней границы RSI
rsi_upper_bound = 100
rsi_lower_bound = 0
// Рассчитываем значения MACD гистограммы, ограничивая их между границами RSI
macd_histo_bounded = macd_histo
if macd_histo > 0
macd_histo_bounded := math.min(macd_histo, rsi_upper_bound - rsi_zero_line + macd_zero_line)
macd_histo_bounded
else
macd_histo_bounded := math.max(macd_histo, rsi_lower_bound - rsi_zero_line + macd_zero_line)
macd_histo_bounded
plot(show_macd_histo_modul_input ? macd_histo_bounded : na, title = 'MACD', color = macd_plotcolor, style = plot.style_area)
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// OBV INPUTS ///////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
// obv_plot_color_input = input.color(color.new(#2962FF, 5), title = 'OBV line color', group = rd_algorithm_6_group, tooltip = STYLE_TOOLTIP) //rd_obv_group
// obv_smoothing_plot_color_input = input.color(color.new(#f37f20, 5), title = 'OBV smoothing line color', group = rd_algorithm_6_group, tooltip = STYLE_TOOLTIP)
rd_consider_algo_6_input = input.bool(true, title = 'Activate OBV algorithm', group = rd_algorithm_6_group, tooltip = ENABLE_TOOLTIP)
rd_factor_rsi_open_long_algo_6_input = input.int(42, title = 'Factor RSI open Long', group = rd_algorithm_6_group, minval = 1, maxval = 100)
rd_factor_rsi_open_short_algo_6_input = input.int(58, title = 'Factor RSI open Short', group = rd_algorithm_6_group, minval = 1, maxval = 100)
obv_type_ma = input.string(defval = 'SMMA (RMA)', title = 'OBV smoothing method', options = , group = rd_algorithm_6_group)
obv_smoothing_length = input.int(10, title = 'OBV smoothing Length', group = rd_algorithm_6_group, minval = 1, maxval = 100)
obv_src = input.source(close, title = 'Source', group = rd_algorithm_6_group)
var obv_cumvol = 0.
obv_cumvol := obv_cumvol + nz(volume)
if obv_cumvol == 0
runtime.error('Поставщик данных не предоставляет объем.')
obv = ta.cum(math.sign(ta.change(obv_src)) * volume)
obv_ma(source, length, type) =>
switch type
'SMA' => ta.sma(source, length)
'EMA' => ta.ema(source, length)
'SMMA (RMA)' => ta.rma(source, length)
'WMA' => ta.wma(source, length)
'VWMA' => ta.vwma(source, length)
obv_smoothing_line = obv_ma(obv, obv_smoothing_length, obv_type_ma)
////////////////////////////////////////////////////////////////////////////////////////////////////
rd_OpenLong_label_color_input = input.color(color.new(#1b5e20, 0), title = 'Open Long Label color', group = rd_long_short_group, tooltip = STYLE_TOOLTIP)
rd_OpenShort_label_color_input = input.color(color.new(#e65100, 10), title = 'Open Short Label color', group = rd_long_short_group, tooltip = STYLE_TOOLTIP)
rd_Openlabel_textcolor_input = input.color(color.new(color.white, 10), title = 'Open Label font color', group = rd_long_short_group, tooltip = STYLE_TOOLTIP)
rd_CloseLong_label_color_input = input.color(color.new(#1b5e20, 0), title = 'Close Long Label color', group = rd_long_short_group, tooltip = STYLE_TOOLTIP)
rd_CloseShort_label_color_input = input.color(color.new(#e65100, 0), title = 'Close Short Label color', group = rd_long_short_group, tooltip = STYLE_TOOLTIP)
rd_Closelabel_textcolor_input = input.color(color.new(color.white, 20), title = 'Close Label font color', group = rd_long_short_group, tooltip = STYLE_TOOLTIP)
rd_OpenLong_label_txt = 'LONG'
rd_OpenShort_label_txt = 'SHORT'
rd_CloseLong_label_txt = 'SHORT'
rd_CloseShort_label_txt = 'LONG'
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// MFI INPUTS ///////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
rd_mfi_length = input.int(19, title = 'MFI Length', group = rd_mfi_set_group, minval = 1, maxval = 2000)
rd_mfi_plot_color = input.color(color.new(#9598a1, 10), title = 'MFI plot color', group = rd_mfi_set_group, tooltip = STYLE_TOOLTIP)
rd_mfi_source_input = input.source(hlc3, title = 'Source', group = rd_mfi_set_group)
rd_mfi_src = hlc3
rd_mfi_mf = ta.mfi(rd_mfi_source_input, rd_mfi_length)
plot(show_mfi_modul_input ? rd_mfi_mf + rsi_zero_line - mfi_zero_line : na, title = 'MFI', color = rd_mfi_plot_color, linewidth = 1, style = plot.style_histogram)
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// RSI //////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
rd_up = ta.rma(math.max(ta.change(rd_rsi_source_input), 0), rd_rsi_length_input)
rd_down = ta.rma(-math.min(ta.change(rd_rsi_source_input), 0), rd_rsi_length_input)
rd_rsi = rd_down == 0 ? 100 : rd_up == 0 ? 0 : 100 - 100 / (1 + rd_up / rd_down)
rd_rsi_ma = rd_ma(rd_rsi, rd_ma_length_input, rd_ma_type_input)
rd_is_BB = rd_ma_type_input == 'Bollinger Bands'
rd_rsi_plot = plot(show_rsi_modul_input ? rd_rsi - rsi_zero_line : na, title = 'RSI', color = rd_rsi_plot_color_input, linewidth = 2, style = plot.style_columns) //style = plot.style_cross
rd_MA_Plot = plot(show_rsi_modul_input ? show_rsi_ma_plot_input ? rd_rsi_ma - rsi_zero_line : na : na, title = 'RSI Smoothing Line', color = rd_ma_plot_color_input, linewidth = 2)
rd_RSI_Highest_Band = hline(90 - rsi_zero_line, title = '', color = rd_RSI_Highest_Band_color, linewidth = 1, linestyle = hline.style_solid, editable = false, display = display.none)
rd_RSI_Upper_Band = hline(70 - rsi_zero_line, title = '', color = rd_RSI_Upper_Band_color, linewidth = 1, linestyle = hline.style_dotted, editable = false, display = display.none)
rd_MID_line_Band = hline(50 - rsi_zero_line, title = '', color = rd_MID_line_Band_color, linewidth = 1, linestyle = hline.style_solid, editable = false, display = display.none)
rd_RSI_Lower_Band = hline(30 - rsi_zero_line, title = '', color = rd_RSI_Lower_Band_color, linewidth = 1, linestyle = hline.style_dotted, editable = false, display = display.none)
rd_RSI_lowest_Band = hline(10 - rsi_zero_line, title = '', color = rd_RSI_lowest_Band_color, linewidth = 1, linestyle = hline.style_solid, editable = false, display = display.none)
fill(rd_RSI_Upper_Band, rd_RSI_Lower_Band, color = rd_Fill_Color, title = 'RSI Background Fill', fillgaps = true, editable = false)
rd_BB_Upper_Band = plot(show_rsi_modul_input and rd_is_BB ? show_rsi_ma_plot_input ? rd_rsi_ma - rsi_zero_line + ta.stdev(rd_rsi, rd_ma_length_input) * rd_bb_mult_input : na : na, title = 'RSI Upper Bollinger Band', color = color.new(#90bff9, 0), editable = false)
rd_BB_Lower_Band = plot(show_rsi_modul_input and rd_is_BB ? show_rsi_ma_plot_input ? rd_rsi_ma - rsi_zero_line - ta.stdev(rd_rsi, rd_ma_length_input) * rd_bb_mult_input : na : na, title = 'RSI Lower Bollinger Band', color = color.new(#90bff9, 0), editable = false)
fill(rd_BB_Upper_Band, rd_BB_Lower_Band, color = rd_is_BB ? show_rsi_ma_plot_input ? rd_BB_Fill_Color : na : na, title = 'RSI Bollinger Bands Background Fill', editable = false, fillgaps = true)
rd_MID_Line_Plot = plot(50 - rsi_zero_line, color = na, title = 'RSI Middle Bollinger Band', editable = false, display = display.none)
fill(rd_rsi_plot, rd_MID_Line_Plot, 100 - rsi_zero_line, 70 - rsi_zero_line, top_color = color.new(color.green, 0), bottom_color = color.new(color.green, 100), title = 'RSI Overbought Gradient Fill')
fill(rd_rsi_plot, rd_MID_Line_Plot, 30 - rsi_zero_line, 0 - rsi_zero_line, top_color = color.new(color.red, 100), bottom_color = color.new(color.red, 0), title = 'RSI Oversold Gradient Fill')
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// STOCHASTIC RSI ///////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
//rd_rsi = ta.rsi(rd_strsi_src_input, rd_strsi_length_rsi_input)
rd_strsi_k = ta.sma(ta.stoch(rd_rsi, rd_rsi, rd_rsi, rd_strsi_length_stoch_input), rd_strsi_smooth_k_input)
rd_strsi_d = ta.sma(rd_strsi_k, rd_strsi_smoot_d_input)
rd_strsi_macdh = ta.sma(ta.stoch(rd_rsi, rd_rsi, rd_rsi, rd_strsi_length_stoch_input), rd_strsi_smooth_ls_input)
plot(show_stoc_rsi_modul_input ? rd_strsi_k + rsi_zero_line - strsi_zero_line : na, title = 'STRSI K', color = rd_strsi_plot_k_color_input, linewidth = 1)
plot(show_stoc_rsi_modul_input ? rd_strsi_d + rsi_zero_line - strsi_zero_line : na, title = 'STRSI D', color = rd_strsi_plot_d_color_input, linewidth = 1)
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// RELATIVE VOLATILITY INDEX (RVI) INPUTS ///////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
rvi_plot_color_input = input.color(color.new(#b2b5be, 15), title = 'RVI plot color', group = rvi_group, tooltip = STYLE_TOOLTIP)
rvi_ma_plot_color_input = input.color(color.new(#5b9cf6, 15), title = 'RVI Smoothing Line color', group = rvi_group, tooltip = STYLE_TOOLTIP)
rvi_length = input.int(10, minval = 1, group = rvi_group)
rvi_offset = input.int(0, 'Offset', minval = -500, maxval = 500, group = rvi_group)
rvi_matypeinput = input.string('SMA', title = 'MA Type', options = , group = rvi_group)
rvi_marvi_lengthinput = input.int(14, title = 'RVI MA Length', group = rvi_group)
rvi_bbmultinput = input.float(2.0, minval = 0.001, maxval = 50, title = 'BB StdDev', group = rvi_group)
rvi_src = input.source(close, 'Source', group = rvi_group)
rvi_len = input.int(14, title = 'RVI lenght', group = rvi_group)
rvi_stddev = ta.stdev(rvi_src, rvi_length)
rvi_upper = ta.ema(ta.change(rvi_src) <= 0 ? 0 : rvi_stddev, rvi_len)
rvi_lower = ta.ema(ta.change(rvi_src) > 0 ? 0 : rvi_stddev, rvi_len)
rvi = rvi_upper / (rvi_upper + rvi_lower) * 100
ma(source, rvi_length, type) =>
switch type
'SMA' =>
'Bollinger Bands' =>
= ta.bb(source, rvi_length, rvi_bbmultinput)
'EMA' =>
'SMMA (RMA)' =>
'WMA' =>
'VWMA' =>
= ma(rvi, rvi_marvi_lengthinput, rvi_matypeinput)
// rvi_h0 = hline(80, "Upper Band", color=#787B86)
// hline(50, "Middle Band", color=color.new(#787B86, 50))
// rvi_h1 = hline(20, "Lower Band", color=#787B86)
// fill(rvi_h0, rvi_h1, color=color.rgb(126, 87, 194, 90), title="Background")
plot(show_rvi_modul_input ? rvi - rvi_zero_line : na, title = 'RVI', color = rvi_plot_color_input, offset = rvi_offset, linewidth = 1, style = plot.style_stepline)
plot(show_rvi_modul_input ? show_rvi_ma_plot_input ? rviMA - rvi_zero_line : na : na, title = 'RVI Smoothing Line', color = rvi_ma_plot_color_input, offset = rvi_offset, linewidth = 1)
rvi_bbupper = plot(show_rvi_modul_input ? highValue - rvi_zero_line : na, title = 'RVI Upper Bollinger Band', color = color.green)
rvi_bblower = plot(show_rvi_modul_input ? lowValue - rvi_zero_line : na, title = 'RVI Lower Bollinger Band', color = color.green)
fill(rvi_bbupper, rvi_bblower, color = color.new(color.green, 90), title = 'RVI Bollinger Bands Background Fill')
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// DIVERGENCE ///////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
rd_Lookback_Right = 5
rd_Lookback_Left = 5
rd_Range_Upper = 60
rd_Range_Lower = 5
rd_Bear_Color = color.new(#e65100, 0)
rd_Bull_Color = color.new(#1b5e20, 0)
rd_Text_Color = color.new(color.white, 0)
rd_None_Color = color.new(color.white, 100)
rd_PL_Found = na(ta.pivotlow(rd_rsi, rd_Lookback_Left, rd_Lookback_Right)) ? false : true
rd_PH_Found = na(ta.pivothigh(rd_rsi, rd_Lookback_Left, rd_Lookback_Right)) ? false : true
_inRange(cond) =>
rd_Bars = ta.barssince(cond == true)
rd_Range_Lower <= rd_Bars and rd_Bars <= rd_Range_Upper
/////////////////////////////////////////// REGULAR BULLISH
/////////////////////////////////////////// RSI: HIGHER LOW
rd_RSI_HL = rd_rsi > ta.valuewhen(rd_PL_Found, rd_rsi , 1) and _inRange(rd_PL_Found )
// Price: Lower Low
rd_PriCeLL = low < ta.valuewhen(rd_PL_Found, low , 1)
rd_bull_cond_alert = rd_PriCeLL and rd_RSI_HL and rd_PL_Found
rd_Bull_Cond = show_rsi_divergence and rd_bull_cond_alert
plot(show_rsi_modul_input and rd_PL_Found ? rd_rsi - rsi_zero_line : na, offset = -rd_Lookback_Right, title = 'Regular Bullish', linewidth = 2, force_overlay = true, color = rd_Bull_Cond ? rd_Bull_Color : rd_None_Color)
plotshape(show_rsi_modul_input and rd_Bull_Cond ? rd_rsi - rsi_zero_line : na, offset = -rd_Lookback_Right, title = 'Regular Bullish Label', text = 'BULLS', style = shape.labelup, location = location.belowbar, force_overlay = true, color = rd_Bull_Color, textcolor = rd_Text_Color, display = display.pane)
///////////////////////////////////////////// REGULAR BEARISH
///////////////////////////////////////////// RSI: LOWER HIGH
rd_RSI_LH = rd_rsi < ta.valuewhen(rd_PH_Found, rd_rsi , 1) and _inRange(rd_PH_Found )
//////////////////////////////////////////// PRICE: HIGHER HIGH
priceHH = high > ta.valuewhen(rd_PH_Found, high , 1)
rd_bearcondalert = priceHH and rd_RSI_LH and rd_PH_Found
rd_bearCond = show_rsi_divergence and rd_bearcondalert
plot(show_rsi_modul_input and rd_PH_Found ? rd_rsi - rsi_zero_line : na, offset = -rd_Lookback_Right, title = 'Regular Bearish', linewidth = 2, force_overlay = true, color = rd_bearCond ? rd_Bear_Color : rd_None_Color)
plotshape(show_rsi_modul_input and rd_bearCond ? rd_rsi - rsi_zero_line : na, offset = -rd_Lookback_Right, title = 'Regular Bearish Label', text = 'BEARS', style = shape.labeldown, location = location.abovebar, force_overlay = true, color = rd_Bear_Color, textcolor = rd_Text_Color, display = display.pane)
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// DIRECTIONAL MOVEMENT INDEX /////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
dmi_up = ta.change(high)
dmi_down = -ta.change(low)
dmi_plusDM = na(dmi_up) ? na : dmi_up > dmi_down and dmi_up > 0 ? dmi_up : 0
dmi_minusDM = na(dmi_down) ? na : dmi_down > dmi_up and dmi_down > 0 ? dmi_down : 0
dmi_trur = ta.rma(ta.tr, dmi_len)
dmi_plus = fixnan(100 * ta.rma(dmi_plusDM, dmi_len) / dmi_trur)
dmi_minus = fixnan(100 * ta.rma(dmi_minusDM, dmi_len) / dmi_trur)
dmi_sum = dmi_plus + dmi_minus
dmi_adx = 100 * ta.rma(math.abs(dmi_plus - dmi_minus) / (dmi_sum == 0 ? 1 : dmi_sum), dmi_lensig)
dmi_gc = dmi_down <= dmi_up
dmi_dc = dmi_down >= dmi_up
dmi_gc_ = ta.crossover(dmi_plus, dmi_adx)
dmi_dc_ = ta.crossunder(dmi_minus, dmi_adx)
plot(show_rd_modul_input ? dmi_adx + rsi_zero_line - dmiadx_zero_line : na, color = dmi_plot_adx_color_input, title = 'DMI ADX', linewidth = 3)
plot(show_rd_modul_input ? dmi_plus + rsi_zero_line - dmiadx_zero_line : na, color = dmi_plot_di_plus_color_input, title = 'DMI DI +', linewidth = 3)
plot(show_rd_modul_input ? dmi_minus + rsi_zero_line - dmiadx_zero_line : na, color = dmi_plot_di_minus_color_input, title = 'DMI DI -', linewidth = 3)
//////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// crossover/crossunder ////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
rd_sma = rd_ma(rd_rsi, rd_ma_length_input, rd_ma_type_input)
rd_rsi_sma_gc = ta.crossover(rd_rsi, rd_sma)
rd_rsi_sma_dc = ta.crossunder(rd_rsi, rd_sma)
rd_stoc_rsi_sma_dc = ta.crossover(rd_strsi_k, rd_strsi_d)
rd_stoc_rsi_sma_gc = ta.crossunder(rd_strsi_k, rd_strsi_d)
rd_adx_mfi_gc_ = ta.crossover(rd_mfi_mf, dmi_adx)
rd_adx_mfi_dc_ = ta.crossunder(rd_mfi_mf, dmi_adx)
rd_dmi_plus_adx_gc = ta.crossover(dmi_plus, dmi_adx)
rd_dmi_plus_adx_dc = ta.crossunder(dmi_plus, dmi_adx)
rd_dmi_minus_adx_gc = ta.crossover(dmi_minus, dmi_adx)
rd_dmi_minus_adx_dc = ta.crossunder(dmi_minus, dmi_adx)
rd_cci_gc = ta.crossover(cci, cci_smoothingLine)
rd_cci_dc = ta.crossunder(cci, cci_smoothingLine)
rd_obv_gc = ta.crossover(obv, obv_smoothing_line)
rd_obv_dc = ta.crossunder(obv, obv_smoothing_line)
///////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// ПАРАМЕТРЫ ВХОД/ВЫХОД ////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////
OpenLong_1 = bool(na)
OpenShort_1 = bool(na)
OpenLong_2 = bool(na)
OpenShort_2 = bool(na)
OpenLong_3 = bool(na)
OpenShort_3 = bool(na)
OpenLong_4 = bool(na)
OpenShort_4 = bool(na)
OpenLong_5 = bool(na)
OpenShort_5 = bool(na)
OpenLong_6 = bool(na)
OpenShort_6 = bool(na)
OpenLong_1 := rd_consider_algo_1_input ? rd_cci_gc and 25 < rd_rsi and rd_rsi < rd_factor_rsi_open_long_algo_1_input or rd_cci_gc and rd_rsi > 75 and ta.crossover(close, highUsePivot) and not(open - low > close - open) and osc > volumeThresh : bool(na)
OpenShort_1 := rd_consider_algo_1_input ? rd_cci_dc and 75 > rd_rsi and rd_rsi > rd_factor_rsi_open_short_algo_1_input or rd_cci_dc and rd_rsi < 25 and ta.crossunder(close, lowUsePivot) and not(open - close < high - open) and osc > volumeThresh : bool(na)
OpenLong_2 := rd_consider_algo_2_input ? rd_bull_cond_alert or rd_rsi_sma_gc and rd_rsi_ma < rd_factor_rsi_open_long_algo_2_input : bool(na)
OpenShort_2 := rd_consider_algo_2_input ? rd_bearcondalert or rd_rsi_sma_dc and rd_rsi_ma > rd_factor_rsi_open_short_algo_2_input : bool(na)
OpenLong_3 := rd_consider_algo_3_input ? rd_stoc_rsi_sma_gc and rd_strsi_k < rd_factor_strsi_open_long_algo_3_input : false
OpenShort_3 := rd_consider_algo_3_input ? rd_stoc_rsi_sma_dc and rd_strsi_k > rd_factor_strsi_open_short_algo_3_input : false
OpenLong_4 := rd_consider_algo_4_input ? rd_dmi_plus_adx_gc and 30 < rd_rsi and rd_rsi < rd_factor_rsi_open_long_algo_4_input or rd_dmi_minus_adx_dc and 30 < rd_rsi and rd_rsi < rd_factor_rsi_open_long_algo_4_input or rd_dmi_plus_adx_gc and rd_rsi > 70 : false
OpenShort_4 := rd_consider_algo_4_input ? rd_dmi_minus_adx_gc and 70 > rd_rsi and rd_rsi > rd_factor_rsi_open_short_algo_4_input or rd_dmi_plus_adx_dc and 70 > rd_rsi and rd_rsi > rd_factor_rsi_open_short_algo_4_input or rd_dmi_minus_adx_gc and rd_rsi < 30 : false
OpenLong_5 := rd_consider_algo_5_input ? macd_histo > 0 and macd_histo < 0 and 30 < rd_rsi and rd_rsi < rd_factor_strsi_open_long_algo_5_input or macd_histo > 0 and macd_histo < 0 and rd_rsi > 70 : false
OpenShort_5 := rd_consider_algo_5_input ? macd_histo < 0 and macd_histo > 0 and 70 > rd_rsi and rd_rsi > rd_factor_strsi_open_short_algo_5_input or macd_histo < 0 and macd_histo > 0 and rd_rsi < 30 : false
OpenLong_5 := rd_consider_algo_5_input ? macd_histo > 0 and macd_histo < 0 and 30 < rd_rsi and rd_rsi < rd_factor_strsi_open_long_algo_5_input or macd_histo > 0 and macd_histo < 0 and rd_rsi > 70 : false
OpenShort_5 := rd_consider_algo_5_input ? macd_histo < 0 and macd_histo > 0 and 70 > rd_rsi and rd_rsi > rd_factor_strsi_open_short_algo_5_input or macd_histo < 0 and macd_histo > 0 and rd_rsi < 30 : false
OpenLong_6 := rd_consider_algo_6_input ? rd_obv_gc and 20 < rd_rsi and rd_rsi < rd_factor_rsi_open_long_algo_6_input or rd_obv_gc and rd_rsi > 80 : bool(na)
OpenShort_6 := rd_consider_algo_6_input ? rd_obv_dc and 80 > rd_rsi and rd_rsi > rd_factor_rsi_open_short_algo_6_input or rd_obv_dc and rd_rsi < 20 : bool(na)
////////////////////////////////////////////////////////////////////////////////////////////////////
rd_OpenLong = OpenLong_1 or OpenLong_2 or OpenLong_3 or OpenLong_4 or OpenLong_5 or OpenLong_6
rd_OpenShort = OpenShort_1 or OpenShort_2 or OpenShort_3 or OpenShort_4 or OpenShort_5 or OpenShort_6
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// LABELS LONG/SHORT //////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
plotshape(show_long_short_modul_input ? rd_OpenLong : bool(na), force_overlay = true, color = rd_OpenLong_label_color_input, title = 'Open Long Label', text = rd_OpenLong_label_txt, textcolor = rd_Openlabel_textcolor_input, location = location.belowbar, style = shape.labelup, display = display.pane)
plotshape(show_long_short_modul_input ? rd_OpenShort : bool(na), force_overlay = true, color = rd_OpenShort_label_color_input, title = 'Open Short Label', text = rd_OpenShort_label_txt, textcolor = rd_Openlabel_textcolor_input, location = location.abovebar, style = shape.labeldown, display = display.pane)
////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////// ALERTS LONG/SHORT ////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
alertcondition(rd_OpenLong, title = '$ Open long', message = 'Open long {{exchange}}:{{ticker}}, price = {{close}}, volume = {{volume}}')
alertcondition(rd_OpenShort, title = '$ Open short', message = 'Open short {{exchange}}:{{ticker}}, price = {{close}}, volume = {{volume}}')
////////////////////////////////////////////////////////////////////////////////////////////////////
Auto-Length Moving Average + Trend Signals (Zeiierman)█ Overview
The Auto-Length Moving Average + Trend Signals (Zeiierman) is an easy-to-use indicator designed to help traders dynamically adjust their moving average length based on market conditions. This tool adapts in real-time, expanding and contracting the moving average based on trend strength and momentum shifts.
The indicator smooths out price fluctuations by modifying its length while ensuring responsiveness to new trends. In addition to its adaptive length algorithm, it incorporates trend confirmation signals, helping traders identify potential trend reversals and continuations with greater confidence.
This indicator suits scalpers, swing traders, and trend-following investors who want a self-adjusting moving average that adapts to volatility, momentum, and price action dynamics.
█ How It Works
⚪ Dynamic Moving Average Length
The core feature of this indicator is its ability to automatically adjust the length of the moving average based on trend persistence and market conditions:
Expands in strong trends to reduce noise.
Contracts in choppy or reversing markets for faster reaction.
This allows for a more accurate moving average that aligns with current price dynamics.
⚪ Trend Confirmation & Signals
The indicator includes built-in trend detection logic, classifying trends based on market structure. It evaluates trend strength based on consecutive bars and smooths out transitions between bullish, bearish, and neutral conditions.
Uptrend: Price is persistently above the adjusted moving average.
Downtrend: Price remains below the adjusted moving average.
Neutral: Price fluctuates around the moving average, indicating possible consolidation.
⚪ Adaptive Trend Smoothing
A smoothing factor is applied to enhance trend readability while minimizing excessive lag. This balances reactivity with stability, making it easier to follow longer-term trends while avoiding false signals.
█ How to Use
⚪ Trend Identification
Bullish Trend: The indicator confirms an uptrend when the price consistently stays above the dynamically adjusted moving average.
Bearish Trend: A downtrend is recognized when the price remains below the moving average.
⚪ Trade Entry & Exit
Enter long when the dynamic moving average is green and a trend signal occurs. Exit when the price crosses below the dynamic moving average.
Enter short when the dynamic moving average is red and a trend signal occurs. Exit when the price crosses above the dynamic moving average.
█ Slope-Based Reset
This mode resets the trend counter when the moving average slope changes direction.
⚪ Interpretation & Insights
Best for trend-following traders who want to filter out noise and only reset when a clear shift in momentum occurs.
Higher slope length (N): More stable trends, fewer resets.
Lower slope length (N): More reactive to small price swings, frequent resets.
Useful in swing trading to track significant trend reversals.
█ RSI-Based Reset
The counter resets when the Relative Strength Index (RSI) crosses predefined overbought or oversold levels.
⚪ Interpretation & Insights
Best for reversal traders who look for extreme overbought/oversold conditions.
High RSI threshold (e.g., 80/20): Fewer resets, only extreme conditions trigger adjustments.
Lower RSI threshold (e.g., 60/40): More frequent resets, detecting smaller corrections.
Great for detecting exhaustion in trends before potential reversals.
█ Volume-Based Reset
A reset occurs when current volume significantly exceeds its moving average, signaling a shift in market participation.
⚪ Interpretation & Insights
Best for traders who follow institutional activity (high volume often means large players are active).
Higher volume SMA length: More stable trends, only resets on massive volume spikes.
Lower volume SMA length: More reactive to short-term volume shifts.
Useful in identifying breakout conditions and trend acceleration points.
█ Bollinger Band-Based Reset
A reset occurs when price closes above the upper Bollinger Band or below the lower Bollinger Band, signaling potential overextension.
⚪ Interpretation & Insights
Best for traders looking for volatility-based trend shifts.
Higher Bollinger Band multiplier (k = 2.5+): Captures only major price extremes.
Lower Bollinger Band multiplier (k = 1.5): Resets on moderate volatility changes.
Useful for detecting overextensions in strong trends before potential retracements.
█ MACD-Based Reset
A reset occurs when the MACD line crosses the signal line, indicating a momentum shift.
⚪ Interpretation & Insights
Best for momentum traders looking for trend continuation vs. exhaustion signals.
Longer MACD lengths (260, 120, 90): Captures major trend shifts.
Shorter MACD lengths (10, 5, 3): Reacts quickly to momentum changes.
Useful for detecting strong divergences and market shifts.
█ Stochastic-Based Reset
A reset occurs when Stochastic %K crosses overbought or oversold levels.
⚪ Interpretation & Insights
Best for short-term traders looking for fast momentum shifts.
Longer Stochastic length: Filters out false signals.
Shorter Stochastic length: Captures quick intraday shifts.
█ CCI-Based Reset
A reset occurs when the Commodity Channel Index (CCI) crosses predefined overbought or oversold levels. The CCI measures the price deviation from its statistical mean, making it a useful tool for detecting overextensions in price action.
⚪ Interpretation & Insights
Best for cycle traders who aim to identify overextended price deviations in trending or ranging markets.
Higher CCI threshold (e.g., ±200): Detects extreme overbought/oversold conditions before reversals.
Lower CCI threshold (e.g., ±10): More sensitive to trend shifts, useful for early signal detection.
Ideal for detecting momentum shifts before price reverts to its mean or continues trending strongly.
█ Momentum-Based Reset
A reset occurs when Momentum (Rate of Change) crosses zero, indicating a potential shift in price direction.
⚪ Interpretation & Insights
Best for trend-following traders who want to track acceleration vs. deceleration.
Higher momentum length: Captures longer-term shifts.
Lower momentum length: More responsive to short-term trend changes.
█ How to Interpret the Trend Strength Table
The Trend Strength Table provides valuable insights into the current market conditions by tracking how the dynamic moving average is adjusting based on trend persistence. Each metric in the table plays a role in understanding the strength, longevity, and stability of a trend.
⚪ Counter Value
Represents the current length of trend persistence before a reset occurs.
The higher the counter, the longer the current trend has been in place without resetting.
When this value reaches the Counter Break Threshold, the moving average resets and contracts to become more reactive.
Example:
A low counter value (e.g., 10) suggests a recent trend reset, meaning the market might be changing directions frequently.
A high counter value (e.g., 495) means the trend has been ongoing for a long time, indicating strong trend persistence.
⚪ Trend Strength
Measures how strong the current trend is based on the trend confirmation logic.
Higher values indicate stronger trends, while lower values suggest weaker trends or consolidations.
This value is dynamic and updates based on price action.
Example:
Trend Strength of 760 → Indicates a high-confidence trend.
Trend Strength of 50 → Suggests weak price action, possibly a choppy market.
⚪ Highest Trend Score
Tracks the strongest trend score recorded during the session.
Helps traders identify the most dominant trend observed in the timeframe.
This metric is useful for analyzing historical trend strength and comparing it with current conditions.
Example:
Highest Trend Score = 760 → Suggests that at some point, there was a strong trend in play.
If the current trend strength is much lower than this value, it could indicate trend exhaustion.
⚪ Average Trend Score
This is a rolling average of trend strength across the session.
Provides a bigger picture of how the trend strength fluctuates over time.
If the average trend score is high, the market has had persistent trends.
If it's low, the market may have been choppy or sideways.
Example:
Average Trend Score of 147 vs. Current Trend Strength of 760 → Indicates that the current trend is significantly stronger than the historical average, meaning a breakout might be occurring.
Average Trend Score of 700+ → Suggests a strong trending market overall.
█ Settings
⚪ Dynamic MA Controls
Base MA Length – Sets the starting length of the moving average before dynamic adjustments.
Max Dynamic Length – Defines the upper limit for how much the moving average can expand.
Trend Confirmation Length – The number of bars required to validate an uptrend or downtrend.
⚪ Reset & Adaptive Conditions
Reset Condition Type – Choose what triggers the moving average reset (Slope, RSI, Volume, MACD, etc.).
Trend Smoothing Factor – Adjusts how smoothly the moving average responds to price changes.
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
2022 Model ICT Entry Strategy [TradingFinder] One Setup For Life🔵 Introduction
The ICT 2022 model, introduced by Michael Huddleston, is an advanced trading strategy rooted in liquidity and price imbalance, where time and price serve as the core elements. This ICT 2022 trading strategy is an algorithmic approach designed to analyze liquidity and imbalances in the market. It incorporates concepts such as Fair Value Gap (FVG), Liquidity Sweep, and Market Structure Shift (MSS) to help traders identify liquidity movements and structural changes in the market, enabling them to determine optimal entry and exit points for their trades.
This Full ICT Day Trading Model empowers traders to pinpoint the Previous Day High/Low as well as the highs and lows of critical sessions like the London and New York sessions. These levels act as Liquidity Zones, which are frequently swept prior to a market structure shift (MSS) or a retracement to areas such as Optimal Trade Entry (OTE).
Bullish :
Bearish :
🔵 How to Use
The ICT 2022 model is a sophisticated trading strategy that focuses on identifying key liquidity levels and price movements. It operates based on two main principles. In the first phase, the price approaches liquidity zones and sweeps critical levels such as the previous day’s high or low and key session levels.
This movement is known as a Liquidity Sweep. In the second phase, following the sweep, the price retraces to areas like the FVG (Fair Value Gap), creating ideal entry points for trades. Below is a detailed explanation of how to apply this strategy in bullish and bearish setups.
🟣 Bullish ICT 2022 Model Setup
To use the ICT 2022 model in a bullish setup, start by identifying the Previous Day High/Low or key session levels, such as those of the London or New York sessions. In a bullish setup, the price usually moves downward first, sweeping the Liquidity Low. This move, known as a Liquidity Sweep, reflects the collection of buy orders by major market participants.
After the liquidity sweep, the price should shift market structure and start moving upward; this shift, referred to as Market Structure Shift (MSS), signals the beginning of an upward trend. Following MSS, areas like FVG, located within the Discount Zone, are identified. At this stage, the trader waits for the price to retrace to these zones. Once the price returns, a long trade is executed.
Finally, the stop-loss should be set below the liquidity low to manage risk, while the take-profit target is usually placed above the previous day’s high or other identified liquidity levels. This structure enables traders to take advantage of the upward price movement after the liquidity sweep.
🟣 Bearish ICT 2022 Model Setup
To identify a bearish setup in the ICT 2022 model, begin by marking the Previous Day High/Low or key session levels, such as the London or New York sessions. In this scenario, the price typically moves upward first, sweeping the Liquidity High. This move, known as a Liquidity Sweep, signifies the collection of sell orders by key market players.
After the liquidity sweep, the price should shift market structure downward. This movement, called the Market Structure Shift (MSS), indicates the start of a downtrend. Following MSS, areas such as FVG, found within the Premium Zone, are identified. At this stage, the trader waits for the price to retrace to these areas. Once the price revisits these zones, a short trade is executed.
In this setup, the stop-loss should be placed above the liquidity high to control risk, while the take-profit target is typically set below the previous day’s low or another defined liquidity level. This approach allows traders to capitalize on the downward price movement following the liquidity sweep.
🔵 Settings
Swing period : You can set the swing detection period.
Max Swing Back Method : It is in two modes "All" and "Custom". If it is in "All" mode, it will check all swings, and if it is in "Custom" mode, it will check the swings to the extent you determine.
Max Swing Back : You can set the number of swings that will go back for checking.
FVG Length : Default is 120 Bar.
MSS Length : Default is 80 Bar.
FVG Filter : This refines the number of identified FVG areas based on a specified algorithm to focus on higher quality signals and reduce noise.
Types of FVG filters :
Very Aggressive Filter: Adds a condition where, for an upward FVG, the last candle's highest price must exceed the middle candle's highest price, and for a downward FVG, the last candle's lowest price must be lower than the middle candle's lowest price. This minimally filters out FVGs.
Aggressive Filter: Builds on the Very Aggressive mode by ensuring the middle candle is not too small, filtering out more FVGs.
Defensive Filter: Adds criteria regarding the size and structure of the middle candle, requiring it to have a substantial body and specific polarity conditions, filtering out a significant number of FVGs.
Very Defensive Filter: Further refines filtering by ensuring the first and third candles are not small-bodied doji candles, retaining only the highest quality signals.
🔵 Conclusion
The ICT 2022 model is a comprehensive and advanced trading strategy designed around key concepts such as liquidity, price imbalance, and market structure shifts (MSS). By focusing on the sweep of critical levels such as the previous day’s high/low and important trading sessions like London and New York, this strategy enables traders to predict market movements with greater precision.
The use of tools like FVG in this model helps traders fine-tune their entry and exit points and take advantage of bullish and bearish trends after liquidity sweeps. Moreover, combining this strategy with precise timing during key trading sessions allows traders to minimize risk and maximize returns.
In conclusion, the ICT 2022 model emphasizes the importance of time and liquidity, making it a powerful tool for both professional and novice traders. By applying the principles of this model, you can make more informed trading decisions and seize opportunities in financial markets more effectively.
Support & Resistance AI LevelScopeSupport & Resistance AI LevelScope
Support & Resistance AI LevelScope is an advanced, AI-driven tool that automatically detects and highlights key support and resistance levels on your chart. This indicator leverages smart algorithms to pinpoint the most impactful levels, providing traders with a precise, real-time view of critical price boundaries. Save time and enhance your trading edge with effortless, intelligent support and resistance identification.
Key Features:
AI-Powered Level Detection: The LevelScope algorithm continuously analyzes price action, dynamically plotting support and resistance levels based on recent highs and lows across your chosen timeframe.
Sensitivity Control: Customize the sensitivity to display either major levels for a macro view or more frequent levels for detailed intraday analysis. Easily adjust to suit any trading style or market condition.
Level Strength Differentiation: Instantly recognize the strength of each level with visual cues based on how often price has touched each one. Stronger levels are emphasized, highlighting areas with higher significance, while weaker levels are marked subtly.
Customizable Visuals: Tailor the look of your chart with customizable color schemes and line thickness options for strong and weak levels, ensuring clear visibility without clutter.
Proximity Alerts: Receive alerts when price approaches key support or resistance, giving you a heads-up for potential market reactions and trading opportunities.
Who It’s For:
Whether you're a day trader, swing trader, or just want a quick, AI-driven way to identify high-probability levels on your chart, Support & Resistance AI LevelScope is designed to keep you focused and informed. This indicator is the perfect addition to any trader’s toolkit, empowering you to make more confident, data-backed trading decisions with ease.
Upgrade your analysis with AI-powered support and resistance—no more manual lines, only smart levels!
Advanced VWAP [CryptoSea]The Advanced VWAP is a comprehensive volume-weighted average price (VWAP) tool designed to provide traders with a deeper understanding of market trends through multi-layered VWAP analysis. This indicator is ideal for those who want to track price movements in relation to VWAP bands and detect key market levels with greater precision.
Key Features
Multi-Timeframe VWAP Bands: Includes multiple VWAP bands with different lookback periods (5, 10, 25, and 50), allowing traders to observe short-term and long-term price behavior.
Smoothed Band Options: Offers optional smoothing of VWAP bands to reduce noise and highlight significant trends more clearly.
Dynamic Median Line Display: Plots the median line of the VWAP bands, providing a reference for price movements and potential reversal zones.
VWAP Trend Strength Calculation: Measures the strength of the trend based on the price's position relative to the VWAP bands, normalized between -1 and 1 for easier interpretation.
In the example below we can see the VWAP Forecastd Cloud, which consists of multiple layers of VWAP bands with varying lookback periods, creating a dynamic forecast visualization. The cloud structure represents potential future price ranges by projecting VWAP-based bands outward, with darker areas indicating higher density and overlap of the bands, suggesting stronger support or resistance zones. This approach helps traders anticipate price movement and identify areas of potential consolidation or breakout as the price interacts with different layers of the forecast cloud.
How it Works
VWAP Calculation: Utilizes multiple VWAP calculations based on various lookback periods to capture a broad range of price behaviors. The indicator adapts to different market conditions by switching between short-term and long-term VWAP references.
Smoothing Algorithms: Provides the ability to smooth the VWAP bands using different moving average types (SMA, EMA, SMMA, WMA, VWMA) to suit various trading strategies and reduce market noise.
Trend Strength Analysis: Computes the trend strength based on the price's distance from the VWAP bands, with a value range of -1 to 1. This feature helps traders identify the intensity of uptrends and downtrends.
Alert Conditions: Includes alert options for crossing above or below the smoothed median line, as well as touching the smoothed upper or lower bands, providing timely notifications for potential trading opportunities.
This image below illustrates the use of smoothed VWAP bands, which provide a cleaner representation of the price's relationship to the VWAP by reducing market noise. The smoothed bands create a flowing cloud-like structure, making it easier to observe significant trends and potential reversal points. The circles highlight areas where the price interacts with the smoothed bands, indicating potential key levels for trend continuation or reversal. This setup helps traders focus on meaningful movements and filter out minor fluctuations, improving the identification of strategic entry and exit points based on smoother trend signals.
Application
Strategic Entry and Exit Points: Helps traders identify optimal entry and exit points based on the interaction with VWAP bands and trend strength readings.
Trend Confirmation: Assists in confirming trend strength by analyzing price movements relative to the VWAP bands and detecting significant breaks or touches.
Customized Analysis: Supports a wide range of trading styles by offering adjustable smoothing, band settings, and alert conditions to meet specific trading needs.
The Advanced VWAP by is a valuable addition to any trader's toolkit, offering versatile features to navigate different market scenarios with confidence. Whether used for day trading or longer-term analysis, this tool enhances decision-making by providing a robust view of price behavior relative to VWAP levels.
MTF Regression with Forecast### **MTF Regression with Forecast, Treasury Yield, Additional Variable & VWAP Filter - Enhanced with Long Regression**
Unlock advanced market insights with our **MTF Regression** indicator, meticulously designed for traders seeking comprehensive multi-timeframe analysis combined with powerful forecasting tools. Whether you're a seasoned trader or just starting out, this indicator offers a suite of features to enhance your trading strategy.
#### **🔍 Key Features:**
- **Multi-Timeframe (MTF) Regression:**
- **Fast, Slow, & Long Regressions:** Analyze price trends across multiple timeframes to capture both short-term movements and long-term trends.
- **Customizable Price Inputs:**
- **Flexible Price Selection:** Choose between Close, Open, High, or Low prices to suit your trading style.
- **Price Transformation:** Option to apply Exponential Moving Averages (EMA) for smoother trend analysis.
- **Diverse Regression Methods:**
- **Multiple Algorithms:** Select from Linear, Exponential, Hull Moving Average (HMA), Weighted Moving Average (WMA), or Spline regressions to best fit your analysis needs.
- **Integrated External Data:**
- **10-Year Treasury Yield:** Incorporate macroeconomic indicators to refine regression accuracy.
- **Additional Variables:** Enhance your analysis by integrating data from other tickers (e.g., NASDAQ:AAPL).
- **Advanced Filtering Options:**
- **VWAP Filter:** Align signals with the Volume Weighted Average Price for improved trade entries.
- **Price Action Filter:** Ensure price behavior supports the generated signals for higher reliability.
- **Enhanced Signal Generation:**
- **Bullish & Bearish Signals:** Identify potential trend reversals and continuations with clear visual cues.
- **Predictive Signals:** Forecast future price movements with forward-looking arrows based on regression slopes.
- **Slope & Acceleration Thresholds:** Customize minimum slope and acceleration levels to fine-tune signal sensitivity.
- **Forecasting Capabilities:**
- **Projection Lines:** Visualize future price trends by extending regression lines based on current slope data.
- **User-Friendly Interface:**
- **Organized Settings Groups:** Easily navigate through price inputs, regression settings, integration options, and more.
- **Customizable Alerts:** Stay informed with configurable alerts for bullish, bearish, and predictive signals.
#### **📈 Why Choose MTF Regression Indicator?**
- **Comprehensive Analysis:** Combines multiple regression techniques and external data sources for a well-rounded market view.
- **Flexibility:** Highly customizable to fit various trading strategies and preferences.
- **Enhanced Decision-Making:** Provides clear signals and forecasts to support informed trading decisions.
- **Efficiency:** Optimized to deliver reliable performance without overloading your trading platform.
Elevate your trading game with the **MTF Regression with Forecast, Treasury Yield, Additional Variable & VWAP Filter** indicator. Harness the power of multi-timeframe analysis and predictive forecasting to stay ahead in the dynamic markets.
---
*Feel free to reach out for more information or support. Happy Trading!*
Iceberg Trade Revealer [CHE]Unveiling Iceberg Trades: A Deep Dive into Low Volatility Market Phases
Introduction
In the dynamic world of trading, hidden forces often influence market movements in ways that aren't immediately apparent. One such force is the phenomenon of iceberg trades—large orders that are concealed to prevent significant market impact. This presentation explores the concept of iceberg trades, explains why they are typically hidden during periods of low volatility, and introduces an indicator designed to reveal these elusive trades.
Agenda
1. Understanding Iceberg Trades
- Definition and Purpose
- Impact on Market Dynamics
2. The Low Volatility Concealment
- Why Low Volatility Phases?
- Strategies Behind Hiding Large Orders
3. Introducing the Iceberg Trade Revealer Indicator
- How the Indicator Works
- Key Components and Calculations
4. Demonstration and Use Cases
- Interpreting the Indicator Signals
- Practical Trading Applications
5. Conclusion
- Summarizing the Insights
- Q&A Session
1. Understanding Iceberg Trades
Definition and Purpose
- Iceberg Trades are large single orders divided into smaller lots to disguise the total order quantity.
- Traders use iceberg orders to minimize market impact and avoid unfavorable price movements.
Impact on Market Dynamics
- Concealed Volume: Iceberg orders hide true supply and demand levels.
- Price Stability: They prevent sudden spikes or drops by releasing orders gradually.
- Market Sentiment: Their presence can influence perceptions of market strength or weakness.
2. The Low Volatility Concealment
Why Low Volatility Phases?
- Less Market Attention: Low volatility periods attract fewer traders, making it easier to conceal large orders.
- Reduced Slippage: Prices are more stable, reducing the risk of executing orders at unfavorable prices.
- Strategic Advantage: Large players can accumulate or distribute positions without tipping off the market.
Strategies Behind Hiding Large Orders
- Order Splitting: Breaking down large orders into smaller pieces.
- Time Slicing: Executing orders over an extended period.
- Algorithmic Trading: Using sophisticated algorithms to optimize order execution.
3. Introducing the Iceberg Trade Revealer Indicator
How the Indicator Works
- Core Thesis: Iceberg trades can be detected by analyzing periods of unusually low volatility.
- Volatility Analysis: Uses the Average True Range (ATR) and Bollinger Bands to identify low volatility phases.
- Signal Generation: Marks periods where iceberg trades are likely occurring.
Key Components and Calculations
1. Average True Range (ATR)
- Measures market volatility over a specified period.
- Lower ATR values indicate less price movement.
2. Bollinger Bands
- Creates a volatility envelope around the ATR.
- Bands tighten during low volatility and widen during high volatility.
3. Timeframe Adjustments
- Utilizes multiple timeframes to enhance signal accuracy.
- Options for auto, multiplier, or manual timeframe selection.
4. Signal Conditions
- Iceberg Trade Detection: ATR falls below the lower Bollinger Band.
- Revealed Volatility: ATR rises above the upper Bollinger Band, indicating potential market moves after iceberg trades.
4. Demonstration and Use Cases
Interpreting the Indicator Signals
- Iceberg Trade Zones: Highlighted areas where large hidden orders are likely.
- Revealed Volatility Zones: Areas indicating the market's response to the execution of iceberg trades.
Practical Trading Applications
- Entry and Exit Points: Use signals to time trades alongside institutional activity.
- Risk Management: Adjust strategies during detected low volatility phases.
- Market Analysis: Gain insights into underlying market mechanics.
5. Conclusion
Summarizing the Insights
- Iceberg Trades play a significant role in market movements, especially when concealed during low volatility phases.
- The Iceberg Trade Revealer Indicator provides a tool to uncover these hidden activities, offering traders a strategic edge.
- Understanding and utilizing this indicator can enhance trading decisions by aligning them with the actions of major market players.
Best regards Chervolino ( Volker )
Q&A Session
- Questions and Discussions: Open the floor for any queries or further explanations.
Thank You!
By delving into the hidden aspects of market activity, traders can better navigate the complexities of financial markets. The Iceberg Trade Revealer Indicator serves as a bridge between observable market data and the concealed strategies of large institutions.
References
- Average True Range (ATR): A technical analysis indicator that measures market volatility.
- Bollinger Bands: A volatility indicator that creates a band of three lines which are plotted in relation to a security's price.
- Iceberg Orders: Large orders divided into smaller lots to hide the actual order quantity.
Note: Always consider multiple factors when making trading decisions. Indicators provide tools, but they do not guarantee results.
Educational Content Disclaimer:
Disclaimer:
The content provided, including all code and materials, is strictly for educational and informational purposes only. It is not intended as, and should not be interpreted as, financial advice, a recommendation to buy or sell any financial instrument, or an offer of any financial product or service. All strategies, tools, and examples discussed are provided for illustrative purposes to demonstrate coding techniques and the functionality of Pine Script within a trading context.
Any results from strategies or tools provided are hypothetical, and past performance is not indicative of future results. Trading and investing involve high risk, including the potential loss of principal, and may not be suitable for all individuals. Before making any trading decisions, please consult with a qualified financial professional to understand the risks involved.
By using this script, you acknowledge and agree that any trading decisions are made solely at your discretion and risk.
[ALGOA+] Markov Chains Library by @metacamaleoLibrary "MarkovChains"
Markov Chains library by @metacamaleo. Created in 09/08/2024.
This library provides tools to calculate and visualize Markov Chain-based transition matrices and probabilities. This library supports two primary algorithms: a rolling window Markov Chain and a conditional Markov Chain (which operates based on specified conditions). The key concepts used include Markov Chain states, transition matrices, and future state probabilities based on past market conditions or indicators.
Key functions:
- `mc_rw()`: Builds a transition matrix using a rolling window Markov Chain, calculating probabilities based on a fixed length of historical data.
- `mc_cond()`: Builds a conditional Markov Chain transition matrix, calculating probabilities based on the current market condition or indicator state.
Basically, you will just need to use the above functions on your script to default outputs and displays.
Exported UDTs include:
- s_map: An UDT variable used to store a map with dummy states, i.e., if possible states are bullish, bearish, and neutral, and current is bullish, it will be stored
in a map with following keys and values: "bullish", 1; "bearish", 0; and "neutral", 0. You will only use it to customize your own script, otherwise, it´s only for internal use.
- mc_states: This UDT variable stores user inputs, calculations and MC outputs. As the above, you don´t need to use it, but you may get features to customize your own script.
For example, you may use mc.tm to get the transition matrix, or the prob map to customize the display. As you see, functions are all based on mc_states UDT. The s_map UDT is used within mc_states´s s array.
Optional exported functions include:
- `mc_table()`: Displays the transition matrix in a table format on the chart for easy visualization of the probabilities.
- `display_list()`: Displays a map (or array) of string and float/int values in a table format, used for showing transition counts or probabilities.
- `mc_prob()`: Calculates and displays probabilities for a given number of future bars based on the current state in the Markov Chain.
- `mc_all_states_prob()`: Calculates probabilities for all states for future bars, considering all possible transitions.
The above functions may be used to customize your outputs. Use the returned variable mc_states from mc_rw() and mc_cond() to display each of its matrix, maps or arrays using mc_table() (for matrices) and display_list() (for maps and arrays) if you desire to debug or track the calculation process.
See the examples in the end of this script.
Have good trading days!
Best regards,
@metacamaleo
-----------------------------
KEY FUNCTIONS
mc_rw(state, length, states, pred_length, show_table, show_prob, table_position, prob_position, font_size)
Builds the transition matrix for a rolling window Markov Chain.
Parameters:
state (string) : The current state of the market or system.
length (int) : The rolling window size.
states (array) : Array of strings representing the possible states in the Markov Chain.
pred_length (int) : The number of bars to predict into the future.
show_table (bool) : Boolean to show or hide the transition matrix table.
show_prob (bool) : Boolean to show or hide the probability table.
table_position (string) : Position of the transition matrix table on the chart.
prob_position (string) : Position of the probability list on the chart.
font_size (string) : Size of the table font.
Returns: The transition matrix and probabilities for future states.
mc_cond(state, condition, states, pred_length, show_table, show_prob, table_position, prob_position, font_size)
Builds the transition matrix for conditional Markov Chains.
Parameters:
state (string) : The current state of the market or system.
condition (string) : A string representing the condition.
states (array) : Array of strings representing the possible states in the Markov Chain.
pred_length (int) : The number of bars to predict into the future.
show_table (bool) : Boolean to show or hide the transition matrix table.
show_prob (bool) : Boolean to show or hide the probability table.
table_position (string) : Position of the transition matrix table on the chart.
prob_position (string) : Position of the probability list on the chart.
font_size (string) : Size of the table font.
Returns: The transition matrix and probabilities for future states based on the HMM.
Gann + Laplace Smoothed Hybrid Volume Spread AnalysisThe Gann + Laplace Smoothed Hybrid Volume Spread Analysis ( GannLSHVSA ) Strategy/Indicator is an trading tool designed to fuse volume analysis with trend detection, offering traders a view of market dynamics.
This Strategy/Indicator stands apart by integrating the principles of the upgraded Discrete Fourier Transform (DFT), the Laplace Stieltjes Transform and volume spread analysis, enhanced with a layer of Fourier smoothing to distill market noise and highlight trend directions with unprecedented clarity.
The length of EMA and Strategy Entries are modified with the Gann swings .
This smoothing process allows traders to discern the true underlying patterns in volume and price action, stripped of the distractions of short-term fluctuations and noise.
The core functionality of the GannLSHVSA revolves around the innovative combination of volume change analysis, spread determination (calculated from the open and close price difference), and the strategic use of the EMA (default 10) to fine-tune the analysis of spread by incorporating volume changes.
Trend direction is validated through a moving average (MA) of the histogram, which acts analogously to the Volume MA found in traditional volume indicators. This MA serves as a pivotal reference point, enabling traders to confidently engage with the market when the histogram's movement concurs with the trend direction, particularly when it crosses the Trend MA line, signalling optimal entry points.
It returns 0 when MA of the histogram and EMA of the Price Spread are not align.
WHAT IS GannLSHVSA INDICATOR:
The GannLSHVSA plots a positive trend when a positive Volume smoothed Spread and EMA of Volume smoothed price is above 0, and a negative when negative Volume smoothed Spread and EMA of Volume smoothed price is below 0. When this conditions are not met it plots 0.
HOW TO USE THE STRATEGY:
Here you fine-tune the inputs until you find a combination that works well on all Timeframes you will use when creating your Automated Trade Algorithmic Strategy. I suggest 4h, 12h, 1D, 2D, 3D, 4D, 5D, 6D, W and M.
ORIGINALITY & USEFULNESS:
The GannLSHVSA Strategy is unique because it applies upgraded DFT, the Laplace Stieltjes Transform for data smoothing, effectively filtering out the minor fluctuations and leaving traders with a clear picture of the market's true movements. The DFT's ability to break down market signals into constituent frequencies offers a granular view of market dynamics, highlighting the amplitude and phase of each frequency component. This, combined with the strategic application of Ehler's Universal Oscillator principles via a histogram, furnishes traders with a nuanced understanding of market volatility and noise levels, thereby facilitating more informed trading decisions. The Gann swing strategy is developed by meomeo105, this Gann high and low algorithm forms the basis of the EMA modification.
DETAILED DESCRIPTION:
My detailed description of the indicator and use cases which I find very valuable.
What is the meaning of price spread?
In finance, a spread refers to the difference between two prices, rates, or yields. One of the most common types is the bid-ask spread, which refers to the gap between the bid (from buyers) and the ask (from sellers) prices of a security or asset.
We are going to use Open-Close spread.
What is Volume spread analysis?
Volume spread analysis (VSA) is a method of technical analysis that compares the volume per candle, range spread, and closing price to determine price direction.
What does this mean?
We need to have a positive Volume Price Spread and a positive Moving average of Volume price spread for a positive trend. OR via versa a negative Volume Price Spread and a negative Moving average of Volume price spread for a negative trend.
What if we have a positive Volume Price Spread and a negative Moving average of Volume Price Spread?
It results in a neutral, not trending price action.
Thus the Indicator/Strategy returns 0 and Closes all long and short positions.
I suggest using "Close all" input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using "Close all" input as True, except for the lowest TimeFrame. I suggest using 100% equity as your default quantity for fine-tune purposes. I have to mention that 100% equity may lead to unrealistic backtesting results. Be avare. When backtesting for trading purposes use Contracts or USDT.
Fine-tune Inputs: Gann + Laplace Smooth Volume Zone OscillatorUse this Strategy to Fine-tune inputs for the GannLSVZ0 Indicator.
Strategy allows you to fine-tune the indicator for 1 TimeFrame at a time; cross Timeframe Input fine-tuning is done manually after exporting the chart data.
I suggest using "Close all" input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using "Close all" input as True, except for the lowest TimeFrame.
MEANINGFUL DESCRIPTION:
The Volume Zone oscillator breaks up volume activity into positive and negative categories. It is positive when the current closing price is greater than the prior closing price and negative when it's lower than the prior closing price. The resulting curve plots through relative percentage levels that yield a series of buy and sell signals, depending on level and indicator direction.
The Gann Laplace Smoothed Volume Zone Oscillator GannLSVZO is a refined version of the Volume Zone Oscillator, enhanced by the implementation of the upgraded Discrete Fourier Transform, the Laplace Stieltjes Transform. Its primary function is to streamline price data and diminish market noise, thus offering a clearer and more precise reflection of price trends.
By combining the Laplace with Gann Swing Entries and with Ehler's white noise histogram, users gain a comprehensive perspective on volume-related market conditions.
HOW TO USE THE INDICATOR:
The default period is 2 but can be adjusted after backtesting. (I suggest 5 VZO length and NoiceR max length 8 as-well)
The VZO points to a positive trend when it is rising above the 0% level, and a negative trend when it is falling below the 0% level. 0% level can be adjusted in setting by adjusting VzoDifference. Oscillations rising below 0% level or falling above 0% level result in a natural trend.
HOW TO USE THE STRATEGY:
Here you fine-tune the inputs until you find a combination that works well on all Timeframes you will use when creating your Automated Trade Algorithmic Strategy. I suggest 4h, 12h, 1D, 2D, 3D, 4D, 5D, 6D, W and M.
When Indicator/Strategy returns 0 or natural trend, Strategy Closes All it's positions.
ORIGINALITY & USFULLNESS:
Personal combination of Gann swings and Laplace Stieltjes Transform of a price which results in less noise Volume Zone Oscillator.
The Laplace Stieltjes Transform is a mathematical technique that transforms discrete data from the time domain into its corresponding representation in the frequency domain. This process involves breaking down a signal into its individual frequency components, thereby exposing the amplitude and phase characteristics inherent in each frequency element.
This indicator utilizes the concept of Ehler's Universal Oscillator and displays a histogram, offering critical insights into the prevailing levels of market noise. The Ehler's Universal Oscillator is grounded in a statistical model that captures the erratic and unpredictable nature of market movements. Through the application of this principle, the histogram aids traders in pinpointing times when market volatility is either rising or subsiding.
The Gann swing strategy is developed by meomeo105, this Gann high and low algorithm forms the basis of the EMA modification.
DETAILED DESCRIPTION:
My detailed description of the indicator and use cases which I find very valuable.
What is oscillator?
Oscillators are chart indicators that can assist a trader in determining overbought or oversold conditions in ranging (non-trending) markets.
What is volume zone oscillator?
Price Zone Oscillator measures if the most recent closing price is above or below the preceding closing price.
Volume Zone Oscillator is Volume multiplied by the 1 or -1 depending on the difference of the preceding 2 close prices and smoothed with Exponential moving Average.
What does this mean?
If the VZO is above 0 and VZO is rising. We have a bullish trend. Most likely.
If the VZO is below 0 and VZO is falling. We have a bearish trend. Most likely.
Rising means that VZO on close is higher than the previous day.
Falling means that VZO on close is lower than the previous day.
What if VZO is falling above 0 line?
It means we have a high probability of a bearish trend.
Thus the indicator returns 0 and Strategy closes all it's positions when falling above 0 (or rising bellow 0) and we combine higher and lower timeframes to gauge the trend.
What is approximation and smoothing?
They are mathematical concepts for making a discrete set of numbers a
continuous curved line.
Laplace Stieltjes Transform approximation of a close price are taken from aprox library.
Key Features:
You can tailor the Indicator/Strategy to your preferences with adjustable parameters such as VZO length, noise reduction settings, and smoothing length.
Volume Zone Oscillator (VZO) shows market sentiment with the VZO, enhanced with Exponential Moving Average (EMA) smoothing for clearer trend identification.
Noise Reduction leverages Euler's White noise capabilities for effective noise reduction in the VZO, providing a cleaner and more accurate representation of market dynamics.
Choose between the traditional Fast Laplace Stieltjes Transform (FLT) and the innovative Double Discrete Fourier Transform (DTF32) soothed price series to suit your analytical needs.
Use dynamic calculation of Laplace coefficient or the static one. You may modify those inputs and Strategy entries with Gann swings.
I suggest using "Close all" input False when fine-tuning Inputs for 1 TimeFrame. When you export data to Excel/Numbers/GSheets I suggest using "Close all" input as True, except for the lowest TimeFrame. I suggest using 100% equity as your default quantity for fine-tune purposes. I have to mention that 100% equity may lead to unrealistic backtesting results. Be avare. When backtesting for trading purposes use Contracts or USDT.
ICT IPDA Liquidity Matrix By AlgoCadosThe ICT IPDA Liquidity Matrix by AlgoCados is a sophisticated trading tool that integrates the principles of the Interbank Price Delivery Algorithm (IPDA), as taught by The Inner Circle Trader (ICT). This indicator is meticulously designed to support traders in identifying key institutional levels and liquidity zones, enhancing their trading strategies with data-driven insights. Suitable for both day traders and swing traders, the tool is optimized for high-frequency and positional trading, providing a robust framework for analyzing market dynamics across multiple time horizons.
# Key Features
Multi-Time Frame Analysis
High Time Frame (HTF) Levels : The indicator tracks critical trading levels over multiple days, specifically at 20, 40, and 60-day intervals. This functionality is essential for identifying long-term trends and significant support and resistance levels that aid in strategic decision-making for swing traders and positional traders.
Low Time Frame (LTF) Levels : It monitors price movements within 20, 40, and 60-hour intervals on lower time frames. This granularity provides a detailed view of intraday price actions, which is crucial for scalping and short-term trading strategies favored by day traders.
Daily Open Integration : The indicator includes the daily opening price, providing a crucial reference point that reflects the market's initial sentiment. This feature helps traders assess the market's direction and volatility, enabling them to make informed decisions based on the day's early movements, which is particularly useful for day trading strategies.
IPDA Reference Points : By leveraging IPDA's 20, 40, and 60-period lookbacks, the tool identifies Key Highs and Lows, which are used by IPDA as Draw On Liquidity. IPDA is an electronic and algorithmic system engineered for achieving price delivery efficiency, as taught by ICT. These reference points serve as benchmarks for understanding institutional trading behavior, allowing traders to align their strategies with the dominant market forces and recognize institutional key levels.
Dynamic Updates and Overlap Management : The indicator is updated daily at the beginning of a new daily candle with the latest market data, ensuring that traders operate with the most current information. It also features intelligent overlap management that prioritizes the most relevant levels based on the timeframe hierarchy, reducing visual clutter and enhancing chart readability.
Comprehensive Customization Options : Traders can tailor the indicator to their specific needs through an extensive input menu. This includes toggles for visibility, line styles, color selections, and label display preferences. These customization options ensure that the tool can adapt to various trading styles and preferences, enhancing user experience and analytical capabilities.
User-Friendly Interface : The tool is designed with a user-friendly interface that includes clear, concise labels for all significant levels. It supports various font families and sizes, making it easier to interpret and act upon the displayed data, ensuring that traders can focus on making informed trading decisions without being overwhelmed by unnecessary information.
# Usage Note
The indicator is segmented into two key functionalities:
LTF Displays : The Low Time Frame (LTF) settings are exclusive to timeframes up to 1 hour, providing detailed analysis for intraday traders. This is crucial for traders who need precise and timely data to make quick decisions within the trading day.
HTF Displays : The High Time Frame (HTF) settings apply to the daily timeframe and any shorter intervals, allowing for comprehensive analysis over extended periods. This is beneficial for swing traders looking to identify broader trends and market directions.
# Inputs and Configurations
BINANCE:BTCUSDT
Offset: Adjustable setting to shift displayed data horizontally for better visibility, allowing traders to view past levels and make informed decisions based on historical data.
Label Styles: Choose between compact or verbose label formats for different levels, offering flexibility in how much detail is displayed on the chart.
Daily Open Line: Customizable line style and color for the daily opening price, providing a clear visual reference for the start of the trading day.
HTF Levels: Configurable high and low lines for HTF with options for style and color customization, allowing traders to highlight significant levels in a way that suits their trading style.
LTF Levels: Similar customization options for LTF levels, ensuring flexibility in how data is presented, making it easier for traders to focus on the most relevant intraday levels.
Text Utils: Settings for font family, size, and text color, allowing for personalized display preferences and ensuring that the chart is both informative and aesthetically pleasing.
# Advanced Features
Overlap Management : The script intelligently handles overlapping levels, particularly where multiple timeframes intersect, by prioritizing the more significant levels and removing redundant ones. This ensures that the charts remain clear and focused on the most critical data points, allowing traders to concentrate on the most relevant market information.
Real-Time Updates : The indicator updates its calculations at the start of each new daily bar, incorporating the latest market data to provide timely and accurate trading signals. This real-time updating is crucial for traders who rely on up-to-date information to execute their strategies effectively and make informed trading decisions.
# Example Use Cases
Scalpers/Day traders: Can utilize the LTF features to make rapid decisions based on hourly market movements, identifying short-term trading opportunities with precision.
Swing Traders: Will benefit from the HTF analysis to identify broader trends and key levels that influence longer-term market movements, enabling them to capture significant market swings.
By providing a clear, detailed view of key market dynamics, the ICT IPDA Liquidity Matrix by AlgoCados empowers traders to make more informed and effective trading decisions, aligning with institutional trading methodologies and enhancing their market understanding.
# Usage Disclaimer
This tool is designed to assist in trading decisions, but it should be used in conjunction with other analysis methods and risk management strategies. Trading involves significant risk, and it is essential to understand the market conditions thoroughly before making trading decisions.
Gaussian Price Filter [BackQuant]Gaussian Price Filter
Overview and History of the Gaussian Transformation
The Gaussian transformation, often associated with the Gaussian (normal) distribution, is a mathematical function characteristically prominent in statistics and probability theory. The bell-shaped curve of the Gaussian function, expressing the normal distribution, is ubiquitously employed in various scientific and engineering disciplines, including financial market analysis. This transformation's core utility in trading and economic forecasting is derived from its efficacy in smoothing data series and highlighting underlying trends, which are pivotal for making strategic trading decisions.
The Gaussian filter, specifically, is a type of data-smoothing algorithm that mitigates the random "noise" of market price data, thus enhancing the visibility of crucial trend changes and patterns. Historically, this concept was adapted from fields such as signal processing and image editing, where precise extraction of useful information from noisy environments is critical.
1. What is a Gaussian Transformation?
A Gaussian transformation involves the application of a Gaussian function to a set of data points. The function is applied as a filter in the context of trading algorithms to smooth time series data, which helps in identifying the intrinsic trends obscured by market volatility. The transformation is characterized by its parameter, sigma (σ), representing the standard deviation, which determines the width of the Gaussian bell curve. The breadth of this curve impacts the degree of smoothing: a wider curve (higher sigma value) results in more smoothing, beneficial for longer-term trend analysis.
2. Filtering Price with Gaussian Transformation and its Benefits
In the provided Script, the Gaussian transformation is utilized to filter price data. The filtering process involves convolving the price data with Gaussian weights, which are calculated based on the chosen length (the number of data points considered) and sigma. This convolution process smooths out short-term fluctuations and highlights longer-term movements, facilitating a clearer analysis of market trends.
Benefits:
Reduces noise: It filters out minor price movements and random fluctuations, which are often misleading.
Enhances trend recognition: By smoothing the data, it becomes easier to identify significant trends and reversals.
Improves decision-making: Traders can make more informed decisions by focusing on substantive, smoothed data rather than reacting to random noise.
3. Potential Limitations and Issues
While Gaussian filters are highly effective in smoothing data, they are not without limitations:
Lag introduction: Like all moving averages, the Gaussian filter introduces a lag between the actual price movements and the output signal, which can delay decision-making.
Feature blurring: Over-smoothing might obscure significant price movements, especially if a large sigma is used.
Parameter sensitivity: The choice of length and sigma significantly affects the output, requiring optimization and backtesting to determine the best settings for specific market conditions.
4. Extending Gaussian Filters to Other Indicators
The methodology used to filter price data with a Gaussian filter can similarly be applied to other technical indicators, such as RSI (Relative Strength Index) or MACD (Moving Average Convergence Divergence). By smoothing these indicators, traders can reduce false signals and enhance the reliability of the indicators' outputs, leading to potentially more accurate signals and better timing for entering or exiting trades.
5. Application in Trading
In trading, the Gaussian Price Filter can be strategically used to:
Spot trend reversals: Smoothed price data can more clearly indicate when a trend is starting to change, which is crucial for catching reversals early.
Define entry and exit points: The filtered data points can help in setting more precise entry and exit thresholds, minimizing the risk and maximizing the potential return.
Filter other data streams: Apply the Gaussian filter on volume or open interest data to identify significant changes in market dynamics.
6. Functionality of the Script
The script is designed to:
Calculate Gaussian weights (f_gaussianWeights function): Generates the weights used for the Gaussian kernel based on the provided length and sigma.
Apply the Gaussian filter (f_applyGaussianFilter function): Uses the weights to compute the smoothed price data.
Conditional Trend Detection and Coloring: Determines the trend direction based on the filtered price and colors the price bars on the chart to visually represent the trend.
7. Specific Actions of This Code
The Pine Script provided by BackQuant executes several specific actions:
Input Handling: It allows users to specify the source data (src), kernel length, and sigma directly in the chart settings.
Weight Calculation and Normalization: Computes the Gaussian weights and normalizes them to ensure their sum equals one, which maintains the original data scale.
Filter Application: Applies the normalized Gaussian kernel to the price data to produce a smoothed output.
Trend Identification and Visualization: Identifies whether the market is trending upwards or downwards based on the smoothed data and colors the bars green (up) or red (down) to indicate the trend direction.
Momentum Ghost Machine [ChartPrime]Momentum Ghost Machine (ChartPrime) is designed to be the next generation in momentum/rate of change analysis. This indicator utilizes the properties of one of our favorite filters to create a more accurate and stable momentum oscillator by using a high quality filtered delayed signal to do the momentum comparison.
Traditional momentum/roc uses the raw price data to compare current price to previous price to generate a directional oscillator. This leaves the oscillator prone to false readings and noisy outputs that leave traders unsure of the real likelihood of a future movement. One way to mitigate this issue would be to use some sort of moving average. Unfortunately, this can only go so far because simple moving average algorithms result in a poor reconstruction of the actual shape of the underlying signal.
The windowed sinc low pass filter is a linear phase filter, meaning that it doesn't change the shape or size of the original signal when applied. This results in a faithful reconstruction of the original signal, but without the "high frequency noise". Just like any filter, the process of applying it requires that we have "future" samples resulting in a time delay for real time applications. Fortunately this is a great thing in the context of a momentum oscillator because we need some representation of past price data to compare the current price data to. By using an ideal low pass filter to generate this delayed signal we can super charge the momentum oscillator and fix the majority of issues its predecessors had.
This indicator has a few extra features that other momentum/roc indicators dont have. One major yet simple improvement is the inclusion of a moving average to help gauge the rate of change of this indicator. Since we included a moving average, we thought it would only be appropriate to add a histogram to help visualize the relationship between the signal and its average. To go further with this we have also included linear extrapolation to further help you predict the momentum and direction of this oscillator. Included with this extrapolation we have also added the histogram in the extrapolation to further enhance its visual interpretation. Finally, the inclusion of a candle coloring feature really drives how the utility of the Momentum Machine .
There are three distinct options when using the candle coloring feature: Direct, MA, and Both. With direct the candles will be colored based on the indicators direction and polarity. When it is above zero and moving up, it displays a green color. When it is above zero and moving down it will display a light green color. Conversely, when the indicator is below zero and moving down it displays a red color, and when it it moving up and below zero it will display a light red color. MA coloring will color the candles just like a MACD. If the signal is above its MA and moving up it will display a green color, and when it is above its MA and moving down it will display a light green color.
When the signal is below its MA and moving down it will display a red color, and when its below its ma and moving up it will display a light red color. Both combines the two into a single color scheme providing you with the best of both worlds. If the indicator is above zero it will display the MA colors with a slight twist. When the indicator is moving down and is below its MA it will display a lighter color than before, and when it is below zero and is above its MA it will display a darker color color.
Length of 50 with a smoothing of 100
Length of 50 with a smoothing of 25
By default, the indicator is set to a momentum length of 50, with a post smoothing of 2. We have chosen the longer period for the momentum length to highlight the performance of this indicator compared to its ancestors. A major point to consider with this indicator is that you can only achieve so much smoothing for a chosen delay. This is because more data is required to produce a smoother signal at a specified length. Once you have selected your desired momentum length you can then select your desired momentum smoothing . This is made possible by the use of the windowed sinc low pass algorithm because it includes a frequency cutoff argument. This means that you can have as little or as much smoothing as you please without impacting the period of the indicator. In the provided examples above this paragraph is a visual representation of what is going on under the hood of this indicator. The blue line is the filtered signal being compared to the current closing price. As you can see, the filtered signal is very smooth and accurately represents the underlying price action without noise.
We hope that users can find the same utility as we did in this indicator and that it levels up your analysis utilizing the momentum oscillator or rate of change.
Enjoy
Kalman Price Filter [BackQuant]Kalman Price Filter
The Kalman Filter, named after Rudolf E. Kálmán, is a algorithm used for estimating the state of a linear dynamic system from a series of noisy measurements. Originally developed for aerospace applications in the early 1960s, such as guiding Apollo spacecraft to the moon, it has since been applied across numerous fields including robotics, economics, and, notably, financial markets. Its ability to efficiently process noisy data in real-time and adapt to new measurements has made it a valuable tool in these areas.
Use Cases in Financial Markets
1. Trend Identification:
The Kalman Filter can smooth out market price data, helping to identify the underlying trend amidst the noise. This is particularly useful in algorithmic trading, where identifying the direction and strength of a trend can inform trade entry and exit decisions.
2. Market Prediction:
While no filter can predict the future with certainty, the Kalman Filter can be used to forecast short-term market movements based on current and historical data. It does this by estimating the current state of the market (e.g., the "true" price) and projecting it forward under certain model assumptions.
3. Risk Management:
The Kalman Filter's ability to estimate the volatility (or noise) of the market can be used for risk management. By dynamically adjusting to changes in market conditions, it can help traders adjust their position sizes and stop-loss orders to better manage risk.
4. Pair Trading and Arbitrage:
In pair trading, where the goal is to capitalize on the price difference between two correlated securities, the Kalman Filter can be used to estimate the spread between the pair and identify when the spread deviates significantly from its historical average, indicating a trading opportunity.
5. Optimal Asset Allocation:
The filter can also be applied in portfolio management to dynamically adjust the weights of different assets in a portfolio based on their estimated risks and returns, optimizing the portfolio's performance over time.
Advantages in Financial Applications
Adaptability: The Kalman Filter continuously updates its estimates with each new data point, making it well-suited to markets that are constantly changing.
Efficiency: It processes data and updates estimates in real-time, which is crucial for high-frequency trading strategies.
Handling Noise: Its ability to distinguish between the signal (e.g., the true price trend) and noise (e.g., random fluctuations) is particularly valuable in financial markets, where price data can be highly volatile.
Challenges and Considerations
Model Assumptions: The effectiveness of the Kalman Filter in financial applications depends on the accuracy of the model used to describe market dynamics. Financial markets are complex and influenced by numerous factors, making model selection critical.
Parameter Sensitivity: The filter's performance can be sensitive to the choice of parameters, such as the process and measurement noise values. These need to be carefully selected and potentially adjusted over time.
Despite these challenges, the Kalman Filter remains a potent tool in the quantitative trader's arsenal, offering a sophisticated method to extract useful information from noisy financial data. Its use in trading strategies should, however, be complemented with sound risk management practices and an awareness of the limitations inherent in any model-based approach to trading.
Breaker Blocks Screener | Flux Charts💎 GENERAL OVERVIEW
Introducing our new Breaker Blocks Screener! This screener can provide information about the latest breaker blocks in up to 5 tickers. You can also customize the algorithm that finds the breaker blocks and the styling of the screener.
Features of the new Breaker Blocks Screener :
Find Latest Breaker Blocks Accross 5 Tickers
Latest Status, Restests & Volume
Customizable Algoritm / Styling
📌 HOW DOES IT WORK ?
Breaker blocks form when an order block fails, or "breaks". It is often associated with market going in the opposite direction of the broken order block, and they can be spotted by following order blocks and finding the point they get broken, ie. price goes below a bullish order block.
The volume of a breaker block is simply the total volume of the bar that the original order block is broken. Often the higher the breaking bar's volume, the stronger the breaker block is.
This screener then finds breaker blocks accross 5 different tickers, and shows the latest information about them.
Status ->
Far -> The current price is far away from the breaker block.
Approaching ⬆️/⬇️ -> The current price is approaching the breaker block, and the direction it's approaching from.
Inside -> The price is currently inside the breaker block.
Retests -> Retest means the price to invalidate the breaker block, but failed to do so. Here you can see how many times the price retested the breaker block.
For the volume, check the top of the "How Does It Work" section.
🚩UNIQUENESS
This screener can detect latest breaker blocks and give information about them for up to 5 tickers. This saves the user time by showing them all in a dashboard at the same time. The screener shows the number of the retests of the breaker block as an unique trait. Another unique ability of the screener is that it shows the latest valid breaker block's volume in the dashboard.
⚙️SETTINGS
1. Tickers
You can set up to 5 tickers for the screener to scan breaker blocks here. You can also enable / disable them and set their individual timeframes.
2. General Configuration
Zone Invalidations -> Select between Wick & Close price for Order & Breaker Block Invalidation.
Swing Length -> Swing length is used when finding order block formations. Smaller values will result in finding smaller order blocks.
Liquidity Grab Screener | Flux Charts💎 GENERAL OVERVIEW
Introducing our new Liquidity Grab Screener! This screener can provide information about the latest liquidity grabs in up to 5 tickers. You can also customize the algorithm that finds the liquidity grabs and the styling of the screener.
Features of the new Liquidity Grab Screener :
Find Latest Liquidity Grabs Accross 5 Tickers
Price, Size, Status Information
Customizable Algoritm / Styling
📌 HOW DOES IT WORK ?
Liquidity grabs occur when one of the latest pivots has a false breakout. Then, if the wick to body ratio of the bar is higher than 0.5 (can be changed from the settings) a bubble is plotted.
The bubble size is determined by the wick to body ratio of the candle.
This screener then finds liquidity grabs accross 5 different tickers, and shows the latest information about them.
Price -> The price when the liquidity grab happened.
Size -> Size of the liquidity grab, determined by the wick-body ratio.
Status -> Shows the elapsed time of the liquidity grab.
🚩UNIQUENESS
Liquidity grabs can be useful when determining candles that have executed a lot of market orders, and planning your trades accordingly. This screener will find liquidity grabs from up to 5 tickers and give information about their price, size and status. The screener also lets you customize the pivot length and the wick-body ratio for liquidity grabs.
⚙️SETTINGS
1. Tickers
You can set up to 5 tickers for the screener to scan order blocks here. You can also enable / disable them and set their individual timeframes.
2. General Configuration
Pivot Length -> This setting determines the range of the pivots. This means a candle has to have the highest / lowest wick of the previous X bars and the next X bars to become a high / low pivot.
Wick-Body Ratio -> After a pivot has a false breakout, the wick-body ratio of the latest candle is tested. The resulting ratio must be higher than this setting for it to be considered as a liquidity grab.
Exponentially Weighted Moving Average Oscillator [BackQuant]Exponentially Weighted Moving Average (EWMA)
The Exponentially Weighted Moving Average (EWMA) is a quantitative or statistical measure used to model or describe a time series. The EWMA is widely used in finance, the main applications being technical analysis and volatility modeling.
The moving average is designed as such that older observations are given lower weights. The weights fall exponentially as the data point gets older – hence the name exponentially weighted.
Applications of the EWMA
The EWMA is widely used in technical analysis. It may not be used directly, but it is used in conjunction with other indicators to generate trading signals. A well-known example is the Negative Volume Index (NVI), which is used in conjunction with its EWMA.
Why is it different from the In-Built TradingView EWMA
Adaptive Algorithms: If your strategy requires the alpha parameter to change adaptively based on certain conditions (for example, based on market volatility), a for loop can be used to adjust the weights dynamically within the loop as opposed to the fixed decay rate in the standard EWMA.
Customization: A for loop allows for more complex and nuanced calculations that may not be directly supported by built-in functions. For example, you might want to adjust the weights in a non-standard way that the typical EWMA calculation doesn't allow for.
Use of the Oscillator
This mainly comes from 3 main premises, this is something I like to do personally since it is easier to work with them in the context of my system. E.g. Using them to spot clear trends without noise on longer timeframes.
Clarity: Plotting the EWMA as an oscillator provides a clear visual representation of the momentum or trend strength. It allows traders to see overbought or oversold conditions relative to a normalized range.
Comparison: An oscillator can make it easier to compare different securities or timeframes on a similar scale, especially when normalized. This is because the oscillator values are typically bounded within a range (like -1 to 1 or 0 to 100), whereas the actual price series can vary significantly.
Focus on Change: When plotted as an oscillator, the focus is on the rate of change or the relative movement of the EWMA, not on the absolute price levels. This can help traders spot divergences or convergences that may not be as apparent when the EWMA is plotted directly on the price chart. This is also one reason there is a conditional plotting on the chart.
Trend Strength: When normalized, the distance of the oscillator from its midpoint can be interpreted as the strength of the trend, providing a quantitative measure that can be used to make systematic trading decisions.
Here are the backtests on the 1D Timeframe for
BITSTAMP:BTCUSD
BITSTAMP:ETHUSD
COINBASE:SOLUSD
When using this script the user is able to define a source and period, which by extension calculates the alpha. An option to colour the bars accord to trend.
This makes it super easy to use in a system.
I recommend using this as above the midline (0) for a positive trend and below the midline for negative trend.
Hence why I put a label on the last bar to ensure it is easier for traders to read.
Lastly, The decreasing colour relative to RoC, this also helps traders to understand the strength of the indicator and gain insight into when to potentially reduce position size.
This indicator is best used in the medium timeframe.
Order Blocks Screener | Flux Charts💎 GENERAL OVERVIEW
Introducing our new Order Blocks Screener! This screener can provide information about the latest order blocks in up to 5 tickers. You can also customize the algorithm that finds the order blocks and the styling of the screener.
Features of the new Order Blocks Screener :
Find Latest Order Blocks Accross 5 Tickers
Latest Status, Restests, Bullish & Bearish Volume
Customizable Algoritm / Styling
📌 HOW DOES IT WORK ?
Order blocks occur when there is a high amount of market orders exist on a price range. It is possible to find order blocks using specific formations on the chart.
The high & low volume of order blocks should be taken into consideration while determining their strengths. The determination of the high & low volume of order blocks are similar to FVGs, in a bullish order block, the high volume is the last 2 bars' total volume, while the low volume is the oldest bar's volume. In a bearish order block scenerio, the low volume becomes the last 2 bars' total volume.
This screener then finds order blocks accross 5 different tickers, and shows the latest information about them.
Status ->
Far -> The current price is far away from the order block.
Approaching ⬆️/⬇️ -> The current price is approaching the order block, and the direction it's approaching from.
Inside -> The price is currently inside the order block.
Retests -> Retest means the price to invalidate the order block, but failed to do so. Here you can see how many times the price retested the order block.
For the bullish / bearish volume, check the "How Does It Work" section.
🚩UNIQUENESS
This screener can detect latest order blocks and give information about them for up to 5 tickers. This saves the user time by showing them all in a dashboard at the same time. The screener shows the number of the retests of the order block as an unique trait. Another unique ability of the screener is that it shows the latest valid order block's bullish and bearish volume in the dashboard.
⚙️SETTINGS
1. Tickers
You can set up to 5 tickers for the screener to scan order blocks here. You can also enable / disable them and set their individual timeframes.
2. General Configuration
Zone Invalidation -> Select between Wick & Close price for Order Block Invalidation.
Swing Length -> Swing length is used when finding order block formations. Smaller values will result in finding smaller order blocks.
Squeeze Momentum DeluxeThe Squeeze Momentum Deluxe is a comprehensive trading toolkit built with features of momentum, volatility, and price action. This script offers a suite for both mean reversion and trend-following analysis. Developed based on the original TTM Squeeze implementation by @LazyBear, this indicator introduces several innovative components to enhance your trading insights.
🔲 Components and Features
Momentum Oscillator - as rooted in the TTM Squeeze, quantifies the relationship between price and its extremes over a defined period. By normalizing the calculation, the values become comparable throughout time and across securities, allowing for a nuanced assessment of Bullish and Bearish momentum. Furthermore, by presenting it as a ribbon with a signal line we gain additional information about the direction of price swings.
Squeeze Bars - The original squeeze concept is based on the relationship between the Bollinger Bands and Keltner Channel , once the BB resides inside the KC a squeeze occurs. By understanding their fundamentals a new form of calculation can be inferred.
method bb(float src, simple int len, simple float mult) => method kc(float src, simple int len, simple float mult) =>
float basis = ta.sma (src, len) float basis = ta.sma (src, len)
float dev = ta.stdev(src, len) float rng = ta.atr ( len)
float upper = basis + dev * mult float upper = basis + rng * mult
float lower = basis - dev * mult float lower = basis - rng * mult
Both BB and KC are constructed upon a moving average with the addition of Standard Deviation and Average True Range respectively. Therefore, the calculation can be transformed to when the Stdev is lower than the ATR a squeeze occurs.
method sqz(float src, simple int len) =>
float dev = ta.stdev(src, len)
float atr = ta.atr ( len)
dev < atr ? true : false
This indicator uses three different thresholds for the ATR to gain three levels of price "Squeeze" for further analysis.
Directional Flux- This component measures the overall direction of price volatility, offering insights into trend sentiment. Presented as waves in the background, it includes an OverFlux feature to signal extreme market bias in a particular direction which can signal either exhaustion or vital continuation. Additionally, the user can choose if to base the calculation on Heikin-Ashi Candles to bias the tool toward trend assessment.
Confluence Gauges - Placed at the top and bottom of the indicator, these gauges measure confluence in the relationship between the Momentum Oscillator and Directional Flux. They provide traders with an easily interpretable visual aid for detecting market sentiment. Reversal doritos displayed alongside them contribute to mean reversion analysis.
Divergences (Real-Time) - Equipped with a custom algorithm, the indicator detects real-time divergences between price and the oscillator. This dynamic feature enhances your ability to spot potential trend reversals as they occur.
🔲 Settings
Directional Flux Length - Adjusts the period of which the background volatility waves operate on.
Trend Bias - Bases the calculation of the Flux to HA candles to bias its behavior toward the trend of price action.
Squeeze Momentum Length - Calibrates the length of the main oscillator ribbon as well as the period for the squeeze algorithm.
Signal - Controls the width of the ribbon. Lower values result in faster responsiveness at the cost of premature positives.
Divergence Sensitivity - Adjusts a threshold to limit the amount of divergences detected based on strength. Higher values result in less detections, stronger structure.
🔲 Alerts
Sell Signal
Buy Signal
Bullish Momentum
Bearish Momentum
Bullish Flux
Bearish Flux
Bullish Swing
Bearish Swing
Strong Bull Gauge
Strong Bear Gauge
Weak Bull Gauge
Weak Bear Gauge
High Squeeze
Normal Squeeze
Low Squeeze
Bullish Divergence
Bearish Divergence
As well as the option to trigger 'any alert' call.
The Squeeze Momentum Deluxe is a comprehensive tool that goes beyond traditional momentum indicators, offering a rich set of features to elevate your trading strategy. I recommend using toolkit alongside other indicators to have a wide variety of confluence to therefore gain higher probabilistic and better informed decisions.