Standardized Median Proximity [AlgoAlpha]Introducing the Standardized Median Proximity by AlgoAlpha 🚀📊 – a dynamic tool designed to enhance your trading strategy by analyzing price fluctuations relative to the median value. This indicator is built to provide clear visual cues on the price deviation from its median, allowing for a nuanced understanding of market trends and potential reversals.
🔍 Key Features:
1. 📈 Median Tracking: At the core of this indicator is the calculation of the median price over a specified lookback period. By evaluating the current price against this median, the indicator provides a sense of whether the price is trending above or below its recent median value.
medianValue = ta.median(priceSource, lookbackLength)
2. 🌡️ Normalization of Price Deviation: The deviation of the price from the median is normalized using standard deviation, ensuring that the indicator's readings are consistent and comparable across different time frames and instruments.
standardDeviation = ta.stdev(priceDeviation, 45)
normalizedValue = priceDeviation / (standardDeviation + standardDeviation)
3. 📌 Boundary Calculations: The indicator sets upper and lower boundaries based on the normalized values, helping to identify overbought and oversold conditions.
upperBoundary = ta.ema(positiveValues, lookbackLength) + ta.stdev(positiveValues, lookbackLength) * stdDevMultiplier
lowerBoundary = ta.ema(negativeValues, lookbackLength) - ta.stdev(negativeValues, lookbackLength) * stdDevMultiplier
4. 🎨 Visual Appeal and Clarity: With carefully chosen colors, the plots provide an intuitive and clear representation of market states. Rising trends are indicated in a shade of green, while falling trends are shown in red.
5. 🚨 Alert Conditions: Stay ahead of market movements with customizable alerts for trend shifts and impulse signals, enabling timely decisions.
alertcondition(ta.crossover(normalizedValue, 0), "Bullish Trend Shift", "Median Proximity Crossover Zero Line")
🔧 How to Use:
- 🎯 Set your preferred lookback lengths and standard deviation multipliers to tailor the indicator to your trading style.
- 💹 Utilize the boundary plots to understand potential overbought or oversold conditions.
- 📈 Analyze the color-coded column plots for quick insights into the market's direction relative to the median.
- ⏰ Set alerts to notify you of significant trend changes or conditions that match your trading criteria.
Basic Logic Explained:
- The indicator first calculates the median of the selected price source over your chosen lookback period. This median serves as a baseline for measuring price deviation.
- It then standardizes this deviation by dividing it by the standard deviation of the price deviation over a 45-period lookback, creating a normalized value.
- Upper and lower boundaries are computed using the exponential moving average (EMA) and standard deviation of these normalized values, adjusted by your selected multiplier.
- Finally, color-coded plots provide a visual representation of these calculations, offering at-a-glance insights into market conditions.
Remember, while this tool offers valuable insights, it's crucial to use it as part of a comprehensive trading strategy, complemented by other analysis and indicators. Happy trading!
🚀
Medianline
Moving Median Price by Atilla YurtsevenMoving Median Price is similar to Moving Average. However it uses the median instead of the mean. I believe that median is more important than the mean in some cases. Let me explain why:
There are 5 employees in a company. Their annual salary is $24,000,00. There's also a CEO of the company and his annual salary is $100,000.00. So if you calculate the mean to find the average salary using mean, you find $36,666.66. Well, nobody gets paid more than $24K but the CEO. Median helps us here. If you use median, the average salary is $24,000.00.
Keep in mind that you can use the median to find the average salary you pay per employee. You can still use mean for different purposes.
I have also added 2. Median to the script. You can enable or disable.
Disclaimer: I'm not an advisor and this script or the article is not financial advice.
Trade safe,
Atilla Yurtseven
Adaptive Momentum Oscillator(AMO)Here is a new experimental indicator that we've been developing that is focused on gauging momentum.
The indicator fluctuates above and below zero, but instead of using zero as the threshold for differentiating positive and negative momentum, it uses an 89 period median(plotted as the thick white line).
The momentum over the previous 10 periods is then calculated and then smoothed using a 6 period Exponential Moving Average (EMA). This, as well as the choice to use a median as the central divider were done to eliminate the whipsaws that are often generated when making strategies based on pure momentum and crossings above/below 0. The EMA alternates between lime green when it is above the median and pink when it is below. The area between the EMA and median is filled in green when EMA > median and pink when the EMA is less than the median.
Then, a 29 period Simple Moving Average of momentum is calculated. Here, going with a SMA over EMA and a longer window(29) seemed to make sense as it is counteracts the high responsiveness of the EMA. The SMA is green when greater than the median and red when less than the median.
There's two ways to trade using this system. One way would be to go long when the momentum EMA crosses over the white median line and turns lime green, then short when it crosses back under the median line and turns white. Another option is to go long under the same conditions, but short when both the EMA and SMA are above the median and the EMA crosses under the SMA.
Not sure if this exact configuration has already been created by someone, but it'll be interesting to see how it holds up with more backtesting and then running it fully automated.
-Strategy version coming soon-
Highs Lows (with offset) + Median with ATR bandsScript shows Highest and Lowest values (default 10) for given bars back with possible offset on time assis (default 3) with their Median Line + ATR bands around it (no offset here).