Normal Price Indicator by KirillPOHEnglish:
Normal Price Indicator is a technical indicator designed to analyze market prices and find normal price levels, as well as the upper and lower boundaries of the normal price area for a given period of time. The indicator is designed for traders and analysts who want to track price movements and identify potential levels for buying or selling based on statistical calculations.
This indicator calculates three main lines:
- The Normal price (Median Price) — the line showing the median of prices for the selected period.
- Upper Bound — a line located at a certain distance from the normal price, based on the standard deviation.
- Lower Bound — a line also located based on the standard deviation from the normal price.
In addition, the indicator can highlight areas on the chart when the price goes beyond these boundaries, which can be a signal to traders about possible important levels.
Main Features:
- Normal price: It is calculated as the median of prices for a given period of time, which helps to track the typical price value on the chart.
- Upper and lower bounds: These limits are calculated as the average price ± (multiplier * standard deviation), which allows you to take into account market fluctuations and set a price range in which the price is considered "normal".
- Adaptation to the scale of the graph: The lines of the indicator adjust correctly to changes in the scale of the chart, while maintaining a link to price levels. They are always displayed in the current position, no matter how much you increase or decrease the graph.
- Zone allocation: The indicator also allows you to highlight areas on the chart where the price is above the upper limit or below the lower limit, which may signal unusual market conditions.
How to use the indicator:
1. The normal price (Median Price): This is the main line of the indicator, which shows the central price level on the chart for the selected period. It helps traders keep track of the standard market level and determine if the current price is within that range.
2. Upper and lower borders: These lines are used to identify potential deviations from the normal price zone. If the closing price turns out to be above the upper limit or below the lower one, this may indicate strong market movements or potential reversals. For example:
- The price above the upper limit may signal a strong bullish trend.
- The price below the lower limit may indicate a bearish trend or a strong correction.
3. Areas on the graph: The indicator highlights the background when the price is above the upper limit (the area is colored green) or below the lower limit (the area is colored red). These visual cues can help traders quickly identify deviations.
Settings :
- Period: The period for calculating the median, standard deviation, and upper/lower bounds. It is usually set to 14, but can be changed depending on the user's needs.
is the multiplier for the standard deviation: This parameter allows you to adjust how much the upper and lower limits will deviate from the normal price. The standard value is 2, which corresponds to two standard deviations, but can be adjusted to suit your needs.
Application:
Traders can use the indicator to analyze market levels and make decisions about entering or exiting the market. Analysts can use the indicator to identify normal price ranges and deviations, which allows them to more accurately predict market trends and potential pivot points.
This indicator is not a signal for trading, but rather a tool for analyzing the market and price levels. It should be used in combination with other indicators and analysis methods for more accurate trading decisions.
Russia:
Normal Price Indicator — это технический индикатор, предназначенный для анализа рыночных цен и нахождения нормальных ценовых уровней, а также верхних и нижних границ нормальной ценовой области за заданный период времени. Индикатор предназначен для трейдеров и аналитиков, которые хотят отслеживать ценовые движения и выявлять потенциальные уровни для покупки или продажи, основываясь на статистических расчетах.
Этот индикатор рассчитывает три основные линии:
- Нормальная цена (Median Price) — линия, отображающая медиану цен за выбранный период.
- Верхняя граница (Upper Bound) — линия, находящаяся на определённом расстоянии от нормальной цены, основанная на стандартном отклонении.
- Нижняя граница (Lower Bound) — линия, также расположенная на основе стандартного отклонения от нормальной цены.
Кроме того, индикатор может выделять области на графике, когда цена выходит за пределы этих границ, что может быть сигналом для трейдеров о возможных важных уровнях.
Основные особенности:
- Нормальная цена: Вычисляется как медиана цен за заданный период времени, что помогает отследить типичное значение цены на графике.
- Верхняя и нижняя границы: Эти границы рассчитываются как средняя цена ± (множитель * стандартное отклонение), что позволяет учитывать рыночные колебания и задавать диапазон цен, в котором цена считается "нормальной".
- Адаптация под масштаб графика: Линии индикатора корректно подстраиваются под изменения масштаба графика, сохраняя привязку к уровням цен. Они всегда отображаются в актуальном положении, независимо от того, насколько вы увеличиваете или уменьшаете график.
- Выделение зон: Индикатор также позволяет выделять области на графике, где цена находится выше верхней границы или ниже нижней границы, что может сигнализировать о необычных рыночных условиях.
Как использовать индикатор:
1. Нормальная цена (Median Price): Это основная линия индикатора, которая показывает центральный уровень цен на графике за выбранный период. Она помогает трейдерам отслеживать стандартный рыночный уровень и определять, находится ли текущая цена в пределах этого диапазона.
2. Верхняя и нижняя границы: Эти линии используются для выявления потенциальных отклонений от нормальной ценовой зоны. Если цена закрытия оказывается выше верхней границы или ниже нижней, это может свидетельствовать о сильных движениях на рынке или потенциальных разворотах. Например:
- Цена выше верхней границы может сигнализировать о сильном бычьем тренде.
- Цена ниже нижней границы может указывать на медвежий тренд или сильную коррекцию.
3. Области на графике: Индикатор выделяет фон, когда цена находится выше верхней границы (область окрашивается в зелёный) или ниже нижней границы (область окрашивается в красный). Эти визуальные подсказки могут помочь трейдерам быстро выявить отклонения.
Параметры настройки :
- Период: Период для расчета медианы, стандартного отклонения и верхних/нижних границ. Обычно устанавливается на 14, но может быть изменён в зависимости от потребностей пользователя.
- Множитель для стандартного отклонения: Этот параметр позволяет настроить, насколько сильно будут отступать верхняя и нижняя границы от нормальной цены. Стандартное значение — 2, что соответствует двум стандартным отклонениям, но можно настроить под свои нужды.
Применение:
Трейдеры могут использовать индикатор для анализа рыночных уровней и принятия решений о входе или выходе на рынок. Аналитики могут использовать индикатор для выявления нормальных диапазонов цен и отклонений, что позволяет более точно прогнозировать рыночные тренды и потенциальные точки разворота.
Этот индикатор не является сигналом для торговли, а скорее инструментом для анализа рынка и ценовых уровней. Его стоит использовать в комплексе с другими индикаторами и методами анализа для более точных торговых решений.
Standarddeviations
RawCuts_01Library "RawCuts_01"
A collection of functions by:
mutantdog
The majority of these are used within published projects, some useful variants have been included here aswell.
This is volume one consisting mainly of smaller functions, predominantly the filters and standard deviations from Weight Gain 4000.
Also included at the bottom are various snippets of related code for demonstration. These can be copied and adjusted according to your needs.
A full up-to-date table of contents is located at the top of the main script.
WEIGHT GAIN FILTERS
A collection of moving average type filters with adjustable volume weighting.
Based upon the two most common methods of volume weighting.
'Simple' uses the standard method in which a basic VWMA is analogous to SMA.
'Elastic' uses exponential method found in EVWMA which is analogous to RMA.
Volume weighting is applied according to an exponent multiplier of input volume.
0 >> volume^0 (unweighted), 1 >> volume^1 (fully weighted), use float values for intermediate weighting.
Additional volume filter switch for smoothing of outlier events.
DIVA MODULAR DEVIATIONS
A small collection of standard and absolute deviations.
Includes the weightgain functionality as above.
Basic modular functionality for more creative uses.
Optional input (ct) for external central tendency (aka: estimator).
Can be assigned to alternative filter or any float value. Will default to internal filter when no ct input is received.
Some other useful or related functions included at the bottom along with basic demonstration use.
weightgain_sma(src, len, xVol, fVol)
Simple Moving Average (SMA): Weight Gain (Simple Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
Returns: Standard Simple Moving Average with Simple Weight Gain applied.
weightgain_hsma(src, len, xVol, fVol)
Harmonic Simple Moving Average (hSMA): Weight Gain (Simple Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
Returns: Harmonic Simple Moving Average with Simple Weight Gain applied.
weightgain_gsma(src, len, xVol, fVol)
Geometric Simple Moving Average (gSMA): Weight Gain (Simple Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
Returns: Geometric Simple Moving Average with Simple Weight Gain applied.
weightgain_wma(src, len, xVol, fVol)
Linear Weighted Moving Average (WMA): Weight Gain (Simple Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
Returns: Basic Linear Weighted Moving Average with Simple Weight Gain applied.
weightgain_hma(src, len, xVol, fVol)
Hull Moving Average (HMA): Weight Gain (Simple Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
Returns: Basic Hull Moving Average with Simple Weight Gain applied.
diva_sd_sma(src, len, xVol, fVol, ct)
Standard Deviation (SD SMA): Diva / Weight Gain (Simple Volume)
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
ct (float) : Central tendency (optional, na = bypass). Internal: weightgain_sma().
Returns:
diva_sd_wma(src, len, xVol, fVol, ct)
Standard Deviation (SD WMA): Diva / Weight Gain (Simple Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
ct (float) : Central tendency (optional, na = bypass). Internal: weightgain_wma().
Returns:
diva_aad_sma(src, len, xVol, fVol, ct)
Average Absolute Deviation (AAD SMA): Diva / Weight Gain (Simple Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
ct (float) : Central tendency (optional, na = bypass). Internal: weightgain_sma().
Returns:
diva_aad_wma(src, len, xVol, fVol, ct)
Average Absolute Deviation (AAD WMA): Diva / Weight Gain (Simple Volume) .
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
ct (float) : Central tendency (optional, na = bypass). Internal: weightgain_wma().
Returns:
weightgain_ema(src, len, xVol, fVol)
Exponential Moving Average (EMA): Weight Gain (Elastic Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
Returns: Exponential Moving Average with Elastic Weight Gain applied.
weightgain_dema(src, len, xVol, fVol)
Double Exponential Moving Average (DEMA): Weight Gain (Elastic Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
Returns: Double Exponential Moving Average with Elastic Weight Gain applied.
weightgain_tema(src, len, xVol, fVol)
Triple Exponential Moving Average (TEMA): Weight Gain (Elastic Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
Returns: Triple Exponential Moving Average with Elastic Weight Gain applied.
weightgain_rma(src, len, xVol, fVol)
Rolling Moving Average (RMA): Weight Gain (Elastic Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
Returns: Rolling Moving Average with Elastic Weight Gain applied.
weightgain_drma(src, len, xVol, fVol)
Double Rolling Moving Average (DRMA): Weight Gain (Elastic Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
Returns: Double Rolling Moving Average with Elastic Weight Gain applied.
weightgain_trma(src, len, xVol, fVol)
Triple Rolling Moving Average (TRMA): Weight Gain (Elastic Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
Returns: Triple Rolling Moving Average with Elastic Weight Gain applied.
diva_sd_ema(src, len, xVol, fVol, ct)
Standard Deviation (SD EMA): Diva / Weight Gain: (Elastic Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
ct (float) : Central tendency (optional, na = bypass). Internal: weightgain_ema().
Returns:
diva_sd_rma(src, len, xVol, fVol, ct)
Standard Deviation (SD RMA): Diva / Weight Gain: (Elastic Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
ct (float) : Central tendency (optional, na = bypass). Internal: weightgain_rma().
Returns:
weightgain_vidya_rma(src, len, xVol, fVol)
VIDYA v1 RMA base (VIDYA-RMA): Weight Gain (Elastic Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
Returns: VIDYA v1, RMA base with Elastic Weight Gain applied.
weightgain_vidya_ema(src, len, xVol, fVol)
VIDYA v1 EMA base (VIDYA-EMA): Weight Gain (Elastic Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
Returns: VIDYA v1, EMA base with Elastic Weight Gain applied.
diva_sd_vidya_rma(src, len, xVol, fVol, ct)
Standard Deviation (SD VIDYA-RMA): Diva / Weight Gain: (Elastic Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
ct (float) : Central tendency (optional, na = bypass). Internal: weightgain_vidya_rma().
Returns:
diva_sd_vidya_ema(src, len, xVol, fVol, ct)
Standard Deviation (SD VIDYA-EMA): Diva / Weight Gain: (Elastic Volume).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
xVol (float) : Volume exponent multiplier (0 = unweighted, 1 = fully weighted).
fVol (bool) : Volume smoothing filter.
ct (float) : Central tendency (optional, na = bypass). Internal: weightgain_vidya_ema().
Returns:
weightgain_sema(src, len, xVol, fVol)
Parameters:
src (float)
len (simple int)
xVol (float)
fVol (bool)
diva_sd_sema(src, len, xVol, fVol)
Parameters:
src (float)
len (simple int)
xVol (float)
fVol (bool)
diva_mad_mm(src, len, ct)
Median Absolute Deviation (MAD MM): Diva (no volume weighting).
Parameters:
src (float) : Source input.
len (int) : Length (number of bars).
ct (float) : Central tendency (optional, na = bypass). Internal: ta.median()
Returns:
source_switch(slct, aux1, aux2, aux3, aux4)
Custom Source Selector/Switch function. Features standard & custom 'weighted' sources with additional aux inputs.
Parameters:
slct (string) : Choose from custom set of string values.
aux1 (float) : Additional input for user-defined source, eg: standard input.source(). Optional, use na to bypass.
aux2 (float) : Additional input for user-defined source, eg: standard input.source(). Optional, use na to bypass.
aux3 (float) : Additional input for user-defined source, eg: standard input.source(). Optional, use na to bypass.
aux4 (float) : Additional input for user-defined source, eg: standard input.source(). Optional, use na to bypass.
Returns: Float value, to be used as src input for other functions.
colour_gradient_ma_div(ma1, ma2, div, bull, bear, mid, mult)
Colour Gradient for plot fill between two moving averages etc, with seperate bull/bear and divergence strength.
Parameters:
ma1 (float) : Input for fast moving average (eg: bullish when above ma2).
ma2 (float) : Input for slow moving average (eg: bullish when below ma1).
div (float) : Input deviation/divergence value used to calculate strength of colour.
bull (color) : Colour when ma1 above ma2.
bear (color) : Colour when ma1 below ma2.
mid (color) : Neutral colour when ma1 = ma2.
mult (int) : Opacity multiplier. 100 = maximum, 0 = transparent.
Returns: Colour with transparency (according to specified inputs)
Buy Sell Strategy With Z-Score [TradeDots]The "Buy Sell Strategy With Z-Score" is a trading strategy that harnesses Z-Score statistical metrics to identify potential pricing reversals, for opportunistic buying and selling opportunities.
HOW DOES IT WORK
The strategy operates by calculating the Z-Score of the closing price for each candlestick. This allows us to evaluate how significantly the current price deviates from its typical volatility level.
The strategy first takes the scope of a rolling window, adjusted to the user's preference. This window is used to compute both the standard deviation and mean value. With these values, the strategic model finalizes the Z-Score. This determination is accomplished by subtracting the mean from the closing price and dividing the resulting value by the standard deviation.
This approach provides an estimation of the price's departure from its traditional trajectory, thereby identifying market conditions conducive to an asset being overpriced or underpriced.
APPLICATION
Firstly, it is better to identify a stable trading pair for this technique, such as two stocks with considerable correlation. This is to ensure conformance with the statistical model's assumption of a normal Gaussian distribution model. The ideal performance is theoretically situated within a sideways market devoid of skewness.
Following pair selection, the user should refine the span of the rolling window. A broader window smoothens the mean, more accurately capturing long-term market trends, while potentially enhancing volatility. This refinement results in fewer, yet precise trading signals.
Finally, the user must settle on an optimal Z-Score threshold, which essentially dictates the timing for buy/sell actions when the Z-Score exceeds with thresholds. A positive threshold signifies the price veering away from its mean, triggering a sell signal. Conversely, a negative threshold denotes the price falling below its mean, illustrating an underpriced condition that prompts a buy signal.
Within a normal distribution, a Z-Score of 1 records about 68% of occurrences centered at the mean, while a Z-Score of 2 captures approximately 95% of occurrences.
The 'cool down period' is essentially the number of bars that await before the next signal generation. This feature is employed to dodge the occurrence of multiple signals in a short period.
DEFAULT SETUP
The following is the default setup on EURUSD 1h timeframe
Rolling Window: 80
Z-Score Threshold: 2.8
Signal Cool Down Period: 5
Commission: 0.03%
Initial Capital: $10,000
Equity per Trade: 30%
RISK DISCLAIMER
Trading entails substantial risk, and most day traders incur losses. All content, tools, scripts, articles, and education provided by TradeDots serve purely informational and educational purposes. Past performances are not definitive predictors of future results.
Rolling VWAP [QuantraSystems]Rolling VWAP
Introduction
The Rolling VWAP (R͜͡oll-VWAP) indicator modernizes the traditional VWAP by recalculating continuously on a rolling window, making it adept at pinpointing market trends and breakout points.
Its dual functionality includes both the dynamic rolling VWAP and a customizable anchored VWAP, enhanced by color-coded visual cues, thereby offering traders valuable flexibility and insight for their market analysis.
Legend
In the Image you can see the BTCUSD 1D Chart with the R͜͡oll-VWAP overlay.
You can see the individually activatable Standard Deviation (SD) Bands and the main VWAP Line.
It also features a Trend Signal which is deactivated by default and can be enabled if required.
Furthermore you can find the coloring of the VWAP line to represent the Trend.
In this case the trend itself is defined as:
Close being greater than the VWAP line -> Uptrend
Close below the VWAP line -> Downtrend
Notes
The R͜͡oll-VWAP can be used in a variety of ways.
Volatility adjusted expected range
This aims to identify in which range the asset is likely to move - according to the historical values the SD Bands are calculated and thus their according probabilities displayed.
Trend analysis
Trending above or below the VWAP shows up or down trends accordingly.
S/R Levels
Based on the probability distribution the 2. SD often works as a Resistance level and either mid line or 1. SD lines can act as S/R levels
Unsustainable levels
Based on the probability distributions a SD level of beyond 2.5, especially 3 and higher is hit very seldom and highly unsustainable.
This can either mean a mean reversion state or a momentum slowdown is necessary to get back to a sustainable level.
Please note that we always advise to find more confluence by additional indicators.
Traders are encouraged to test and determine the most suitable settings for their specific trading strategies and timeframes.
Methodology
The R͜͡oll-VWAP is based on the inbuilt TV VWAP.
It expands upon the limitations of having an anchored timeframe and thus a limited data set that is being reset constantly.
Instead we have integrated a rolling nature that continuously calculates the VWAP over a customizable lookback.
To also keep the base utility it is possible to use the anchored timeframes as well.
Furthermore the visualization has been improved and we added the coloring of the main VWAP line according to the Trend as stated above.
The applicable Trend signals are also part of that.
The parameter settings and also the visualizations allow for ample customizations by the trader.
For questions or recommendations, please feel free to seek contact in the comments.