Göstergeler ve stratejiler
_CM_MacD_Ult_MTF_V2.1//------New V2 Update 07-28-2021----------
//Thanks to @SKTennis for help in Updating code to V2
//Added Groups to Settings Pane.
//Added Color Plots to Settings Pane
//Switched MTF Logic to turn ON/OFF automatically w/ TradingView's Built in Feature
//Updated Color Transparency plots to work in future update
//Added Ability to Turn ON/OFF Show MacD & Signal Line
//Added Ability to Turn ON/OFF Show Histogram
//Added Ability to Change MACD Line Colors Based on Trend
//Added Ability to Highlight Price Bars Based on Trend
//Added Alerts to Settings Pane.
//Customized how Alerts work. Must keep Checked in Settings Pane, and...
//When you go to Alerts Panel, Change Symbol to Indicator (CM_Ult_MacD_MTF_V2)
//Customized Alerts to Show Symbol, TimeFrame, Closing Price, MACD Crosses Up & MACD Crosses Down Signals in Alert
//Alerts are Pre-Set to only Alert on Bar Close
//------New V2.1 Update 08-03-2021----------
//Added back in ability to show Dots when MACD Crosses.
//Added Ability to Change Plot Widths in Settings Pane
//Added in Alert Feature where Cross Up if above 0 or cross down if below 0 (OFF By Default) user Request. @creid58
//FIXED - Plot Orders to Default what Plots are on top of each other
//FIXED - Two of the histogrm colors were backwrds
//------New V2.1 Update 12-07-2021----------
//Updated to PineScript V5
//------Minor Update 02-16-2022----------
//Per user request...Increased the Maxval for Signal Smoothing
//Next Add in Plot Types to Settings Pane.
//Next Add in more Moving Average types.
//See Video for Detailed Overview
//@version=5
indicator(title="_CM_MacD_Ult_MTF_V2.1", shorttitle="_CM_Ult_MacD_MTF_V2.1")
//Plot Inputs
res = input.timeframe("", "Indicator TimeFrame")
fast_length = input.int(title="Fast Length", defval=12)
slow_length = input.int(title="Slow Length", defval=26)
src = input.source(title="Source", defval=close)
signal_length = input.int(title="Signal Smoothing", minval = 1, maxval = 999, defval = 9)
sma_source = input.string(title="Oscillator MA Type", defval="EMA", options= )
sma_signal = input.string(title="Signal Line MA Type", defval="EMA", options= )
// Show Plots T/F
show_macd = input.bool(true, title="Show MACD Lines", group="Show Plots?", inline="SP10")
show_macd_LW = input.int(3, minval=0, maxval=5, title = "MACD Width", group="Show Plots?", inline="SP11")
show_signal_LW= input.int(2, minval=0, maxval=5, title = "Signal Width", group="Show Plots?", inline="SP11")
show_Hist = input.bool(true, title="Show Histogram", group="Show Plots?", inline="SP20")
show_hist_LW = input.int(5, minval=0, maxval=5, title = "-- Width", group="Show Plots?", inline="SP20")
show_trend = input.bool(true, title = "Show MACD Lines w/ Trend Color", group="Show Plots?", inline="SP30")
show_HB = input.bool(false, title="Show Highlight Price Bars", group="Show Plots?", inline="SP40")
show_cross = input.bool(false, title = "Show BackGround on Cross", group="Show Plots?", inline="SP50")
show_dots = input.bool(true, title = "Show Circle on Cross", group="Show Plots?", inline="SP60")
show_dots_LW = input.int(5, minval=0, maxval=5, title = "-- Width", group="Show Plots?", inline="SP60")
//show_trend = input(true, title = "Colors MACD Lines w/ Trend Color", group="Show Plots?", inline="SP5")
// MACD Lines colors
col_macd = input.color(#FF6D00, "MACD Line ", group="Color Settings", inline="CS1")
col_signal = input.color(#2962FF, "Signal Line ", group="Color Settings", inline="CS1")
col_trnd_Up = input.color(#4BAF4F, "Trend Up ", group="Color Settings", inline="CS2")
col_trnd_Dn = input.color(#B71D1C, "Trend Down ", group="Color Settings", inline="CS2")
// Histogram Colors
col_grow_above = input.color(#26A69A, "Above Grow", group="Histogram Colors", inline="Hist10")
col_fall_above = input.color(#B2DFDB, "Fall", group="Histogram Colors", inline="Hist10")
col_grow_below = input.color(#FF5252, "Below Grow", group="Histogram Colors", inline="Hist20")
col_fall_below = input.color(#FFCDD2, "Fall", group="Histogram Colors", inline="Hist20")
// Alerts T/F Inputs
alert_Long = input.bool(true, title = "MACD Cross Up", group = "Alerts", inline="Alert10")
alert_Short = input.bool(true, title = "MACD Cross Dn", group = "Alerts", inline="Alert10")
alert_Long_A = input.bool(false, title = "MACD Cross Up & > 0", group = "Alerts", inline="Alert20")
alert_Short_B = input.bool(false, title = "MACD Cross Dn & < 0", group = "Alerts", inline="Alert20")
// Calculating
fast_ma = request.security(syminfo.tickerid, res, sma_source == "SMA" ? ta.sma(src, fast_length) : ta.ema(src, fast_length))
slow_ma = request.security(syminfo.tickerid, res, sma_source == "SMA" ? ta.sma(src, slow_length) : ta.ema(src, slow_length))
macd = fast_ma - slow_ma
signal = request.security(syminfo.tickerid, res, sma_signal == "SMA" ? ta.sma(macd, signal_length) : ta.ema(macd, signal_length))
hist = macd - signal
// MACD Trend and Cross Up/Down conditions
trend_up = macd > signal
trend_dn = macd < signal
cross_UP = signal >= macd and signal < macd
cross_DN = signal <= macd and signal > macd
cross_UP_A = (signal >= macd and signal < macd) and macd > 0
cross_DN_B = (signal <= macd and signal > macd) and macd < 0
// Condition that changes Color of MACD Line if Show Trend is turned on..
trend_col = show_trend and trend_up ? col_trnd_Up : trend_up ? col_macd : show_trend and trend_dn ? col_trnd_Dn: trend_dn ? col_macd : na
//Var Statements for Histogram Color Change
var bool histA_IsUp = false
var bool histA_IsDown = false
var bool histB_IsDown = false
var bool histB_IsUp = false
histA_IsUp := hist == hist ? histA_IsUp : hist > hist and hist > 0
histA_IsDown := hist == hist ? histA_IsDown : hist < hist and hist > 0
histB_IsDown := hist == hist ? histB_IsDown : hist < hist and hist <= 0
histB_IsUp := hist == hist ? histB_IsUp : hist > hist and hist <= 0
hist_col = histA_IsUp ? col_grow_above : histA_IsDown ? col_fall_above : histB_IsDown ? col_grow_below : histB_IsUp ? col_fall_below :color.silver
// Plot Statements
//Background Color
bgcolor(show_cross and cross_UP ? col_trnd_Up : na, editable=false)
bgcolor(show_cross and cross_DN ? col_trnd_Dn : na, editable=false)
//Highlight Price Bars
barcolor(show_HB and trend_up ? col_trnd_Up : na, title="Trend Up", offset = 0, editable=false)
barcolor(show_HB and trend_dn ? col_trnd_Dn : na, title="Trend Dn", offset = 0, editable=false)
//Regular Plots
plot(show_Hist and hist ? hist : na, title="Histogram", style=plot.style_columns, color=color.new(hist_col ,0),linewidth=show_hist_LW)
plot(show_macd and signal ? signal : na, title="Signal", color=color.new(col_signal, 0), style=plot.style_line ,linewidth=show_signal_LW)
plot(show_macd and macd ? macd : na, title="MACD", color=color.new(trend_col, 0), style=plot.style_line ,linewidth=show_macd_LW)
hline(0, title="0 Line", color=color.new(color.gray, 0), linestyle=hline.style_dashed, linewidth=1, editable=false)
plot(show_dots and cross_UP ? macd : na, title="Dots", color=color.new(trend_col ,0), style=plot.style_circles, linewidth=show_dots_LW, editable=false)
plot(show_dots and cross_DN ? macd : na, title="Dots", color=color.new(trend_col ,0), style=plot.style_circles, linewidth=show_dots_LW, editable=false)
//Alerts
if alert_Long and cross_UP
alert("Symbol = (" + syminfo.tickerid + ") TimeFrame = (" + timeframe.period + ") Current Price (" + str.tostring(close) + ") MACD Crosses Up.", alert.freq_once_per_bar_close)
if alert_Short and cross_DN
alert("Symbol = (" + syminfo.tickerid + ") TimeFrame = (" + timeframe.period + ") Current Price (" + str.tostring(close) + ") MACD Crosses Down.", alert.freq_once_per_bar_close)
//Alerts - Stricter Condition - Only Alerts When MACD Crosses UP & MACD > 0 -- Crosses Down & MACD < 0
if alert_Long_A and cross_UP_A
alert("Symbol = (" + syminfo.tickerid + ") TimeFrame = (" + timeframe.period + ") Current Price (" + str.tostring(close) + ") MACD > 0 And Crosses Up.", alert.freq_once_per_bar_close)
if alert_Short_B and cross_DN_B
alert("Symbol = (" + syminfo.tickerid + ") TimeFrame = (" + timeframe.period + ") Current Price (" + str.tostring(close) + ") MACD < 0 And Crosses Down.", alert.freq_once_per_bar_close)
//End Code
Combined ATR Bands + VWAP + Moving Averages🔥 Ultimate Trading Combo: ATR Bands + VWAP + Moving Averages
This comprehensive indicator combines three powerful technical analysis tools in one clean interface:
📊 Features:
• ATR Bands - Dynamic support/resistance levels with step-line styling
• VWAP - Volume Weighted Average Price with orange dotted visualization
• Moving Averages - 50, 100, 200 periods with customizable colors
⚙️ Customizable Settings:
Toggle each component on/off independently
Adjustable ATR periods and multipliers
Multiple VWAP anchor periods (Session, Week, Month, Quarter, Year)
Configurable MA sources and periods
Custom colors and transparency levels
🎯 Perfect For:
Day traders seeking dynamic support/resistance
Swing traders using multiple timeframe analysis
Anyone wanting clean, professional chart visualization
💡 Created with AI assistance (Claude Sonnet 4)
Open source - feel free to modify and improve!
🔥 المؤشر الشامل: نطاقات ATR + VWAP + المتوسطات المتحركة
هذا المؤشر الشامل يجمع ثلاث أدوات تحليل فني قوية في واجهة واحدة نظيفة:
📊 المميزات:
• نطاقات ATR - مستويات دعم ومقاومة ديناميكية بتصميم خطوط متدرجة
• VWAP - متوسط السعر المرجح بالحجم مع عرض نقطي برتقالي
• المتوسطات المتحركة - فترات 50، 100، 200 مع ألوان قابلة للتخصيص
⚙️ إعدادات قابلة للتخصيص:
تشغيل/إيقاف كل مكون بشكل مستقل
فترات ومضاعفات ATR قابلة للتعديل
فترات ربط VWAP متعددة (جلسة، أسبوع، شهر، ربع، سنة)
مصادر وفترات MA قابلة للتكوين
ألوان مخصصة ومستويات شفافية
🎯 مثالي لـ:
المتداولين اليوميين الباحثين عن دعم/مقاومة ديناميكية
متداولي التأرجح باستخدام تحليل الإطارات الزمنية المتعددة
أي شخص يريد عرض مخططات نظيف ومهني
💡 تم إنشاؤه بمساعدة الذكاء الاصطناعي (Claude Sonnet 4)
مفتوح المصدر - لا تتردد في التعديل والتحسين!
#ATR #VWAP #MovingAverages #TechnicalAnalysis #Support #Resistance #DayTrading #SwingTrading #OpenSource #AI #تحليل_فني #دعم_مقاومة #متوسطات_متحركة #تداول_يومي
Parabolic Run Detector (With Weighted Caution)This indicator, Parabolic Run Detector (With Weighted Caution), is designed to help traders identify moments of strong directional movement (I call it a run) in asset prices, especially those that exhibit a parabolic character. It uses a combination of log-scale price slopes, RSI momentum, and Ichimoku cloud structure (via the very useful Tenkan-Kijun "clamp") to evaluate whether a price move has both strength and sustainability. When certain thresholds are met, it marks the beginning of a potential run with a green circle below the price chart, helping traders spot entries early in high-momentum conditions.
In addition to identifying the start of a run, the indicator also looks for end-of-run caution signals. These are marked with orange circles, indicating potential exhaustion or overextension. The caution logic doesn’t require all conditions to trigger at once — instead, it uses a weighted scoring system based on RSI extension, slowing price momentum (second derivative), and the widening of the Ichimoku clamp. If these conditions cross a confidence threshold within a set number of bars after a run begins, the caution signal fires. This allows traders to stay alert to reversal or consolidation risks without being prematurely spooked by noise. So, choose to ignore them, but they are there for you to assess.
You can fine-tune sensitivity with a set of adjustable parameters, including minimum slope values, RSI reversion awareness (bias weight), clamp thresholds, and spacing between signals. So play around to see what works best for you! For advanced users, the option to toggle between static or dynamically calculated RSI baselines and adapt Ichimoku settings for crypto vs. legacy markets adds another layer of contextual accuracy. Whether you're trading Bitcoin on a 4-hour chart or scanning equities on a daily timeframe, this tool helps bring clarity to trend acceleration and potential fatigue, all while minimizing visual clutter and giving you intuitive visual cues.
Let me know what you think.
Spring Bar DetectorA Spring is a false breakdown below a well-defined support level, followed by a sharp rebound. It's a form of bear trap, where price dips below support just enough to trigger stop-loss orders and attract short sellers—only to reverse strongly, indicating that smart money is absorbing supply.
FVG Trailing Stop [LuxAlgo]The FVG Trailing Stop indicator tracks unmitigated Fair Value Gaps (FVG) data to produce a Trailing Stop indicator able to determine if the market is uptrending or downtrending easily.
🔶 USAGE
The FVG Trailing Stop is intended to identify trend directions through its position relative to the closing price:
Bullish: Price is located above the Trailing Stop, indicating that all Bearish FVGs have been mitigated and the trend is anticipated to continue upwards.
Bearish State: Price is located below the Trailing Stop, indicating that all Bullish FVGs have been mitigated and the trend is anticipated to continue downwards.
The Trailing Stop originates from two extremities obtained from the average of respective unmitigated FVGs. The specific directional average is also displayed as a more transparent secondary line, however, the trailing stop is derived from this value and a new trend will not be detected until the opposite directional average is crossed.
Price reaching the Trailing Stop is caused by retracements and can lead to the following scenarios:
Outcome 1: The directional average is crossed next, indicating a new trend direction.
Outcome 2: The directional average is held as support or resistance, leading to a new impulse and a continuation of the trend.
🔹 Reset on Cross
While price crossing the Trailing Stop should be considered as a sign of an upcoming trend change; it is possible for the price to still evolve outside it.
As a solution, we have included the "Reset on Cross" feature, which (as the name suggests) hides and resets the Trailing Stop each time it is crossed, leading to a "Neutral" state.
This opens the opportunity for the Trailing Stop to be displayed again once the price moves again in the direction of the pre-established trend. A trader might use this to accumulate positions within a specific trend.
🔶 DETAILS
The script uses a typical identification method for FVGs. Once identified, the script collects the point of the FVG farthest from the current price when formed.
For Upwards FVGs this is the bottom of the FVG.
For Downwards FVGs this is the top of the FVG.
The data is managed only to use the last input lookback of FVGs. If an FVG is mitigated, it frees up a spot in the memory for a new FVG, however, if the lookback is full, the oldest will be deleted.
From there, it uses a "trailing" logic only to move the Trailing Stop in one direction until the trailing stop resets or the direction flips.
The extremities used to calculate the Trailing Stop are created from 2 calculation steps, the first step involves taking the raw average of the FVG mitigation levels, and the second step applies a simple moving average (SMA) smoothing of the precedent-obtained averages.
🔶 SETTINGS
Unmitigated FVG Lookback: Sets the maximum number of Unmitigated FVGs that the script will use.
Smoothing Length: Sets the smoothing length for the Trailing Stop to reduce erratic results.
Reset on Cross: When enabled, hide and reset the Trailing Stop until the price starts moving in the pre-established trend direction again.
Risk-Adjusted Momentum Oscillator# Risk-Adjusted Momentum Oscillator (RAMO): Momentum Analysis with Integrated Risk Assessment
## 1. Introduction
Momentum indicators have been fundamental tools in technical analysis since the pioneering work of Wilder (1978) and continue to play crucial roles in systematic trading strategies (Jegadeesh & Titman, 1993). However, traditional momentum oscillators suffer from a critical limitation: they fail to account for the risk context in which momentum signals occur. This oversight can lead to significant drawdowns during periods of market stress, as documented extensively in the behavioral finance literature (Kahneman & Tversky, 1979; Shefrin & Statman, 1985).
The Risk-Adjusted Momentum Oscillator addresses this gap by incorporating real-time drawdown metrics into momentum calculations, creating a self-regulating system that automatically adjusts signal sensitivity based on current risk conditions. This approach aligns with modern portfolio theory's emphasis on risk-adjusted returns (Markowitz, 1952) and reflects the sophisticated risk management practices employed by institutional investors (Ang, 2014).
## 2. Theoretical Foundation
### 2.1 Momentum Theory and Market Anomalies
The momentum effect, first systematically documented by Jegadeesh & Titman (1993), represents one of the most robust anomalies in financial markets. Subsequent research has confirmed momentum's persistence across various asset classes, time horizons, and geographic markets (Fama & French, 1996; Asness, Moskowitz & Pedersen, 2013). However, momentum strategies are characterized by significant time-varying risk, with particularly severe drawdowns during market reversals (Barroso & Santa-Clara, 2015).
### 2.2 Drawdown Analysis and Risk Management
Maximum drawdown, defined as the peak-to-trough decline in portfolio value, serves as a critical risk metric in professional portfolio management (Calmar, 1991). Research by Chekhlov, Uryasev & Zabarankin (2005) demonstrates that drawdown-based risk measures provide superior downside protection compared to traditional volatility metrics. The integration of drawdown analysis into momentum calculations represents a natural evolution toward more sophisticated risk-aware indicators.
### 2.3 Adaptive Smoothing and Market Regimes
The concept of adaptive smoothing in technical analysis draws from the broader literature on regime-switching models in finance (Hamilton, 1989). Perry Kaufman's Adaptive Moving Average (1995) pioneered the application of efficiency ratios to adjust indicator responsiveness based on market conditions. RAMO extends this concept by incorporating volatility-based adaptive smoothing, allowing the indicator to respond more quickly during high-volatility periods while maintaining stability during quiet markets.
## 3. Methodology
### 3.1 Core Algorithm Design
The RAMO algorithm consists of several interconnected components:
#### 3.1.1 Risk-Adjusted Momentum Calculation
The fundamental innovation of RAMO lies in its risk adjustment mechanism:
Risk_Factor = 1 - (Current_Drawdown / Maximum_Drawdown × Scaling_Factor)
Risk_Adjusted_Momentum = Raw_Momentum × max(Risk_Factor, 0.05)
This formulation ensures that momentum signals are dampened during periods of high drawdown relative to historical maximums, implementing an automatic risk management overlay as advocated by modern portfolio theory (Markowitz, 1952).
#### 3.1.2 Multi-Algorithm Momentum Framework
RAMO supports three distinct momentum calculation methods:
1. Rate of Change: Traditional percentage-based momentum (Pring, 2002)
2. Price Momentum: Absolute price differences
3. Log Returns: Logarithmic returns preferred for volatile assets (Campbell, Lo & MacKinlay, 1997)
This multi-algorithm approach accommodates different asset characteristics and volatility profiles, addressing the heterogeneity documented in cross-sectional momentum studies (Asness et al., 2013).
### 3.2 Leading Indicator Components
#### 3.2.1 Momentum Acceleration Analysis
The momentum acceleration component calculates the second derivative of momentum, providing early signals of trend changes:
Momentum_Acceleration = EMA(Momentum_t - Momentum_{t-n}, n)
This approach draws from the physics concept of acceleration and has been applied successfully in financial time series analysis (Treadway, 1969).
#### 3.2.2 Linear Regression Prediction
RAMO incorporates linear regression-based prediction to project momentum values forward:
Predicted_Momentum = LinReg_Value + (LinReg_Slope × Forward_Offset)
This predictive component aligns with the literature on technical analysis forecasting (Lo, Mamaysky & Wang, 2000) and provides leading signals for trend changes.
#### 3.2.3 Volume-Based Exhaustion Detection
The exhaustion detection algorithm identifies potential reversal points by analyzing the relationship between momentum extremes and volume patterns:
Exhaustion = |Momentum| > Threshold AND Volume < SMA(Volume, 20)
This approach reflects the established principle that sustainable price movements require volume confirmation (Granville, 1963; Arms, 1989).
### 3.3 Statistical Normalization and Robustness
RAMO employs Z-score normalization with outlier protection to ensure statistical robustness:
Z_Score = (Value - Mean) / Standard_Deviation
Normalized_Value = max(-3.5, min(3.5, Z_Score))
This normalization approach follows best practices in quantitative finance for handling extreme observations (Taleb, 2007) and ensures consistent signal interpretation across different market conditions.
### 3.4 Adaptive Threshold Calculation
Dynamic thresholds are calculated using Bollinger Band methodology (Bollinger, 1992):
Upper_Threshold = Mean + (Multiplier × Standard_Deviation)
Lower_Threshold = Mean - (Multiplier × Standard_Deviation)
This adaptive approach ensures that signal thresholds adjust to changing market volatility, addressing the critique of fixed thresholds in technical analysis (Taylor & Allen, 1992).
## 4. Implementation Details
### 4.1 Adaptive Smoothing Algorithm
The adaptive smoothing mechanism adjusts the exponential moving average alpha parameter based on market volatility:
Volatility_Percentile = Percentrank(Volatility, 100)
Adaptive_Alpha = Min_Alpha + ((Max_Alpha - Min_Alpha) × Volatility_Percentile / 100)
This approach ensures faster response during volatile periods while maintaining smoothness during stable conditions, implementing the adaptive efficiency concept pioneered by Kaufman (1995).
### 4.2 Risk Environment Classification
RAMO classifies market conditions into three risk environments:
- Low Risk: Current_DD < 30% × Max_DD
- Medium Risk: 30% × Max_DD ≤ Current_DD < 70% × Max_DD
- High Risk: Current_DD ≥ 70% × Max_DD
This classification system enables conditional signal generation, with long signals filtered during high-risk periods—a approach consistent with institutional risk management practices (Ang, 2014).
## 5. Signal Generation and Interpretation
### 5.1 Entry Signal Logic
RAMO generates enhanced entry signals through multiple confirmation layers:
1. Primary Signal: Crossover between indicator and signal line
2. Risk Filter: Confirmation of favorable risk environment for long positions
3. Leading Component: Early warning signals via acceleration analysis
4. Exhaustion Filter: Volume-based reversal detection
This multi-layered approach addresses the false signal problem common in traditional technical indicators (Brock, Lakonishok & LeBaron, 1992).
### 5.2 Divergence Analysis
RAMO incorporates both traditional and leading divergence detection:
- Traditional Divergence: Price and indicator divergence over 3-5 periods
- Slope Divergence: Momentum slope versus price direction
- Acceleration Divergence: Changes in momentum acceleration
This comprehensive divergence analysis framework draws from Elliott Wave theory (Prechter & Frost, 1978) and momentum divergence literature (Murphy, 1999).
## 6. Empirical Advantages and Applications
### 6.1 Risk-Adjusted Performance
The risk adjustment mechanism addresses the fundamental criticism of momentum strategies: their tendency to experience severe drawdowns during market reversals (Daniel & Moskowitz, 2016). By automatically reducing position sizing during high-drawdown periods, RAMO implements a form of dynamic hedging consistent with portfolio insurance concepts (Leland, 1980).
### 6.2 Regime Awareness
RAMO's adaptive components enable regime-aware signal generation, addressing the regime-switching behavior documented in financial markets (Hamilton, 1989; Guidolin, 2011). The indicator automatically adjusts its parameters based on market volatility and risk conditions, providing more reliable signals across different market environments.
### 6.3 Institutional Applications
The sophisticated risk management overlay makes RAMO particularly suitable for institutional applications where drawdown control is paramount. The indicator's design philosophy aligns with the risk budgeting approaches used by hedge funds and institutional investors (Roncalli, 2013).
## 7. Limitations and Future Research
### 7.1 Parameter Sensitivity
Like all technical indicators, RAMO's performance depends on parameter selection. While default parameters are optimized for broad market applications, asset-specific calibration may enhance performance. Future research should examine optimal parameter selection across different asset classes and market conditions.
### 7.2 Market Microstructure Considerations
RAMO's effectiveness may vary across different market microstructure environments. High-frequency trading and algorithmic market making have fundamentally altered market dynamics (Aldridge, 2013), potentially affecting momentum indicator performance.
### 7.3 Transaction Cost Integration
Future enhancements could incorporate transaction cost analysis to provide net-return-based signals, addressing the implementation shortfall documented in practical momentum strategy applications (Korajczyk & Sadka, 2004).
## References
Aldridge, I. (2013). *High-Frequency Trading: A Practical Guide to Algorithmic Strategies and Trading Systems*. 2nd ed. Hoboken, NJ: John Wiley & Sons.
Ang, A. (2014). *Asset Management: A Systematic Approach to Factor Investing*. New York: Oxford University Press.
Arms, R. W. (1989). *The Arms Index (TRIN): An Introduction to the Volume Analysis of Stock and Bond Markets*. Homewood, IL: Dow Jones-Irwin.
Asness, C. S., Moskowitz, T. J., & Pedersen, L. H. (2013). Value and momentum everywhere. *Journal of Finance*, 68(3), 929-985.
Barroso, P., & Santa-Clara, P. (2015). Momentum has its moments. *Journal of Financial Economics*, 116(1), 111-120.
Bollinger, J. (1992). *Bollinger on Bollinger Bands*. New York: McGraw-Hill.
Brock, W., Lakonishok, J., & LeBaron, B. (1992). Simple technical trading rules and the stochastic properties of stock returns. *Journal of Finance*, 47(5), 1731-1764.
Calmar, T. (1991). The Calmar ratio: A smoother tool. *Futures*, 20(1), 40.
Campbell, J. Y., Lo, A. W., & MacKinlay, A. C. (1997). *The Econometrics of Financial Markets*. Princeton, NJ: Princeton University Press.
Chekhlov, A., Uryasev, S., & Zabarankin, M. (2005). Drawdown measure in portfolio optimization. *International Journal of Theoretical and Applied Finance*, 8(1), 13-58.
Daniel, K., & Moskowitz, T. J. (2016). Momentum crashes. *Journal of Financial Economics*, 122(2), 221-247.
Fama, E. F., & French, K. R. (1996). Multifactor explanations of asset pricing anomalies. *Journal of Finance*, 51(1), 55-84.
Granville, J. E. (1963). *Granville's New Key to Stock Market Profits*. Englewood Cliffs, NJ: Prentice-Hall.
Guidolin, M. (2011). Markov switching models in empirical finance. In D. N. Drukker (Ed.), *Missing Data Methods: Time-Series Methods and Applications* (pp. 1-86). Bingley: Emerald Group Publishing.
Hamilton, J. D. (1989). A new approach to the economic analysis of nonstationary time series and the business cycle. *Econometrica*, 57(2), 357-384.
Jegadeesh, N., & Titman, S. (1993). Returns to buying winners and selling losers: Implications for stock market efficiency. *Journal of Finance*, 48(1), 65-91.
Kahneman, D., & Tversky, A. (1979). Prospect theory: An analysis of decision under risk. *Econometrica*, 47(2), 263-291.
Kaufman, P. J. (1995). *Smarter Trading: Improving Performance in Changing Markets*. New York: McGraw-Hill.
Korajczyk, R. A., & Sadka, R. (2004). Are momentum profits robust to trading costs? *Journal of Finance*, 59(3), 1039-1082.
Leland, H. E. (1980). Who should buy portfolio insurance? *Journal of Finance*, 35(2), 581-594.
Lo, A. W., Mamaysky, H., & Wang, J. (2000). Foundations of technical analysis: Computational algorithms, statistical inference, and empirical implementation. *Journal of Finance*, 55(4), 1705-1765.
Markowitz, H. (1952). Portfolio selection. *Journal of Finance*, 7(1), 77-91.
Murphy, J. J. (1999). *Technical Analysis of the Financial Markets: A Comprehensive Guide to Trading Methods and Applications*. New York: New York Institute of Finance.
Prechter, R. R., & Frost, A. J. (1978). *Elliott Wave Principle: Key to Market Behavior*. Gainesville, GA: New Classics Library.
Pring, M. J. (2002). *Technical Analysis Explained: The Successful Investor's Guide to Spotting Investment Trends and Turning Points*. 4th ed. New York: McGraw-Hill.
Roncalli, T. (2013). *Introduction to Risk Parity and Budgeting*. Boca Raton, FL: CRC Press.
Shefrin, H., & Statman, M. (1985). The disposition to sell winners too early and ride losers too long: Theory and evidence. *Journal of Finance*, 40(3), 777-790.
Taleb, N. N. (2007). *The Black Swan: The Impact of the Highly Improbable*. New York: Random House.
Taylor, M. P., & Allen, H. (1992). The use of technical analysis in the foreign exchange market. *Journal of International Money and Finance*, 11(3), 304-314.
Treadway, A. B. (1969). On rational entrepreneurial behavior and the demand for investment. *Review of Economic Studies*, 36(2), 227-239.
Wilder, J. W. (1978). *New Concepts in Technical Trading Systems*. Greensboro, NC: Trend Research.
Jeff_T_FXRSI that you can set alerts. Its just a regular RSI, there is nothing fancy about it. Tradingview is making me write all this stuff because it says I was too short in my answer. I wanted to get alerted for over bought and over sold and so I had to make this.
Sticky Notes📌 Sticky Notes - On-Chart Memo Tool
A convenient indicator that lets you display trading ideas and important notes directly on your charts!
✨ Key Features:
📝 Create memos with custom text input
📍 Place anywhere on chart (top/middle/bottom)
🖥️ Screen-fixed display mode (corner positions)
🎨 Fully customizable text and background colors
📏 5 text size options (tiny to huge)
⏰ Time-based display functionality
📐 Text alignment options (left/center/right)
💡 Use Cases:
Trading strategy reminders
Important price level notes
Economic event schedules
Entry/exit point memos
Simple and user-friendly design to enhance your trading analysis!
Previous Day High/Low (8AM–4PM)A simple indicator for NQ and ES futures that marks the previous day high and low on the current trading day excluding premarket.
AWR R & LR Oscillator with plots & tableHello trading viewers !
I'm glad to share with you one of my favorite indicator. It's the aggregate of many things. It is partly based on an indicator designed by gentleman goat. Many thanks to him.
1. Oscillator and Correlation Calculations
Overview and Functionality: This part of the indicator computes up to 10 Pearson correlation coefficients between a chosen source (typically the close price, though this is user-configurable) and the bar index over various periods. Starting with an initial period defined by the startPeriod parameter and increasing by a set increment (periodIncrement), each correlation coefficient is calculated using the built-in ta.correlation function over successive ranges. These coefficients are stored in an array, and the indicator calculates their average (avgPR) to provide a complete view of the market trend strength.
Display Features: Each individual coefficient, as well as the overall average, is plotted on the chart using a specific color. Horizontal lines (both dashed and solid) are drawn at levels 0, ±0.8, and ±1, serving as visual thresholds. Additionally, conditional fills in red or blue highlight when values exceed these thresholds, helping the user quickly identify potential extreme conditions (such as overbought or oversold situations).
2. Visual Signals and Automated Alerts
Graphical Signal Enhancements: To reinforce the analysis, the indicator uses graphical elements like emojis and shape markers. For example:
If all 10 curves drop below -0.79, a 🌋 emoji appears at the bottom of the chart;
When curves 2 through 10 are below -0.79, a ⛰️ emoji is displayed below the bar, potentially serving as a buy signal accompanied by an alert condition;
Likewise, symmetrical conditions for correlations exceeding 0.79 produce corresponding emojis (🤿 and 🏖️) at the top or bottom of the chart.
Alerts and Notifications: Using these visual triggers, several alertcondition statements are defined within the script. This allows users to set up TradingView alerts and receive real-time notifications whenever the market reaches these predefined critical zones identified by the multi-period analysis.
3. Regression Channel Analysis
Principles and Calculations: In addition to the oscillator, the indicator implements an analysis of regression channels. For each of the 8 configurable channels, the user can set a range of periods (for example, min1 to max1, etc.). The function calc_regression_channel iterates through the defined period range to find the optimal period that maximizes a statistical measure derived from a regression parameter calculated by the function r(p). Once this optimal period is identified, the indicator computes two key points (A and B) which define the main regression line, and then creates a channel based on the calculated deviation (an RMSE multiplied by a user-defined factor).
The regression channels are not displayed on the chart but are used to plot shapes & fullfilled a table.
Blue shapes are plotted when 6th channel or 7th channel are lower than 3 deviations
Yellow shapes are plotted when 6th channel or 7th channel are higher than 3 deviations
4. Scores, Conditions, and the Summary Table
Scoring System: The indicator goes further by assigning scores across multiple analytical categories, such as:
1. BigPear Score
What It Represents: This score is based on a longer-term moving average of the Pearson correlation values (SMA 100 of the average of the 10 curves of correlation of Pearson). The BigPear category is designed to capture where this longer-term average falls within specific ranges.
Conditions: The script defines nine boolean conditions (labeled BigPear1up through BigPear9up for the “up” direction).
Here's the rules :
BigPear1up = (bigsma_avgPR <= 0.5 and bigsma_avgPR > 0.25)
BigPear2up = (bigsma_avgPR <= 0.25 and bigsma_avgPR > 0)
BigPear3up = (bigsma_avgPR <= 0 and bigsma_avgPR > -0.25)
BigPear4up = (bigsma_avgPR <= -0.25 and bigsma_avgPR > -0.5)
BigPear5up = (bigsma_avgPR <= -0.5 and bigsma_avgPR > -0.65)
BigPear6up = (bigsma_avgPR <= -0.65 and bigsma_avgPR > -0.7)
BigPear7up = (bigsma_avgPR <= -0.7 and bigsma_avgPR > -0.75)
BigPear8up = (bigsma_avgPR <= -0.75 and bigsma_avgPR > -0.8)
BigPear9up = (bigsma_avgPR <= -0.8)
Conditions: The script defines nine boolean conditions (labeled BigPear1down through BigPear9down for the “down” direction).
BigPear1down = (bigsma_avgPR >= -0.5 and bigsma_avgPR < -0.25)
BigPear2down = (bigsma_avgPR >= -0.25 and bigsma_avgPR < 0)
BigPear3down = (bigsma_avgPR >= 0 and bigsma_avgPR < 0.25)
BigPear4down = (bigsma_avgPR >= 0.25 and bigsma_avgPR < 0.5)
BigPear5down = (bigsma_avgPR >= 0.5 and bigsma_avgPR < 0.65)
BigPear6down = (bigsma_avgPR >= 0.65 and bigsma_avgPR < 0.7)
BigPear7down = (bigsma_avgPR >= 0.7 and bigsma_avgPR < 0.75)
BigPear8down = (bigsma_avgPR >= 0.75 and bigsma_avgPR < 0.8)
BigPear9down = (bigsma_avgPR >= 0.8)
Weighting:
If BigPear1up is true, 1 point is added; if BigPear2up is true, 2 points are added; and so on up to 9 points from BigPear9up.
Total Score:
The positive score (posScoreBigPear) is the sum of these weighted conditions.
Similarly, there is a negative score (negScoreBigPear) that is calculated using a mirrored set of conditions (named BigPear1down to BigPear9down), each contributing a negative weight (from -1 to -9).
In essence, the BigPear score tells you—in a weighted cumulative way—where the longer-term correlation average falls relative to predefined thresholds.
2. Pear Score
What It Represents: This category uses the immediate average of the Pearson correlations (avgPR) rather than a longer-term smoothed version. It reflects a more current picture of the market’s correlation behavior.
How It’s Calculated:
Conditions: There are nine conditions defined for the “up” scenario (named Pear1up through Pear9up), which partition the range of avgPR into intervals. For instance:
Pear1up = (avgPR > -0.2 and avgPR <= 0)
Pear2up = (avgPR > -0.4 and avgPR <= -0.2)
Pear3up = (avgPR > -0.5 and avgPR <= -0.4)
Pear4up = (avgPR > -0.6 and avgPR <= -0.5)
Pear5up = (avgPR > -0.65 and avgPR <= -0.6)
Pear6up = (avgPR > -0.7 and avgPR <= -0.65)
Pear7up = (avgPR > -0.75 and avgPR <= -0.7)
Pear8up = (avgPR > -0.8 and avgPR <= -0.75)
Pear9up = (avgPR > -1 and avgPR <= -0.8)
There are nine conditions defined for the “down” scenario (named Pear1down through Pear9down), which partition the range of avgPR into intervals. For instance:
Pear1down = (avgPR >= 0 and avgPR < 0.2)
Pear2down = (avgPR >= 0.2 and avgPR < 0.4)
Pear3down = (avgPR >= 0.4 and avgPR < 0.5)
Pear4down = (avgPR >= 0.5 and avgPR < 0.6)
Pear5down = (avgPR >= 0.6 and avgPR < 0.65)
Pear6down = (avgPR >= 0.65 and avgPR < 0.7)
Pear7down = (avgPR >= 0.7 and avgPR < 0.75)
Pear8down = (avgPR >= 0.75 and avgPR < 0.8)
Pear9down = (avgPR >= 0.8 and avgPR <= 1)
Weighting:
Each condition has an associated weight, such as 0.9 for Pear1up, 1.9 for Pear2up, and so on, up to 9 for Pear9up.
Sum up :
Pear1up = 0.9
Pear2up = 1.9
Pear3up = 2.9
Pear4up = 3.9
Pear5up = 4.99
Pear6up = 6
Pear7up = 7
Pear8up = 8
Pear9up = 9
Total Score:
The positive score (posScorePear) is the sum of these values for each condition that returns true.
A corresponding negative score (negScorePear) is calculated using conditions for when avgPR falls on the positive side, with similar weights in the negative direction.
This score quantifies the current correlation reading by translating its relative level into a numeric score through a weighted sum.
3. Trendpear Score
What It Represents: The Trendpear score is more dynamic as it compares the current avgPR with its short-term moving average (sma_avgPR / 14 periods ) and also considers its relationship with an even longer moving average (bigsma_avgPR / 100 periods). It is meant to capture the trend or momentum in the correlation behavior.
How It’s Calculated:
Conditions: Nine conditions (from Trendpear1up to Trendpear9up) are defined to check:
Whether avgPR is below, equal to, or above sma_avgPR by different margins;
Whether it is trending upward (i.e., it is higher than its previous value).
Here are the rules
Trendpear1up = (avgPR <= sma_avgPR -0.2) and (avgPR >= avgPR )
Trendpear2up = (avgPR > sma_avgPR -0.2) and (avgPR <= sma_avgPR -0.07) and (avgPR >= avgPR )
Trendpear3up = (avgPR > sma_avgPR -0.07) and (avgPR <= sma_avgPR -0.03) and (avgPR >= avgPR )
Trendpear4up = (avgPR > sma_avgPR -0.03) and (avgPR <= sma_avgPR -0.02) and (avgPR >= avgPR )
Trendpear5up = (avgPR > sma_avgPR -0.02) and (avgPR <= sma_avgPR -0.01) and (avgPR >= avgPR )
Trendpear6up = (avgPR > sma_avgPR -0.01) and (avgPR <= sma_avgPR -0.001) and (avgPR >= avgPR )
Trendpear7up = (avgPR >= sma_avgPR) and (avgPR >= avgPR ) and (avgPR <= bigsma_avgPR)
Trendpear8up = (avgPR >= sma_avgPR) and (avgPR >= avgPR ) and (avgPR >= bigsma_avgPR -0.03)
Trendpear9up = (avgPR >= sma_avgPR) and (avgPR >= avgPR ) and (avgPR >= bigsma_avgPR)
Weighting:
The weights here are not linear. For example, the lightest condition may add 0.1 point, whereas the most extreme condition (e.g., when avgPR is not only above the moving average but also reaches a high proportion relative to bigsma_avgPR) might add as much as 90 points.
Trendpear1up = 0.1
Trendpear2up = 0.2
Trendpear3up = 0.3
Trendpear4up = 0.4
Trendpear5up = 0.5
Trendpear6up = 0.69
Trendpear7up = 7
Trendpear8up = 8.9
Trendpear9up = 90
Total Score:
The positive score (posScoreTrendpear) is the sum of the weights from all conditions that are satisfied.
A negative counterpart (negScoreTrendpear) exists similarly for when the trend indicates a downward bias.
Trendpear integrates both the level and the direction of change in the correlations, giving a strong numeric indication when the market starts to diverge from its short-term average.
4. Deviation Score
What It Represents: The “Écart” score quantifies how far the asset’s price deviates from the boundaries defined by the regression channels. This metric can indicate if the price is excessively deviating—which might signal an eventual reversion—or confirming a breakout.
How It’s Calculated:
Conditions: For each channel (with at least seven channels contributing to the scoring from the provided code), there are three levels of deviation:
First tier (EcartXup): Checks if the price is below the upper boundary but above a second boundary.
Second tier (EcartXup2): Checks if the price has dropped further, between a lower and a more extreme boundary.
Third tier (EcartXup3): Checks if the price is below the most extreme limit.
Weighting:
Each tier within a channel has a very small weight for the lowest severities (for example, 0.0001 for the first tier, 0.0002 for the second, 0.0003 for the third) with weights increasing with the channel index.
First channel : 0.0001 to 0.0003 (very short term)
Second channel : 0.001 to 0.003 (short term)
Third channel : 0.01 to 0.03 (short mid term)
4th channel : 0.1 to 0.3 ( mid term)
5th channel: 1 to 3 (long mid term)
6th channel : 10 to 30 (long term)
7th channel : 100 to 300 (very long term)
Total Score:
The overall positive score (posScoreEcart) is the sum of all the weights for conditions met among the first, second, and third tiers.
The corresponding negative score (negScoreEcart) is calculated similarly (using conditions when the price is above the channel boundaries), with the weights being the same in magnitude but negative in sign.
This layered scoring method allows the indicator to reflect both minor and major deviations in a gradated and cumulative manner.
Example :
Score + = 321.0001
Score - = -0.111
The asset price is really overextended in long term view, not for mid term & short term expect the in the very short term.
Score + = 0.0033
Score - = -1.11
The asset price is really extended in short term view, not for mid term (even a bit underextended) & long term is neutral
5. Slope Score
What It Represents: The Slope score captures the trend direction and steepness of the regression channels. It reflects whether the regression line (and hence the underlying trend) is sloping upward or downward.
How It’s Calculated:
Conditions:
if the slope has a uptrend = 1
if the slope has a downtrend = -1
Weighting:
First channel : 0.0001 to 0.0003 (very short term)
Second channel : 0.001 to 0.003 (short term)
Third channel : 0.01 to 0.03 (short mid term)
4th channel : 0.1 to 0.3 ( mid term)
5th channel: 1 to 3 (long mid term)
6th channel : 10 to 30 (long term)
7th channel : 100 to 300 (very long term)
The positive slope conditions incrementally add weights from 0.0001 for the smallest positive slopes to 100 for the largest among the seven checks. And negative for the downward slopes.
The positive score (posScoreSlope) is the sum of all the weights from the upward slope conditions that are met.
The negative score (negScoreSlope) sums the negative weights when downward conditions are met.
Example :
Score + = 111
Score - = -0.1111
Trend is up for longterm & down for mid & short term
The slope score therefore emphasizes both the magnitude and the direction of the trend as indicated by the regression channels, with an intentional asymmetry that flags strong downtrends more aggressively.
Summary
For each category—BigPear, Pear, Trendpear, Écart, and Slope—the indicator evaluates a defined set of conditions. Each condition is a binary test (true/false) based on different thresholds or comparisons (for example, comparing the current value to a moving average or a channel boundary). When a condition is true, its assigned weight is added to the cumulative score for that category. These individual scores, both positive and negative, are then displayed in a table, making it easy for the trader to see at a glance where the market stands according to each analytical dimension.
This comprehensive, weighted approach allows the indicator to encapsulate several layers of market information into a single set of scores, aiding in the identification of potential trading opportunities or market reversals.
5. Practical Use and Application
How to Use the Indicator:
Interpreting the Signals:
On your chart, observe the following components:
The individual correlation curves and their average, plotted with visual thresholds;
Visual markers (such as emojis and shape markers) that signal potential oversold or overbought conditions
The summary table that aggregates the scores from each category, offering a quick glance at the market’s state.
Trading Alerts and Decisions: Set your TradingView alerts through the alertcondition functions provided by the indicator. This way, you receive immediate notifications when critical conditions are met, allowing you to react as soon as the market reaches key levels. This tool is especially beneficial for advanced traders who want to combine multiple technical dimensions to optimize entry and exit points with a confluence of signals.
Conclusion and Additional Insights
In summary, this advanced indicator innovatively combines multi-scale Pearson correlation analysis (via multiple linear regressions) with robust regression channel analysis. It offers a deep and nuanced view of market dynamics by delivering clear visual signals and a comprehensive numerical summary through a built-in score table.
Combine this indicator with other tools (e.g., oscillators, moving averages, volume indicators) to enhance overall strategy robustness.
AD Pro//@version=5
indicator("AD Pro", overlay=true)
// === Inputs
atrLen = input.int(14, "ATR Length")
factor = input.float(0.7, "Factor")
slMultiplier = input.float(2.0, "SL Multiplier")
// Volatility Filter Input
atrFilterStrength = input.float(1.0, "Volatility Threshold (x Avg ATR)", step=0.1, minval=0.1)
// Min % Price Change Filter
enableMinMove = input.bool(true, "Enable Min % Price Change Filter")
lookbackBars = input.int(20, "Lookback Bars")
minMovePct = input.float(0.005, "Min % Price Change", step=0.001, minval=0)
// TP Buy colors
tp1BuyColor = input.color(color.lime, "TP1 Buy Color")
tp2BuyColor = input.color(color.green, "TP2 Buy Color")
tp3BuyColor = input.color(color.teal, "TP3 Buy Color")
// TP Sell colors
tp1SellColor = input.color(color.fuchsia, "TP1 Sell Color")
tp2SellColor = input.color(color.red, "TP2 Sell Color")
tp3SellColor = input.color(color.maroon, "TP3 Sell Color")
// SL colors
slBuyColor = input.color(color.blue, "SL Buy Color")
slSellColor = input.color(color.blue, "SL Sell Color")
// === Indicator Calculations
atr = ta.atr(atrLen)
avgATR = ta.sma(atr, 50)
atrCondition = atr > avgATR * atrFilterStrength
priceChange = math.abs(close - close ) / close
priceMoveOK = priceChange > minMovePct
priceChangeCondition = not enableMinMove or priceMoveOK
volatilityOK = atrCondition and priceChangeCondition
// === UT Bot Logic
src = close
var float trailPrice = na
var bool dirLong = true
longStop = src - factor * atr
shortStop = src + factor * atr
if na(trailPrice)
trailPrice := longStop
dirLong := true
else
if dirLong
trailPrice := math.max(trailPrice, longStop)
dirLong := src > trailPrice
else
trailPrice := math.min(trailPrice, shortStop)
dirLong := src > trailPrice
rawBuy = dirLong and not dirLong
rawSell = not dirLong and dirLong
// Apply Volatility Filter
buySignal = rawBuy and volatilityOK
sellSignal = rawSell and volatilityOK
// === Entry & Label Storage
var float entryPrice = na
var bool lastSignalIsBuy = na
var label tp1Lbl = na
var label tp2Lbl = na
var label tp3Lbl = na
var label slLbl = na
var line tp1Line = na
var line tp2Line = na
var line tp3Line = na
var line slLine = na
if buySignal or sellSignal
if not na(tp1Lbl)
label.delete(tp1Lbl)
if not na(tp2Lbl)
label.delete(tp2Lbl)
if not na(tp3Lbl)
label.delete(tp3Lbl)
if not na(slLbl)
label.delete(slLbl)
if not na(tp1Line)
line.delete(tp1Line)
if not na(tp2Line)
line.delete(tp2Line)
if not na(tp3Line)
line.delete(tp3Line)
if not na(slLine)
line.delete(slLine)
entryPrice := close
lastSignalIsBuy := buySignal
tp1 = entryPrice + (buySignal ? 1 : -1) * atr
tp2 = entryPrice + (buySignal ? 2 : -2) * atr
tp3 = entryPrice + (buySignal ? 3 : -3) * atr
sl = entryPrice - (buySignal ? 1 : -1) * factor * atr * slMultiplier
tp1Lbl := label.new(bar_index, tp1, "TP1 " + str.tostring(tp1, format.mintick),
style=label.style_label_right,
color=buySignal ? tp1BuyColor : tp1SellColor,
textcolor=color.black)
tp2Lbl := label.new(bar_index, tp2, "TP2 " + str.tostring(tp2, format.mintick),
style=label.style_label_right,
color=buySignal ? tp2BuyColor : tp2SellColor,
textcolor=color.white)
tp3Lbl := label.new(bar_index, tp3, "TP3 " + str.tostring(tp3, format.mintick),
style=label.style_label_right,
color=buySignal ? tp3BuyColor : tp3SellColor,
textcolor=color.white)
slLbl := label.new(bar_index, sl, "SL " + str.tostring(sl, format.mintick),
style=label.style_label_right,
color=buySignal ? slBuyColor : slSellColor,
textcolor=color.white)
tp1Line := line.new(bar_index, tp1, bar_index + 1, tp1,
color=buySignal ? tp1BuyColor : tp1SellColor, style=line.style_dashed)
tp2Line := line.new(bar_index, tp2, bar_index + 1, tp2,
color=buySignal ? tp2BuyColor : tp2SellColor, style=line.style_dashed)
tp3Line := line.new(bar_index, tp3, bar_index + 1, tp3,
color=buySignal ? tp3BuyColor : tp3SellColor, style=line.style_dashed)
slLine := line.new(bar_index, sl, bar_index + 1, sl,
color=buySignal ? slBuyColor : slSellColor, style=line.style_dashed)
// === Plot Signals
plotshape(buySignal, title="Buy", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// === Alerts
alertcondition(buySignal, title="Buy Alert", message="Buy Signal!")
alertcondition(sellSignal, title="Sell Alert", message="Sell Signal!")
Close Difference Histogram with EMA SD Bands and LinesIndicator for the NSI system.
Possible use on the 3D timeframe for BTC.
A+ Trade Checklist (Table Only)This is the only A+ trading checklist you'll ever need.
Let me know if you'd like anything added!
If you want to help my journey USDT address is below :)
Network
BNB Smart Chain
0x539c59b98b6ee346072dd2bafbf9418dad475dbc
Follow my insta:
@liviupircalabu10
Customizable Alligator (Pane)Trend indicators that give you best signal. After Crossing indicated short term trend change.
Trend Persistence Counter (TPC) by riskcipher🧭 Trend Persistence Counter (TPC) – A Simple Price Action Trend Duration Tool
Trend Persistence Counter (TPC) is a lightweight indicator that counts how long a trend persists after a breakout.
It is entirely based on price action, without using any moving averages or smoothing. The goal is to give a simple, rule-based view of trend continuity.
🧠 How It Works (Logic Overview)
This indicator switches between two modes: bullish and bearish.
If close > previous high, the counter enters bullish mode, and starts at +1
While in bullish mode:
If close >= previous low → continue the uptrend → +1 each bar
If close < previous low → trend ends → reset to 0, switch to bearish mode
If close < previous low, the counter enters bearish mode, and starts at -1
While in bearish mode:
If close <= previous high → continue the downtrend → -1 each bar
If close > previous high → trend ends → reset to 0, switch to bullish mode
This provides a bar-by-bar count of trend persistence based on whether price holds structure.
🎯 Use Cases
Track how long a trend continues after a breakout
Quickly detect when trend structure breaks
Help visually filter “strong” vs “weak” moves
Build logic-based alerts (e.g., trend continues for N bars)
🔍 Why Use This Instead of Traditional Indicators?
This is not meant to replace moving averages or trend filters.
But it offers some advantages for those who prefer structure-based logic:
Feature TPC
Based on Price Action ✅ Yes
Uses Lagging Filters ❌ No moving average or smoothing
Trend Duration Measurement ✅ Counts valid consecutive moves
Complexity ⚪ Very simple and transparent
It’s a simple concept and easy to understand, but still useful when combined with other tools or visualized on its own.
⚙️ Technical Notes
Works on any timeframe or instrument
The value is positive during bullish persistence, negative during bearish
Value resets to 0 when trend structure breaks
All logic is calculated bar-by-bar, in real time
✅ Example Usage Ideas
Highlight candles when TPC value crosses a certain threshold (e.g., strong breakout continuation)
Use the zero-cross as a potential reversal warning
Filter trend signals in your existing strategies
Relative Strength MA ConfluenceThis indicator highlights price candles when two custom moving averages of relative strength vs a benchmark (e.g., SPY or BTC) are both trending positively.
Full confluence: Occurs when the asset's relative strength is above both a short- and long-term MA (default: 21 & 50).
Green candles and a triangle-up icon mark when full confluence begins.
Red triangle-down marks when confluence is lost.
🔧 All settings — including MA type (SMA or EMA), lengths, benchmark symbol, and visual toggles — are fully customizable.
Ideal for swing traders seeking strong trend confirmation based on outperformance relative to a benchmark.
HMA Crossover with Reversed EMA(200) & 0.2% SLSimple HMA cross over strategy with EMA200 and SL0.2% it works only with BTCUSD at 3min time frame
Forex Session Levels + Dashboard (AEST)This is the only indicator you will EVER need for the breakthrough and retest strategy.
Follow me on IG for more trading tips!
@LiviuPircalabu10