McClellan A-D Volume Integration ModelThe strategy integrates the McClellan A-D Oscillator with an adjustment based on the Advance/Decline (A-D) volume data. The McClellan Oscillator is calculated by taking the difference between the short-term and long-term exponential moving averages (EMAs) of the A-D line. This strategy introduces an enhancement where the A-D volume (the difference between the advancing and declining volume) is factored in to adjust the oscillator value.
Inputs:
• ema_short_length: The length for the short-term EMA of the A-D line.
• ema_long_length: The length for the long-term EMA of the A-D line.
• osc_threshold_long: The threshold below which the oscillator must drop for an entry signal to trigger.
• exit_periods: The number of periods after which the position is closed.
• Data Sources:
• ad_advance and ad_decline are the data sources for advancing and declining issues, respectively.
• vol_advance and vol_decline are the volume data for the advancing and declining issues. If volume data is unavailable, it defaults to na (Not Available), and the fallback logic ensures that the strategy continues to function.
McClellan Oscillator with Volume Adjustment:
• The A-D line is calculated by subtracting the declining issues from the advancing issues. Then, the volume difference is applied to this line, creating a “weighted” A-D line.
• The short and long EMAs are calculated for the weighted A-D line to generate the McClellan Oscillator.
Entry Condition:
• The strategy looks for a reversal signal, where the oscillator falls below the threshold and then rises above it again. The condition is designed to trigger a long position when this reversal happens.
Exit Condition:
• The position is closed after a set number of periods (exit_periods) have passed since the entry.
Plotting:
• The McClellan Oscillator and the threshold are plotted on the chart for visual reference.
• Entry and exit signals are highlighted with background colors to make the signals more visible.
Scientific Background:
The McClellan A-D Oscillator is a popular market breadth indicator developed by Sherman and Marian McClellan. It is used to gauge the underlying strength of a market by analyzing the difference between the number of advancing and declining stocks. The oscillator is typically calculated using exponential moving averages (EMAs) of the A-D line, with the idea being that crossovers of these EMAs indicate potential changes in the market’s direction.
The integration of A-D volume into this model adds another layer of analysis, as volume is often considered a leading indicator of price movement. By factoring in volume, the strategy becomes more sensitive to not just the number of advancing or declining stocks but also how significant those movements are based on trading volume, as discussed in Schwager, J. D. (1999). Technical Analysis of the Financial Markets. This enhanced version aims to capture stronger and more sustainable trends in the market, helping to filter out false signals.
Additionally, volume analysis is often used to confirm price movements, as described in Wyckoff, R. (1931). The Day Trading System. Therefore, incorporating the volume of advancing and declining stocks in the McClellan Oscillator offers a more robust signal for trading decisions.
Indicators and strategies
Monthly Performance by YearYıllar boyunca aylık ısı haritası
Tüm zamanların zirveye olan uzaklık
Tablo gösterimlerini kapat - aç
Etiket gösterimini kapat aç
___________________________________________
Monthly heatmap over the years
Distance to all-time peak
Close - open table display
Close label display open
Breakout Master//@version=5
indicator('Breakout Master', overlay=true)
bullishBar = 1
bearishBar = -1
var inside_bar = array.new_int(0)
var inside_bar_high = array.new_float(0)
var inside_bar_low = array.new_float(0)
var motherCandleIndex = 0
var motherCandleHigh = 0.0
var motherCandleLow = 0.0
var motherCandleRange = 0.0
var target1Buy = 0.0
var target2Buy = 0.0
var target1Sell = 0.0
var target2Sell = 0.0
var motherCandleH = line.new(na, na, na, na, extend=extend.right, color=color.green)
var motherCandleL = line.new(na, na, na, na, extend=extend.right, color=color.red)
var motherCandleHLabel = label.new(na, na, style=label.style_label_left, textcolor=color.green, color=color.new(color.green, 80))
var motherCandleLLabel = label.new(na, na, style=label.style_label_left, textcolor=color.red, color=color.new(color.red, 80))
var longT1 = line.new(na, na, na, na, extend=extend.right)
var longT2 = line.new(na, na, na, na, extend=extend.right)
var shortT1 = line.new(na, na, na, na, extend=extend.right)
var shortT2 = line.new(na, na, na, na, extend=extend.right)
var longT1Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var longT2Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var shortT1Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var shortT2Label = label.new(na, na, textcolor=color.blue, style=label.style_label_left, color=color.new(color.blue, 80))
var longT1Line = input.bool(title='Show Long T1', defval=true, group='Long')
var longT2Line = input.bool(title='Show Long T2', defval=true, group='Long')
var shortT1Line = input.bool(title='Show Short T1', defval=true, group='Short')
var shortT2Line = input.bool(title='Show Short T2', defval=true, group='Short')
var longT1Range = input.float(title='Long T1', defval=1, group='Long (x times above range of mother candle)', tooltip='Line will be plotted above high of mother candle. If value entered is 1, then T1 = range of mother candle x 1')
var longT2Range = input.float(title='Long T2', defval=1.5, group='Long (x times above range of mother candle)', tooltip='Line will be plotted above high of mother candle. If value entered is 2, then T2 = range of mother candle x 2')
var shortT1Range = input.float(title='Short T1', defval=1, group='Short (x times below range of mother candle)', tooltip='Line will be plotted below low of mother candle. If value entered is 1, then T1 = range of mother candle x 1')
var shortT2Range = input.float(title='Short T2', defval=1.5, group='Short (x times below range of mother candle)', tooltip='Line will be plotted below low of mother candle. If value entered is 2, then T2 = range of mother candle x 1')
hi = high
lo = low
op = open
cl = close
isInside() =>
previousBar = 1
bodyStatus = cl >= op ? 1 : -1
isInsidePattern = hi < hi and lo > lo
isInsidePattern ? bodyStatus : 0
newDay = ta.change(time('D'))
if newDay
array.clear(inside_bar)
array.clear(inside_bar_high)
array.clear(inside_bar_low)
if isInside() and array.size(inside_bar) <= 0
array.push(inside_bar, bar_index)
array.push(inside_bar_high, hi )
array.push(inside_bar_low, lo )
if barstate.islast and array.size(inside_bar) > 0
motherCandleIndex := array.get(inside_bar, 0) - 1
motherCandleHigh := array.get(inside_bar_high, 0)
motherCandleLow := array.get(inside_bar_low, 0)
motherCandleRange := motherCandleHigh - motherCandleLow
target1Buy := motherCandleHigh + longT1Range * motherCandleRange
target2Buy := motherCandleHigh + longT2Range * motherCandleRange
target1Sell := motherCandleLow - shortT1Range * motherCandleRange
target2Sell := motherCandleLow - shortT2Range * motherCandleRange
// mother candle high
line.set_xy1(motherCandleH, motherCandleIndex, motherCandleHigh)
line.set_xy2(motherCandleH, bar_index, motherCandleHigh)
label.set_xy(motherCandleHLabel, bar_index + 5, motherCandleHigh)
label.set_text(id=motherCandleHLabel, text='Range High - ' + str.tostring(motherCandleHigh))
//mother candle low
line.set_xy1(motherCandleL, motherCandleIndex, motherCandleLow)
line.set_xy2(motherCandleL, bar_index, motherCandleLow)
label.set_xy(motherCandleLLabel, bar_index + 5, motherCandleLow)
label.set_text(id=motherCandleLLabel, text='Range Low - ' + str.tostring(motherCandleLow))
//long target 1
if longT1Line
line.set_xy1(longT1, motherCandleIndex, target1Buy)
line.set_xy2(longT1, bar_index, target1Buy)
label.set_xy(longT1Label, bar_index + 5, target1Buy)
label.set_text(id=longT1Label, text='T1 - ' + str.tostring(target1Buy) + ' (' + str.tostring(longT1Range * motherCandleRange) + ') points')
//long target 2
if longT2Line
line.set_xy1(longT2, motherCandleIndex, target2Buy)
line.set_xy2(longT2, bar_index, target2Buy)
label.set_xy(longT2Label, bar_index + 5, target2Buy)
label.set_text(id=longT2Label, text='T2 - ' + str.tostring(target2Buy) + ' (' + str.tostring(longT2Range * motherCandleRange) + ') points')
//short target 1
if shortT1Line
line.set_xy1(shortT1, motherCandleIndex, target1Sell)
line.set_xy2(shortT1, bar_index, target1Sell)
label.set_xy(shortT1Label, bar_index + 5, target1Sell)
label.set_text(id=shortT1Label, text='T1 - ' + str.tostring(target1Sell) + ' (' + str.tostring(shortT1Range * motherCandleRange) + ') points')
//short target 2
if shortT2Line
line.set_xy1(shortT2, motherCandleIndex, target2Sell)
line.set_xy2(shortT2, bar_index, target2Sell)
label.set_xy(shortT2Label, bar_index + 5, target2Sell)
label.set_text(id=shortT2Label, text='T2 - ' + str.tostring(target2Sell) + ' (' + str.tostring(shortT2Range * motherCandleRange) + ') points')
rsi 1450The code has been reverted to its original version without the arrow modifications. Let me know if you need any further adjustments!
FBaands-parthibanwhat is Faytterro Bands? it is a channel indicator like "Bollinger Bands". what it does? creates a channel using standard deviations and means. thus giving users an idea about the expensive and cheap zones.
30 EMA Breakout Strategy with Stop Loss and Target30 EMA Breakout Strategy with Stop Loss and Target this Strategy Give you 1:3 Reward on you risk and Hit Ratio of this Strategy is 71 %
Ichimoku ACE ClubA. Overview:
This script is a custom implementation of the Ichimoku Cloud indicator for the TradingView platform, built using Pine Script version 4. It adds additional features like custom "Knife" lines and circle markers for specific data points. The indicator overlays on the chart and plots various elements of the Ichimoku system, including the Tenkan, Kijun, Chikou, and Kumo Cloud.
B. Inputs:
1. Tenkan (TS): This is the short-term moving average line (default period: 9).
2. Kijun (KJ): This is the medium-term moving average line (default period: 17).
3. Knife1 (K1): This line is based on a longer-term moving average (default period: 65).
4. Knife2 (K2): Another long-term moving average line (default period: 129).
5. Chikou Displacement (Chikou_Disp): The Chikou Span is plotted with a delay of 26 periods by default.
6. Displacement (disp): Determines the horizontal shift of the Kumo cloud.
C. Functions:
- `donchian(len)`: This function calculates the Donchian channel, which is the average of the highest high and the lowest low over the given period (len).
- `mf(len, offset)`: This function calculates the highest high and the lowest low over the given period, with an offset applied.
D. Plots:
1. Tenkan, Kijun, Knife1, and Knife2: These are plotted as lines with different colors and thicknesses.
- Tenkan is blue.
- Kijun is red.
- Knife1 is yellow.
- Knife2 is orange.
2. Chikou Span: This is plotted with a displacement and shown in purple.
3. Kumo Cloud: The cloud is formed by plotting two lines, Span A (green) and Span B (magenta), which represent the top and bottom of the cloud, respectively. The space between these lines is filled with a semi-transparent color, either green or magenta, depending on the relative position of the two spans.
E. Circle Markers:
- Additional circle markers are plotted for each of the Tenkan, Kijun, Knife1, and Knife2 lines at various offsets, helping to visualize the historical data points for each of these indicators. These circles are color-coded according to the line they correspond to.
F. Customization:
- The indicator allows customization of the lengths (periods) for Tenkan, Kijun, Knife1, Knife2, and other components via the script's input fields.
G. Conclusion:
This Ichimoku-based indicator provides a detailed view of the market's trend strength and direction. It offers a unique addition with the Knife lines and visual aids like circle markers for specific periods, which helps traders make better-informed decisions based on Ichimoku analysis.
---
You can modify the parameters such as `TS`, `KJ`, `K1`, `K2`, and `disp` according to your trading preferences. The colors and line thicknesses can also be adjusted for better visual representation.
cme big boyKết luận chiến lược:
1. Hỗ trợ:
o Vùng 2620 (OGF5): Tận dụng cơ hội mua khi thị trường kỳ vọng phục hồi ngắn hạn.
2. Kháng cự:
o Vùng 2640 (OGG5): Xem xét bán khống khi có dấu hiệu suy yếu.
o Vùng 2650 (OGF5 & OGG5): Đây là mức giá quan trọng, cần theo dõi sát để thực hiện chiến lược Buy nếu giá vượt kháng cự.
3 EMA Cross 9 EMA with Close ConfirmationThe 3x Exponential Moving Average Crosses the 9x Exponential Moving Average. Once the 3x closes above the 9x and then a subsequent candle closes above the 9x, this strategy goes long. This strategy exits once the candle closes below the 9x.
DCA Short StrategyBased DCA on ema/Rsi with safety order. Can apply rsi/ema/rsi-ema or None. Only short
Winter Is Coming (Snowflake)While attempting to draw a star using Pine Script, I ended up creating another nonsense indicator 🙂
How to Draw a Dynamic Snowflake? 🤦♂️
This indicator provides a customizable snowflake pattern that can be displayed on either a linear or logarithmic chart. Users can change the number of vertices and notches to make the pattern dynamic and versatile. (For added fun, the skull emojis that appear on each tick can be replaced with other symbols, like 🍺—because, hey, it’s Christmas!)
What Can You Learn?
Curious users analyzing this script can uncover practical answers to these questions:
How can line and label drawings be constructed using array functions?
How can trigonometric and logarithmic calculations be implemented effectively?
Details:
The snowflake is composed of symmetrical branches radiating from a central point. Each branch includes adjustable notches along its length, allowing users to control both their count and spacing. At the center of the snowflake, an n-point star is drawn (parameter: gon). This star's outer and inner vertices are aligned with the notches, ensuring perfect harmony with the snowflake’s overall geometry. The star is evenly spaced, with each of its points separated by 360/n degrees, resulting in a visually balanced and symmetrical design.
Best Wishes
I hope 2025 will be the year when we can create more peace, more freedom and more time to drink beer for the whole planet! Happy New Year everyone!
Optimize Al-Sat Stratejisi (ADX ile)Strateji, teknik analiz araçlarını kullanarak piyasa trendlerini, fiyat hareketlerini ve hacim değişimlerini analiz eden bir algoritmadır. Bu sistem, alım ve satım sinyalleri üreterek yatırımcılara karar desteği sağlar. Ayrıca, risk yönetimi ve kâr hedefleriyle optimize edilmiştir.
EMA Scalperindikator EMA, untuk scalping berdasarkan harga EMA, dilangkapi dengan SL yang menggunakan 50% ATR
Abnormal Delta Volume HistogramThis indicator can help traders spot potential turning points or heightened volatility and provides a dynamic measure of unusual market behavior by focusing on shifts in “delta volume.” Delta volume is approximated by assigning all of a bar’s volume to the bullish side if the close is higher than the open and to the bearish side if the close is lower. The result is a net volume measure that can hint at which side—buyers or sellers—has the upper hand. By comparing this delta volume to its historical averages and measuring how far current readings deviate in terms of standard deviations, the indicator can highlight bars that reflect significantly stronger than normal buying or selling pressure.
A histogram visualizes these delta volume values on a bar-by-bar basis, while additional reference lines for the mean and threshold boundaries allow traders to quickly identify abnormal conditions. When the histogram bars extend beyond the threshold lines, and are colored differently to signal abnormality, it can draw the trader’s eye to periods when market participation or sentiment may be shifting rapidly. This can be used as an early warning signal, prompting further investigation into price action, external news, or significant events that may be driving unusual volume patterns.
Important Notice:
Trading financial markets involves significant risk and may not be suitable for all investors. The use of technical indicators like this one does not guarantee profitable results. This indicator should not be used as a standalone analysis tool. It is essential to combine it with other forms of analysis, such as fundamental analysis, risk management strategies, and awareness of current market conditions. Always conduct thorough research or consult with a qualified financial advisor before making trading decisions. Past performance is not indicative of future results.
Disclaimer:
Trading financial instruments involves substantial risk and may not be suitable for all investors. Past performance is not indicative of future results. This indicator is provided for informational and educational purposes only and should not be considered investment advice. Always conduct your own research and consult with a licensed financial professional before making any trading decisions.
Note: The effectiveness of any technical indicator can vary based on market conditions and individual trading styles. It's crucial to test indicators thoroughly using historical data and possibly paper trading before applying them in live trading scenarios.
Combined F&O Indicator BY SUPERSINGHExplanation of the Code
Inputs and Settings: The script allows customization of the indicator lengths like RSI, EMA, Stochastic, ATR, etc. You can change these parameters directly from the indicator settings panel.
Moving Averages (EMA): We calculate three different EMAs (9, 20, and 50-period) to track the short, medium, and long-term trends.
RSI: Relative Strength Index (RSI) is calculated with a default period of 14.
Stochastic Oscillator: The Stochastic %K and %D lines are calculated to identify overbought or oversold conditions.
Bollinger Bands: Bollinger Bands with a period of 20 and a standard deviation of 2 are plotted to highlight overbought and oversold areas.
MACD: The Moving Average Convergence Divergence (MACD) is calculated with standard 12, 26, and 9 periods to identify bullish and bearish trends.
ATR: The Average True Range (ATR) is used to measure volatility. It is plotted as a reference to gauge price movement.
Buy and Sell Conditions:
Buy Condition: When the RSI is below 30 (indicating oversold), the Stochastic %K crosses above %D, and the price is above all three EMAs (indicating a bullish trend), and the MACD line is above the signal line.
Sell Condition: When the RSI is above 70 (indicating overbought), the Stochastic %K crosses below %D, and the price is below all three EMAs (indicating a bearish trend), and the MACD line is below the signal line.
Signals: The script plots buy signals when all conditions for a bullish trend are met and sell signals for a bearish trend. Buy and Sell signals are marked below and above the price bars, respectively.
Plots: The script plots the three EMAs, the Bollinger Bands, the RSI with overbought/oversold levels, and the MACD histogram.
Customizing Open Interest Data
Since Pine Script does not support Open Interest data directly, you would need to:
Use a data provider that includes Open Interest (if your broker or exchange offers this via TradingView).
Manually analyze Open Interest trends on external platforms and incorporate them into your decision-making.
If Open Interest is available on your chart, you can conditionally filter buy and sell signals based on rising or falling Open Interest to further refine your entry/exit strategy.
Next Steps
Copy and paste the code above into TradingView’s Pine Script editor.
Modify any settings or indicators as per your preferences.
Backtest the strategy to ensure that it works effectively on historical data.
Notes
Ensure that the buy and sell conditions align with your risk tolerance and trading style.
You might need to fine-tune the parameters based on the asset you're trading, as different instruments may behave differently.
Future Prediction Lines//@version=6
indicator("Future Prediction Lines", overlay=true)
/*
# **Future Prediction Lines v3 (Indicator Documentation)**
---
## **Purpose**
The **Future Prediction Lines Indicator** is a powerful tool designed to visualize potential future price movements based on historical trends and multi-timeframe analysis. By integrating **linear regression**, **momentum indicators (MACD and RSI)**, and **confidence bands**, this indicator helps traders anticipate where prices might move over the next ` ` bars.
---
## **Key Features**
1. **Future Price Prediction**:
- Forecasts price movements for a user-defined number of bars into the future.
- Combines trends from multiple timeframes for a more robust prediction.
2. **Confidence Bands**:
- Upper and lower bounds based on **ATR (Average True Range)** to estimate potential volatility around the predicted price.
3. **Customizable Parameters**:
- **Future Bars**: Adjust how far ahead the predictions extend.
- **Higher Timeframe Analysis**: Incorporate data from larger timeframes (e.g., Daily, Weekly).
4. **Visibility Toggles**:
- **Reference Lines**: Hide or display the local and higher timeframe trends.
- **Confidence Bands**: Optionally show or hide the volatility bands around the forecast.
5. **Visual Markers**:
- **Red prediction lines** start from the current price and extend into the future.
- A **label** displays the forecasted price at the furthest point.
---
## **How It Works**
### 1. **Linear Regression (Trend Analysis)**:
- The indicator calculates **linear regression (LR)** for the chart's current timeframe and a higher timeframe.
- It averages these trends to create a combined forecast.
### 2. **Momentum Adjustments**:
- **MACD**: Adjusts predictions based on short-term momentum.
- **RSI**: Accounts for overbought/oversold conditions, nudging forecasts accordingly.
### 3. **Confidence Bands**:
- Uses **ATR** to generate upper and lower bounds, highlighting potential price volatility around the central forecast.
---
## **Recommended Timeframes**
### **1. Day Trading**:
- **Chart Timeframe**: 5m, 15m, 1H
- **Higher TF**: 4H or Daily
- **Focus**: Captures intraday trends and micro-movements.
### **2. Swing Trading**:
- **Chart Timeframe**: 4H, Daily
- **Higher TF**: Weekly
- **Focus**: Anticipates multi-day price swings within trends.
### **3. Position Trading**:
- **Chart Timeframe**: Daily, Weekly
- **Higher TF**: Monthly
- **Focus**: Analyzes macro trends and large price movements over weeks or months.
---
## **Settings Overview**
| **Parameter** | **Description** |
|-----------------------|-----------------------------------------------------------------------------------------------------------------------------|
| **Future Bars** | Number of bars to project into the future. |
| **Higher TF** | Select a higher timeframe to incorporate larger trends (e.g., "D" for Daily, "W" for Weekly). |
| **Confidence Bands** | Option to show upper/lower bounds based on ATR. |
| **MACD Settings** | Fine-tune MACD lengths for momentum adjustment. |
| **RSI Settings** | Adjust RSI length and overbought/oversold levels to influence predictions. |
| **Show Reference** | Toggle local and higher timeframe regression lines for comparison (default: hidden). |
---
## **How to Use**
1. **Add the Indicator**:
- Copy the script into TradingView’s Pine Editor.
- Click **Add to Chart**.
2. **Adjust Settings**:
- Open the indicator settings to configure:
- Number of future bars.
- Higher timeframe for additional trend analysis.
- Confidence bands (toggle visibility and adjust width using ATR).
3. **Interpret the Predictions**:
- **Red Line**: The central forecast for future prices.
- **Shaded Bands**: Optional confidence bands show volatility ranges.
- **Final Label**: Displays the predicted price at the furthest bar.
---
## **Practical Tips**
- **For Day Traders**:
- Use **shorter chart timeframes (5m–1H)** combined with a higher timeframe like **4H or Daily**.
- Focus on quick intraday price movements.
- **For Swing Traders**:
- Use a **4H or Daily chart** with **Weekly higher timeframe trends** for multi-day analysis.
- **For Long-Term Traders**:
- Use **Daily or Weekly charts** combined with **Monthly timeframe trends** to analyze macro movements.
---
## **Example Workflow**
1. Set your **chart timeframe** based on your trading style.
2. Select a **higher timeframe** in the settings (e.g., Weekly for swing trading).
3. Observe the **red prediction line** for potential price trajectory and plan entries/exits based on:
- Alignment with existing support/resistance levels.
- Confidence band boundaries (volatility range).
- Momentum indicators (e.g., MACD/RSI) confirming direction.
---
## **Limitations**
1. **Lagging Nature**:
- Linear regression is based on historical data and may lag during high-impact events.
2. **Assumption of Continuity**:
- Forecast assumes trends continue uninterrupted, which may not account for sudden market reversals.
3. **No Guarantee**:
- Predictions are **probabilistic** and should always be used in conjunction with other tools and analysis.
---
## **Final Note**
The **Future Prediction Lines Indicator** is a tool for projecting possible price paths. While it provides insights into potential price movements, always validate predictions with **price action**, **support/resistance levels**, and other **technical indicators** for better decision-making.
*/
RSI14 Crossover Above/Below RSI50
Edited Rsi Dual Indicator
I've added arrows directly on the chart to indicate RSI crossovers above and below the 50 level for both RSI lengths. Let me know if you need more changes!
Unicorn Fart DustA playful script for the cult meme token $UFD. Please fee free to copy and enhance to make a more elaborate sparkly fart dust indicator. Thank you Rontoshi aka Ron The Don... and Jasper.
Pi Cycle Top & Bottom OscillatorThis TradingView script implements the Pi Cycle Top & Bottom Oscillator, a technical indicator designed to identify potential market tops and bottoms using moving average relationships. Here's a detailed breakdown:
Indicator Overview
Purpose: The indicator calculates an oscillator based on the ratio of a 111-day simple moving average (SMA) to double the 350-day SMA. It identifies potential overbought (market tops) and oversold (market bottoms) conditions.
Visualization: The oscillator is displayed in a standalone pane with dynamic color coding to represent different market conditions.
Inputs
111-Day Moving Average Length (length_111): Adjustable parameter for the short-term moving average. Default is 111 days.
350-Day Moving Average Length (length_350): Adjustable parameter for the long-term moving average. Default is 350 days.
Overheat Threshold (upper_threshold): Percentage level above which the market is considered overheated. Default is 100%.
Cooling Down Threshold (lower_threshold): Percentage level below which the market is cooling down. Default is 75%.
Calculation
Moving Averages:
111-day SMA of the closing price.
350-day SMA of the closing price.
Double the 350-day SMA (
𝑚
𝑎
_
2
_
350
=
𝑚
𝑎
_
350
×
2
ma_2_350=ma_350×2).
Oscillator:
Ratio of the 111-day SMA to double the 350-day SMA, expressed as a percentage:
oscillator
=
𝑚
𝑎
_
111
𝑚
𝑎
_
2
_
350
×
100
oscillator=
ma_2_350
ma_111
×100
Market Conditions
Overheated Market (Potential Top): Oscillator >= Overheat Threshold (100% by default). Highlighted in red.
Cooling Down Market (Potential Bottom): Oscillator <= Cooling Down Threshold (75% by default). Highlighted in green.
Normal Market Condition: Oscillator is between these thresholds. Highlighted in blue.
Visual Features
Dynamic Oscillator Plot:
Color-coded to indicate market conditions:
Red: Overheated.
Green: Cooling down.
Blue: Normal condition.
Threshold Lines:
Red Dashed Line: Overheat Threshold.
Green Dashed Line: Cooling Down Threshold.
White Dashed Line: Additional high-value marker at 30 for reference.
Alerts
Overheat Alert: Triggers when the oscillator crosses the overheat threshold, signaling a potential market top.
Cooling Down Alert: Triggers when the oscillator crosses the cooling down threshold, signaling a potential market bottom.
Use Case
This script is particularly useful for traders seeking early signals of market reversals. The thresholds and dynamic color coding provide visual cues and alerts to aid decision-making in identifying overbought or oversold conditions.
FxSessions Mauricio LopezDiferencia el inicio de cada sesión del mercado de divisas, desde la apertura de Tokio, apertura de Londres y la apertura de Nueva York.