RSI STRATEGY WITH TRENDLINE & BUY SELL SIGNALSCore Concepts:
* Relative Strength Index (RSI):
* The RSI is a momentum oscillator that measures the speed and change of price movements.
* It oscillates between 0 and 100.
* Typically, RSI values above 70 are considered overbought, and values below 30 are considered oversold.
* We use the RSI to identify potential reversals and overbought/oversold conditions.
* Trendlines:
* Trendlines are lines drawn on a chart to connect a series of price highs (downtrend) or lows (uptrend).
* They help identify the prevailing trend's direction and potential support/resistance levels.
* Trendlines are used to confirm the signals generated by the RSI.
RSI Strategy with Trendline Confirmation:
This strategy aims to combine the momentum insights of the RSI with the trend confirmation provided by trendlines.
Buy Signal:
* RSI Oversold: The RSI dips below a specified oversold level (e.g., 30).
* Uptrend Confirmation:
* An uptrend line is drawn connecting a series of rising lows.
* The price breaks above the uptrend line, or the price bounces from the uptrend line.
* RSI Crossover: The RSI crosses back above the oversold level, indicating a potential upward momentum shift.
* Buy Entry: Enter a long position when all three conditions are met.
Sell Signal:
* RSI Overbought: The RSI rises above a specified overbought level (e.g., 70).
* Downtrend Confirmation:
* A downtrend line is drawn connecting a series of falling highs.
* The price breaks below the downtrend line, or the price bounces from the downtrend line.
* RSI Crossover: The RSI crosses back below the overbought level, indicating a potential downward momentum shift.
* Sell Entry: Enter a short position when all three conditions are met.
TradingView Indicator
Chỉ báo và chiến lược
MACD STRATEJİ esat6606A sophisticated MACD (Moving Average Convergence Divergence) indicator with advanced signal generation and protection mechanisms. Built with proprietary algorithms for enhanced accuracy and security.
. Visual Indicators
• White line: Primary MACD line
• Yellow line: Signal line
• Histogram: Trend strength visualization
• Green/Red coloring: Trend direction
• Triangle markers: Confirmed signals
• Green Triangle: Bullish signal confirmation
• Color Changes: Trend strength and direction
• Histogram: Momentum visualization
Auto TrendLines [TradingFinder] Support Resistance Signal Alerts🔵 Introduction
The trendline is one of the most essential tools in technical analysis, widely used in financial markets such as Forex, cryptocurrency, and stocks. A trendline is a straight line that connects swing highs or swing lows and visually indicates the market’s trend direction.
Traders use trendlines to identify price structure, the strength of buyers and sellers, dynamic support and resistance zones, and optimal entry and exit points.
In technical analysis, trendlines are typically classified into three categories: uptrend lines (drawn by connecting higher lows), downtrend lines (formed by connecting lower highs), and sideways trends (moving horizontally). A valid trendline usually requires at least three confirmed touchpoints to be considered reliable for trading decisions.
Trendlines can serve as the foundation for a variety of trading strategies, such as the trendline bounce strategy, valid breakout setups, and confluence-based analysis with other tools like candlestick patterns, divergences, moving averages, and Fibonacci levels.
Additionally, trendlines are categorized into internal and external, and further into major and minor levels, each serving unique roles in market structure analysis.
🔵 How to Use
Trendlines are a key component in technical analysis, used to identify market direction, define dynamic support and resistance zones, highlight strategic entry and exit points, and manage risk. For a trendline to be reliable, it must be drawn based on structural principles—not by simply connecting two arbitrary points.
🟣 Selecting Pivot Types Based on Trend Direction
The first step is to determine the market trend: uptrend, downtrend, or sideways.
Then, choose pivot points that match the trend type :
In an uptrend, trendlines are drawn by connecting low pivots, especially higher lows.
In a downtrend, trendlines are formed by connecting high pivots, specifically lower highs.
It is crucial to connect pivots of the same type and structure to ensure the trendline is valid and analytically sound.
🟣 Pivot Classification
This indicator automatically classifies pivot points into two categories :
Major Pivots :
MLL : Major Lower Low
MHL : Major Higher Low
MHH : Major Higher High
MLH : Major Lower High
These define the primary structure of the market and are typically used in broader structural analysis.
Minor Pivots :
mLL: minor Lower Low
mHL: minor Higher Low
mHH: minor Higher High
mLH: minor Lower High
These are used for drawing more precise trendlines within corrective waves or internal price movements.
Example : In a downtrend, drawing a trendline from an MHH to an mHH creates structural inconsistency and introduces noise. Instead, connect points like MHL to MHL or mLH to mLH for a valid trendline.
🟣 Drawing High-Precision Trendlines
To ensure a reliable trendline :
Use pivots of the same classification (Major with Major or Minor with Minor).
Ensure at least three valid contact points (three touches = structural confirmation).
Draw through candles with the least deviation (choose wicks or bodies based on confluence).
Preferably draw from right to left for better alignment with current market behavior.
Use parallel lines to turn a single trendline into a trendline zone, if needed.
🟣 Using Trendlines for Trade Entries
Bounce Entry: When price approaches the trendline and shows signs of reversal (e.g., a reversal candle, divergence, or support/resistance), enter in the direction of the trend with a logical stop-loss.
Breakout Entry: When price breaks through the trendline with strong momentum and a confirmation (such as a retest or break of structure), consider trading in the direction of the breakout.
🟣 Trendline-Based Risk Management
For bounce entries, the stop-loss is placed below the trendline or the last pivot low (in an uptrend).
For breakout entries, the stop-loss is set behind the breakout candle or the last structural level.
A broken trendline can also act as an exit signal from a trade.
🟣 Combining Trendlines with Other Tools (Confluence)
Trendlines gain much more strength when used alongside other analytical tools :
Horizontal support and resistance levels
Moving averages (such as EMA 50 or EMA 200)
Fibonacci retracement zones
Candlestick patterns (e.g., Engulfing, Pin Bar)
RSI or MACD divergences
Market structure breaks (BoS / ChoCH)
🔵 Settings
Pivot Period : This defines how sensitive the pivot detection is. A higher number means the algorithm will identify more significant pivot points, resulting in longer-term trendlines.
Alerts
Alert :
Enable or disable the entire alert system
Set a custom alert name
Choose how often alerts trigger (every time, once per bar, or on bar close)
Select the time zone for alert timestamps (e.g., UTC)
Each trendline type supports two alert types :
Break Alert : Triggered when price breaks the trendline
React Alert : Triggered when price reacts or bounces off the trendline
These alerts can be independently enabled or disabled for all trendline categories (Major/Minor, Internal/External, Up/Down).
Display :
For each of the eight trendline types, you can control :
Whether to show or hide the line
Whether to delete the previous line when a new one is drawn
Color, line style (solid, dashed, dotted), extension direction (e.g., right only), and width
Major lines are typically thicker and more opaque, while minor lines appear thinner and more transparent.
All settings are designed to give the user full control over the appearance, behavior, and alert system of the indicator, without requiring manual drawing or adjustments.
🔵 Conclusion
A trendline is more than just a line on the chart—it is a structural, strategic, and flexible tool in technical analysis that can serve as the foundation for understanding price behavior and making trading decisions. Whether in trending markets or during corrections, trendlines help traders identify market direction, key zones, and high-potential entry and exit points with precision.
The accuracy and effectiveness of a trendline depend on using structurally valid pivot points and adhering to proper market logic, rather than relying on guesswork or personal bias.
This indicator is built to solve that exact problem. It automatically detects and draws multiple types of trendlines based on actual price structure, separating them into Major/Minor and Internal/External categories, and respecting professional analytical principles such as pivot type, trend direction, and structural location.
ICT FVG & Swing Detector Basic by Trader RiazICT FVG & Swing Detector Basic by Trader Riaz
Unlock Precision Trading with the Ultimate Fair Value Gap (FVG) and Swing Detection Tool!
Developed by Trader Riaz , the ICT FVG and Swing Detector Basic is a powerful Pine Script indicator designed to help traders identify key market structures with ease. Whether you're a day trader, swing trader, or scalper, this indicator provides actionable insights by detecting Bullish and Bearish Fair Value Gaps (FVGs) and Swing Highs/Lows on any timeframe. Perfect for trading forex, stocks, crypto, and more on TradingView!
Key Features:
1: Bullish and Bearish FVG Detection
- Automatically identifies Bullish FVGs (highlighted in green) and Bearish FVGs (highlighted in red) to spot potential reversal or continuation zones.
- Displays FVGs as shaded boxes with a dashed midline at 70% opacity, making it easy to see the midpoint of the gap for precise entries and exits.
- Labels are placed inside the FVG boxes at the extreme right for clear visibility.
2: Customizable FVG Display
- Control the number of Bullish and Bearish FVGs displayed on the chart with user-defined inputs (fvg_bull_count and fvg_bear_count).
- Toggle the visibility of Bullish and Bearish FVGs with simple checkboxes (show_bull_fvg and show_bear_fvg) to declutter your chart.
3: Swing High and Swing Low Detection
- Detects Swing Highs (blue lines) and Swing Lows (red lines) to identify key market turning points.
- Labels are positioned at the extreme right edge of the lines for better readability and alignment.
- Customize the number of Swing Highs and Lows displayed (swing_high_count and swing_low_count) to focus on the most recent market structures.
4: Fully Customizable Display
- Toggle visibility for Swing Highs and Lows (show_swing_high and show_swing_low) to suit your trading style.
- Adjust the colors of Swing High and Low lines (swing_high_color and swing_low_color) to match your chart preferences.
5: Clean and Efficient Design
- Built with Pine Script v6 for optimal performance on TradingView.
- Automatically removes older FVGs and Swing points when the user-defined count is exceeded, keeping your chart clean and focused.
- Labels are strategically placed to avoid clutter while providing clear information.
Why Use This Indicator?
Precision Trading: Identify high-probability setups with FVGs and Swing points, commonly used in Smart Money Concepts (SMC) and Institutional Trading strategies.
User-Friendly: Easy-to-use inputs allow traders of all levels to customize the indicator to their needs.
Versatile: Works on any market (Forex, Stocks, Crypto, Commodities) and timeframe (1M, 5M, 1H, 4H, Daily, etc.).
Developed by Trader Riaz: Backed by the expertise of Trader Riaz, a seasoned trader dedicated to creating tools that empower the TradingView community.
How to Use:
- Add the Custom FVG and Swing Detector to your chart on TradingView.
- Adjust the input settings to control the number of FVGs and Swing points displayed.
- Toggle visibility for Bullish/Bearish FVGs and Swing Highs/Lows as needed.
- Use the identified FVGs and Swing points to plan your trades, set stop-losses, and target key levels.
Ideal For:
- Traders using Smart Money Concepts (SMC), Price Action, or Market Structure strategies.
- Those looking to identify liquidity grabs, imbalances, and trend reversals.
- Beginners and advanced traders seeking a reliable tool to enhance their technical analysis.
Happy trading!
RSI3M3+ v.1.8RSI3M3+ v.1.8 Indicator
This script is an advanced trading indicator based on Walter J. Bressert's cycle analysis methodology, combined with an RSI (Relative Strength Index) variation. Let me break it down and explain how it works.
Core Concepts
The RSI3M3+ indicator combines:
A short-term RSI (3-period)
A 3-period moving average to smooth the RSI
Bressert's cycle analysis principles to identify optimal trading points
RSI3M3+ Indicator VisualizationImage Walter J. Bressert's Cycle Analysis Concepts
Walter Bressert was a pioneer in cycle analysis trading who believed markets move in cyclical patterns that can be measured and predicted. His key principles integrated into this indicator include:
Trading Cycles: Markets move in cycles with measurable time spans from low to low
Timing Bands: Projected periods when the next cyclical low or high is anticipated
Oscillator Use: Using oscillators like RSI to confirm cycle position
Entry/Exit Rules: Specific rules for trade entry and exit based on cycle position
Key Parameters in the Script
Basic RSI Parameters
Required bars: Minimum number of bars needed (default: 20)
Overbought region: RSI level considered overbought (default: 70)
Oversold region: RSI level considered oversold (default: 30)
Bressert-Specific Parameters
Cycle Detection Length: Lookback period for cycle identification (default: 30)
Minimum/Maximum Cycle Length: Expected cycle duration in days (default: 15-30)
Buy Line: Lower threshold for buy signals (default: 40)
Sell Line: Upper threshold for sell signals (default: 60)
How the Indicator Works
RSI3M3 Calculation:
Calculates a 3-period RSI (sRSI)
Smooths it with a 3-period moving average (sMA)
Cycle Detection:
Identifies bottoms: When the RSI is below the buy line (40) and starting to turn up
Identifies tops: When the RSI is above the sell line (60) and starting to turn down
Records these points to calculate cycle lengths
Timing Bands:
Projects when the next cycle bottom or top should occur
Creates visual bands on the chart showing these expected time windows
Signal Generation:
Buy signals occur when the RSI turns up from below the oversold level (30)
Sell signals occur when the RSI turns down from above the overbought level (70)
Enhanced by Bressert's specific timing rules
Bressert's Five Trading Rules (Implemented in the Script)
Cycle Timing: The low must be 15-30 market days from the previous Trading Cycle bottom
Prior Top Validation: A Trading Cycle high must have occurred with the oscillator above 60
Oscillator Behavior: The oscillator must drop below 40 and turn up
Entry Trigger: Entry is triggered by a rise above the price high of the upturn day
Protective Stop: Place stop slightly below the Trading Cycle low (implemented as 99% of bottom price)
How to Use the Indicator
Reading the Chart
Main Plot Area:
Green line: 3-period RSI
Red line: 3-period moving average of the RSI
Horizontal bands: Oversold (30) and Overbought (70) regions
Dotted lines: Buy line (40) and Sell line (60)
Yellow vertical bands: Projected timing windows for next cycle bottom
Signals:
Green up arrows: Buy signals
Red down arrows: Sell signals
Trading Strategy
For Buy Signals:
Wait for the RSI to drop below the buy line (40)
Look for an upturn in the RSI from below this level
Enter the trade when price rises above the high of the upturn day
Place a protective stop at 99% of the Trading Cycle low
For Sell Signals:
Wait for the RSI to rise above the sell line (60)
Look for a downturn in the RSI from above this level
Consider exiting or taking profits when a sell signal appears
Alternative exit: When price moves below the low of the downturn day
Cycle Timing Enhancement:
Pay attention to the yellow timing bands
Signals occurring within these bands have higher probability of success
Signals outside these bands may be less reliable
Practical Tips for Using RSI3M3+
Timeframe Selection:
The indicator works best on daily charts for intermediate-term trading
Can be used on weekly charts for longer-term position trading
On intraday charts, adjust cycle lengths accordingly
Market Applicability:
Works well in trending markets with clear cyclical behavior
Less effective in choppy, non-trending markets
Consider additional indicators for trend confirmation
Parameter Adjustment:
Different markets may have different natural cycle lengths
You may need to adjust the min/max cycle length parameters
Higher volatility markets may need wider overbought/oversold levels
Trade Management:
Enter trades when all Bressert's conditions are met
Use the protective stop as defined (99% of cycle low)
Consider taking partial profits at the projected cycle high timing
Advanced Techniques
Multiple Timeframe Analysis:
Confirm signals with the same indicator on higher timeframes
Enter in the direction of the larger cycle when smaller and larger cycles align
Divergence Detection:
Look for price making new lows while RSI makes higher lows (bullish)
Look for price making new highs while RSI makes lower highs (bearish)
Confluence with Price Action:
Combine with support/resistance levels
Use with candlestick patterns for confirmation
Consider volume confirmation of cycle turns
This RSI3M3+ indicator combines the responsiveness of a short-term RSI with the predictive power of Bressert's cycle analysis, offering traders a sophisticated tool for identifying high-probability trading opportunities based on market cycles and momentum shifts.
THANK YOU FOR PREVIOUS CODER THAT EFFORT TO CREATE THE EARLIER VERSION THAT MAKE WALTER J BRESSERT CONCEPT IN TRADINGVIEW @ADutchTourist
AlphaFlow: Oscillator PanelAlphaFlow is an advanced oscillator-based suite built for traders who value multi-timeframe confluence, divergence detection, and early momentum shifts. Inspired by the legendary trader CryptoFace, this tool incorporates several of his visual methods while expanding with unique logic and layered decision tools.
🔍 What Makes It Unique:
Dynamic Decision Table that analyzes both LTF (Lower Timeframe) and HTF (Higher Timeframe) data for confluence
Smart OBV Divergence Logic with “Smart Accumulation” and “Smart Distribution” alerts, not just price/volume disagreement
VWAP-MACD Normalized Histogram for early reversal bias
BBWP Squeeze Detection with momentum shift alerts
WaveTrend Crossovers and RSI Pressure for intraday setups
🔁 Multi-Timeframe Capability:
CryptoFace always emphasizes watching other timeframes. This tool lets you view HTF RSI, WaveTrend, BBWP, and VWAP-MACD bias — right inside a live table — so you never lose track of the bigger picture.
💡 Ideal Timeframe Pairs: (user can input timeframe of choice)
1min LTF with 5min HTF → for scalping
5min LTF with 1hr HTF → for intraday swings
15min LTF with 4hr HTF → for macro setups
4 hr LTF with 1 day to 3 day HTF→ Macro Swing
3 day LTF 1 week to 1 month HTF→ Macro Bias/DCA
🧠 This is more than a mash-up — it’s a complete oscillator dashboard tailored for those who trade with intent and structure. Each input and table metric was designed to work together as a system, not just merged indicators.
📈 Use the built-in visual trigger plots, alert logic, and table summaries to make faster, confluence-based decisions.
🤝 Tribute: Much respek to CryptoFace for his multi-timeframe discipline and use of momentum flow. This script draws inspiration from that approach while building new layers of utility and insight.
Econometrica by [SS]This is Econometrica, an indicator that aims to bridge a big gap between the resources available for analysis of fundamental data and its impact on tickers and price action.
I have noticed a general dearth of available indicators that offer insight into how fundamentals impact a ticker and provide guidance on how they these economic factors influence ticker behaviour.
Enter Econometrica. Econometrica is a math based indicator that aims to co-integrate and model indicator price action in relation to critical economic metrics.
Econometrica supports the following US based economic data:
CPI
Non-Farm Payroll
Core Inflation
US Money Supply
US Central Bank Balance Sheet
GDP
PCE
Let's go over the functions of Econometrica.
Creating a Regression Cointegrated Model
The first thing Econometrica does is creates a co-integrated regression, as you see in the main chart, predicting ticker value ranges from fundamental economic data.
You can visualize this in the main chart above, but here are some other examples:
SPY vs Core Inflation:
BA vs PCE:
QQQ vs US Balance Sheet:
The band represents the anticipated range the ticker should theoretically fall in based on the underlying economic value. The indicator will breakdown the relationship between the economic indicator and the ticker more precisely. In the images above, you can see how there are some metrics provided, including Stationairty, lagged correlation, Integrated Correlation and R2. Let's discuss these very briefly:
Stationarity: checks to ensure that the relationship between the economic indicator and ticker is stationary. Stationary data is important for making unbiased inferences and projections, so having data that is stationary is valuable.
Lagged Correlation: This is a very interesting metric. Lagged correlation means whether there is a delay in the economic indicator and the response of the ticker. Typically, you will observed a lagged correlation between an economic indicator and price of a ticker, as it can take some time for economic changes to reach the market. This lagged correlation will provide you with how long it takes for the economic indicator to catch up with the ticker in months.
Integrated Correlation: This metric tells you how good of a fit the regression bands are in relation to the ticker price. A higher correlation, means the model is better at consistent and accurate information about the anticipated range for the ticker in relation to the economic indicator.
R2: Provides information on the variance and degree of model fit. A high R2 value means that the model is capable of explaining a large amount of variance between the economic indicator and the ticker price action.
Explaining the Relationship
Owning to the fact that the indicator is a bit on the mathy side (it has to be to do this kind of task), I have included ability for the indicator to explain and make suggestions based on the underlying data. It can assess the model's fit and make suggestions for tweaking. It can also explain the implications of the data being presented in the model.
Here is an example with QQQ and the US Balance Sheet:
This helps to simplify and interpret the results you are looking at.
Forecasting the Economic Indicator
In addition to assessing the economic indicator's impact on the ticker, the indicator is also capable of forecasting out the economic indicator over the next 25 releases.
Here is an example of the CPI forecast:
Overall use of the indicator
The indicator is meant to bridge the gap between Technical Analysis and Fundamental Analysis.
Any trader who is attune to fundamentals would benefit from this, as this provides you with objective data on how and to what extent fundamental and economic data impacts tickers.
It can help affirm hypothesis and dispel myths objectively.
It also omits the need from having to perform these types of analyses outside of Tradingview (i.e. in excel, R or Python), as you can get the data in just a few licks of enabling the indicator.
Conclusion
I have tried to make this indicator as user friendly as possible. Though it uses a lot of math, it is fairly straight forward to interpret.
The band plotted can be considered the fair market value or FMV of the ticker based on the underlying economic data, provided the indicator tells you that the relationship is significant (and it will blatantly give you this information verbatim, you don't have to interpret the math stuff).
This is US economic data only. It does not pull economic data from other countries. You can absolutely see how US economic data impacts other markets like the TSX, BANKNIFTY, NIFTY, DAX etc. but the indicator is only pulling US economic data.
That is it!
I hope you enjoy it and find this helpful!
Thanks everyone and safe trades as always 🚀🚀🚀
Strategy Stats [presentTrading]Hello! it's another weekend. This tool is a strategy performance analysis tool. Looking at the TradingView community, it seems few creators focus on this aspect. I've intentionally created a shared version. Welcome to share your idea or question on this.
█ Introduction and How it is Different
Strategy Stats is a comprehensive performance analytics framework designed specifically for trading strategies. Unlike standard strategy backtesting tools that simply show cumulative profits, this analytics suite provides real-time, multi-timeframe statistical analysis of your trading performance.
Multi-timeframe analysis: Automatically tracks performance metrics across the most recent time periods (last 7 days, 30 days, 90 days, 1 year, and 4 years)
Advanced statistical measures: Goes beyond basic metrics to include Information Coefficient (IC) and Sortino Ratio
Real-time feedback: Updates performance statistics with each new trade
Visual analytics: Color-coded performance table provides instant visual feedback on strategy health
Integrated risk management: Implements sophisticated take profit mechanisms with 3-step ATR and percentage-based exits
BTCUSD Performance
The table in the upper right corner is a comprehensive performance dashboard showing trading strategy statistics.
Note: While this presentation uses Vegas SuperTrend as the underlying strategy, this is merely an example. The Stats framework can be applied to any trading strategy. The Vegas SuperTrend implementation is included solely to demonstrate how the analytics module integrates with a trading strategy.
⚠️ Timeframe Limitations
Important: TradingView's backtesting engine has a maximum storage limit of 10,000 bars. When using this strategy stats framework on smaller timeframes such as 1-hour or 2-hour charts, you may encounter errors if your backtesting period is too long.
Recommended Timeframe Usage:
Ideal for: 4H, 6H, 8H, Daily charts and above
May cause errors on: 1H, 2H charts spanning multiple years
Not recommended for: Timeframes below 1H with long history
█ Strategy, How it Works: Detailed Explanation
The Strategy Stats framework consists of three primary components: statistical data collection, performance analysis, and visualization.
🔶 Statistical Data Collection
The system maintains several critical data arrays:
equityHistory: Tracks equity curve over time
tradeHistory: Records profit/loss of each trade
predictionSignals: Stores trade direction signals (1 for long, -1 for short)
actualReturns: Records corresponding actual returns from each trade
For each closed trade, the system captures:
float tradePnL = strategy.closedtrades.profit(tradeIndex)
float tradeReturn = strategy.closedtrades.profit_percent(tradeIndex)
int tradeType = entryPrice < exitPrice ? 1 : -1 // Direction
🔶 Performance Metrics Calculation
The framework calculates several key performance metrics:
Information Coefficient (IC):
The correlation between prediction signals and actual returns, measuring forecast skill.
IC = Correlation(predictionSignals, actualReturns)
Where Correlation is the Pearson correlation coefficient:
Correlation(X,Y) = (nΣXY - ΣXY) / √
Sortino Ratio:
Measures risk-adjusted return focusing only on downside risk:
Sortino = (Avg_Return - Risk_Free_Rate) / Downside_Deviation
Where Downside Deviation is:
Downside_Deviation = √
R_i represents individual returns, T is the target return (typically the risk-free rate), and n is the number of observations.
Maximum Drawdown:
Tracks the largest percentage drop from peak to trough:
DD = (Peak_Equity - Trough_Equity) / Peak_Equity * 100
🔶 Time Period Calculation
The system automatically determines the appropriate number of bars to analyze for each timeframe based on the current chart timeframe:
bars_7d = math.max(1, math.round(7 * barsPerDay))
bars_30d = math.max(1, math.round(30 * barsPerDay))
bars_90d = math.max(1, math.round(90 * barsPerDay))
bars_365d = math.max(1, math.round(365 * barsPerDay))
bars_4y = math.max(1, math.round(365 * 4 * barsPerDay))
Where barsPerDay is calculated based on the chart timeframe:
barsPerDay = timeframe.isintraday ?
24 * 60 / math.max(1, (timeframe.in_seconds() / 60)) :
timeframe.isdaily ? 1 :
timeframe.isweekly ? 1/7 :
timeframe.ismonthly ? 1/30 : 0.01
🔶 Visual Representation
The system presents performance data in a color-coded table with intuitive visual indicators:
Green: Excellent performance
Lime: Good performance
Gray: Neutral performance
Orange: Mediocre performance
Red: Poor performance
█ Trade Direction
The Strategy Stats framework supports three trading directions:
Long Only: Only takes long positions when entry conditions are met
Short Only: Only takes short positions when entry conditions are met
Both: Takes both long and short positions depending on market conditions
█ Usage
To effectively use the Strategy Stats framework:
Apply to existing strategies: Add the performance tracking code to any strategy to gain advanced analytics
Monitor multiple timeframes: Use the multi-timeframe analysis to identify performance trends
Evaluate strategy health: Review IC and Sortino ratios to assess predictive power and risk-adjusted returns
Optimize parameters: Use performance data to refine strategy parameters
Compare strategies: Apply the framework to multiple strategies to identify the most effective approach
For best results, allow the strategy to generate sufficient trade history for meaningful statistical analysis (at least 20-30 trades).
█ Default Settings
The default settings have been carefully calibrated for cryptocurrency markets:
Performance Tracking:
Time periods: 7D, 30D, 90D, 1Y, 4Y
Statistical measures: Return, Win%, MaxDD, IC, Sortino Ratio
IC color thresholds: >0.3 (green), >0.1 (lime), <-0.1 (orange), <-0.3 (red)
Sortino color thresholds: >1.0 (green), >0.5 (lime), <0 (red)
Multi-Step Take Profit:
ATR multipliers: 2.618, 5.0, 10.0
Percentage levels: 3%, 8%, 17%
Short multiplier: 1.5x (makes short take profits more aggressive)
Stop loss: 20%
Supply & Demand Zones
_____________________________________________________________________
Supply and Demand Zones
This indicator displays valid Supply and Demand zones on any chart and timeframe, using dynamically updating visuals. Users can see the moment that zones become validated, used, and then invalidated during live sessions. It is sleek, lightweight, and offers a feature-rich settings panel that allows customization of how each element appears and functions. Zones can enhance the probability of successful trades by locating areas that are most likely to contain resting orders of Supply or Demand, which are needed for price reversals.
Disclaimer
____________________
Like all indicators, this can be a valuable tool when incorporated into a comprehensive, risk-based trading system.
Supply and Demand is not the same thing as Support and Resistance.
Trading based on price hitting a zone without understanding which zones are of higher quality and which are of lower quality (only discernible with a trained human eye) will yield poor results.
Supply and Demand works well as a system and even better when added to an existing one. However, like all effective trading techniques, it requires diligent study, practice, and repetition to become proficient. This is an indicator for use with Supply and Demand concepts, not a replacement for learning them.
Features
____________________
Once a valid candle sequence is confirmed, a box will appear that displays the zone over the precise zone range. At 50% zone penetration, a zone becomes used , and at 100% it becomes invalidated . Each of these zone classifications changes the behavior of the zone on the chart immediately. The settings panel offers custom colors for Supply , Demand , Used , and Invalidated zone types.
Borders : The subtle border colors can be changed or hidden.
Boxes or Bases : Advanced users can opt to hide zone boxes and instead display small, subtle tags over base candle groups. This allows for more customizable selection over what is displayed and how.
Max Zones and Hide Invalidated :
There are limitations on how many objects TradingView allows at once. Because of this, once zones go from used to invalidated , they are hidden (deleted) by default. This allows the zones index to be allocated to display more valid , usable zones instead. If a user prefers to keep invalidated zones visible, they can be enabled; however, this will result in showing more recent zones for fewer historical zones.
All zones share one pool, so if you allow fifty max zones, forty-five might be supply while five might be demand on a big sell-off trend. You will always see the most recent zones, regardless of type or status.
It’s up to you how much clutter you want on your screen and how much improved load time you want - but once loaded, zone creation and function are always instantaneous.
Load Time
____________________
Load time refers to the time it takes from when you switch tickers or timeframes before the zones are displayed initially. There is zero lag in the dynamic function and minimal load time, regardless of settings. However, if you are a fine-tuner or multi-screener, the number of Max Zones displayed is the only major variable affecting load time.
I run everything at Max when I develop. When I trade, I run mine at 25 max zones because I change timeframes often and want a very quick display of zones when I do. I have invalidated hidden, and simply enable it if I want to check an old zone. This gives me more zones than I need and reduces the load time to right where I like it.
Thresholds
____________________
It is recommended to leave these as the default.
Base Body Threshold : Determines the maximum ratio of a candle’s body to wick before invalidation. Default (50% or 0.5). A higher number loosens thresholds, resulting in more zones being displayed.
Unrequire 2nd FT if LO is Strong & Strength Multiplier :
The standard logic sequence requires two Follow-Through candles. Under some strong price movement, Leg-Out candles can make an explosive directional move from a base, making a convincing argument for supply and demand perfectly at work, if not for a single Follow-Through candle instead of two.
By enabling this feature, you can tell the script to ignore second Follow-Through candles, if and only if, the Leg-Out candle's range is (Strength) X the base range. exceeds the range of the Base by a factor of X (Strength). ie: At 5x, this would require a Leg-Out range to be 500% the range of the Base.
If enabled and the Leg-Out is not strong enough, the default logic kicks in, and a second follow-through candle will validate the zone as per usual. This loosens thresholds overall and should result in more zones.
Recommended Usage
____________________
Form a thesis using your primary trend trading system (eg: Elliott Wave, Structure Reversal, TheStrat, et al) to identify locations of a pullback for a long or short entry.
Identify a pullback area using your system, then use this indicator to find a high-quality zone on your chosen timeframe.
Once located, draw your own channel over the indicator's zone box. Start on 1m, check for zones, 2m, 3m, and so on. When you see a zone you like, recreate it; thus, when finished, you can see every timeframe’s highest-quality zones that you created, regardless of what timeframe you switch to. Tip: Be selective
To make the process faster, save a channel design in settings for “Demand” and one for “Supply”, then you can quickly get through this process in less than a minute with practice.
Optional: Use additional methods (eg: Fibonacci retracements, Elliott Wave Theory, Anchored VWAPs) to find congruent confirmation.
Version 1.0
____________________
No known bugs remain from the closed beta.
In Development
____________________
Powerful combination zones occur when standard zone sequences are extended with additional levels of demand or supply by adding more conditionals to the state machine logic. Got this mostly working in a dev version and it adds minimal extra resources. Set aside to polish a clean standard 1.0 for release first, but now displaying these extended zones is my top priority for next version.
MTF support is essentially working in a dev copy, but adds resources. Not sure if it is in the spirit of price action being the primary focus of a chart for serious traders, rather than indicators. If there is demand for it, I'll consider it.
Additional Threshold Settings
Thanks!
____________________
Thank you for your interest in my work. This was a personal passion project of mine, and I was delighted it turned out better than I hoped, so I decided to share it. If you have any comments, bugs, or suggestions, please leave them here, or you can find me on Twitter or Discord.
@ ContrarianIRL
Open-source developer for over 25 years
Quantum Price SignalQuantum Price Signal
This indicator combines square root price analysis with advanced technical filters to identify high-probability trading opportunities. Designed for practical use in real market conditions, it provides both visual signals and a comprehensive dashboard to enhance trading decisions.
Core Technology:
The Quantum Price Signal uses mathematical relationships based on square root price levels to identify key zones where price tends to react. These levels have proven to be powerful areas for reversals and continuations across multiple timeframes.
Detailed Usage Guide:
Signal Interpretation:
Green Triangle (Buy): Appears below candles at potential support levels. Look for these at market bottoms and pullbacks in uptrends
Red Triangle (Sell): Appears above candles at potential resistance levels. Most effective at market tops and rallies in downtrends
Dashboard Elements:
Buy/Sell Signal Quality: Shows relative strength of potential setups
Higher values indicate stronger signals with better probability
Use as comparative measure between different signals
Market Noise: Indicates market choppiness/volatility
Lower readings suggest cleaner price action and more reliable signals
Higher readings indicate choppy conditions requiring wider stops
Trend Direction: Overall market bias
Align trades with this direction for highest probability
Counter-trend trades require stronger signal quality
Near Square Root Level: Confirms price at significant mathematical level
"Yes" reading significantly strengthens any signal
These mathematical levels often act as strong support/resistance
Current Signal: Active trading recommendation
Shows most recent valid signal type
Use to quickly identify the indicator's bias
Practical Trading Applications:
Swing Trading Strategy:
Look for signals at key support/resistance levels
Confirm with trend direction on dashboard
Enter on close of signal candle
Place stops beyond recent swing points
Target next significant level or 1:2 risk-reward
Trend-Following Method:
Only take signals in direction of "Trend Direction"
Wait for pullbacks to Square Root levels
Require "Yes" for Near Square Root Level reading
Enter when signal appears at these levels
Trail stops using prior swing points
Reversal Detection:
Watch for signals against prevailing trend
Must have "Near Square Root Level" showing "Yes"
Confirm with pattern like engulfing or hammer
Look for divergence in momentum indicators
Use tighter stops as these are higher risk trades
Multiple Timeframe Approach:
Identify trend on higher timeframe
Look for signals on lower timeframe
Only take signals that align with higher timeframe trend
Add to position on additional signals in same direction
Exit when signal appears in opposite direction
Volume Confirmation Enhancement:
Check volume on signal candles
Stronger signals should have above-average volume
Low volume signals have higher failure rate
Volume increase on breakouts confirms strength
Volume decline near levels suggests potential failure
This indicator works best when combined with proper risk management and sound technical analysis principles. Use it as a decision support tool rather than an automated system, and always consider the broader market context when making trading decisions.RetryClaude can make mistakes. Please double-check responses.
Long Short domThis is Magic Indicator. Providing you Лонг Short Position Dominance. And Background i Show you Quint Trend.
Money printer machine update - By Farshid Ehsani]Ready to take your trend-following strategy to the next level?
Say hello to Zero Lag Trend Signals, a precision-engineered Pine Script™ indicator designed to eliminate lag and provide rapid trend insights across multiple timeframes. 💡 This tool blends zero-lag EMA (ZLEMA) logic with volatility bands, trend-shift markers, and dynamic alerts. The result? Timely signals with minimal noise for clearer decision-making, whether you're trading intraday or on longer horizons
How It Works 🧠
The script calculates the zero-lag EMA (ZLEMA) by compensating for data lag, giving traders more responsive moving averages. It checks for volatility shifts using the Average True Range (ATR), multiplied to create upper and lower deviation bands. If the price crosses above or below these bands, it marks the start of new trends. Additionally, the indicator aggregates trend data from up to five configurable timeframes and displays them in a neat summary table. This helps you confirm trends across different intervals—ideal for multi-timeframe analysis. The visual signals include upward and downward arrows on the chart, denoting potential entries or exits when trends align across timeframes. Traders can use these cues to make well-timed trades and avoid lag-related pitfalls.
Croak Indicator Trend Filtered🐸 Croak Indicator – Trend-Filtered Market Structure Visualizer
🔍 Overview
The Croak Indicator is a visual market structure tool designed to highlight potential reversal zones by identifying key swing highs and lows. It uses price action and trend context to help traders understand possible turning points in the market.
This version introduces a trend filter using Exponential Moving Averages (EMA), so:
🐸 Frogs (bottom signals) only appear in uptrends
🦊 Foxes (top signals) only appear in downtrends
This helps reduce noise and keeps the indicator aligned with the prevailing trend.
🧠 How It Works
Detects significant swing points based on local highs/lows over a lookback period (Pattern Length).
Adds a trend filter using EMA 21 and EMA 50 to improve signal quality.
A structure score (Frog Jump Score) optionally appears in the corner to show how symmetrical the recent market swings have been.
The script uses bar-based historical analysis and repaints past signals as more candles form.
⚠️ Important Note on Repainting
This is a repainting indicator, meaning it uses future price action to confirm swing points. Signals may change or disappear as new bars form. It is not intended for real-time signal execution, but rather as a visual aid for understanding market structure in hindsight.
⚙️ Key Features
✅ Plots intuitive frog and fox icons for bullish/bearish swing points.
✅ Includes a trend filter using EMA crossover logic.
✅ Optional scoring table for structure geometry confidence.
✅ Useful for swing traders, market structure learners, and chart artists.
⚠️ Disclaimer
This script is provided for educational and informational purposes only. It does not constitute financial advice. Always do your own analysis and apply risk management when trading.
DSS Indicator📌 DSS Indicator – Double Smoothed Stochastic
📌 Name: DSS Indicator – Double Smoothed Stochastic
📌 Author:
📌 Platform: TradingView (Pine Script v5)
📌 Category: Oscillators, Momentum, Smart Money
📌 Description
The DSS (Double Smoothed Stochastic) Indicator is an advanced version of the classic Stochastic Oscillator, applying double smoothing to filter out market noise and generate more precise buy and sell signals.
✅ Key Features:
🔹 Double smoothed stochastic for improved accuracy
🔹 Buy and sell signals displayed as dots (green = buy, red = sell)
🔹 Option to display signals on the price chart and in a separate indicator panel
🔹 Adjustable smoothing period settings
🔹 Ideal for Smart Money and Swing Trading strategies
📌 How to Use?
🔹 Buy Signal (green dot) → When DSS exits the oversold area (<20)
🔹 Sell Signal (red dot) → When DSS exits the overbought area (>80)
🔹 Users can enable/disable signals on the price chart and/or in the indicator panel
💡 Tip: The DSS Indicator works best when combined with other technical analysis tools such as Fibonacci, EMA, MACD, and Smart Money Concepts (SMC).
📌 User Settings
🔸 Period 1 (default 21) – first smoothing
🔸 Period 2 (default 18) – second smoothing
🔸 Show signals on price chart (ON/OFF)
🔸 Show signals in indicator panel (ON/OFF)
👉 Add the DSS Indicator to your TradingView and test it with your strategy! 🚀
Daily Weekly Monthly Yearly Opens/Highs/LowsThe "Daily Weekly Monthly Yearly Opens" indicator is a versatile tool designed to enhance your trading analysis by plotting the opening prices of various timeframes directly onto your charts. By displaying the current daily, weekly, monthly, and yearly opening levels, this indicator helps traders identify key support and resistance zones, facilitating more informed trading decisions.
**Key Features:**
- **Comprehensive Timeframe Coverage:** The indicator plots opening prices for daily, weekly, monthly, and yearly periods, providing a clear view of significant market levels across multiple timeframes.
- **Dynamic Display:** To maintain chart clarity, the indicator intelligently displays:
- Daily opens on intraday timeframes.
- Weekly opens on timeframes less than weekly.
- Monthly opens on timeframes less than monthly.
- **Customizable Visuals:** Users can adjust the color and style of the plotted lines to match their chart preferences, ensuring a personalized and clear visual experience.
- **Historical Reference:** An option to display previous period opens allows traders to analyze how current price action interacts with past opening levels, offering insights into potential support and resistance areas.
- **Alert Functionality:** Set up alerts to be notified when the price crosses any of the plotted opening levels, enabling timely responses to market movements.
Multi-Timeframe EMAsMulti Timeframe EMA's
The 'Multi-Timeframe EMA Band Comparison' indicator is a tool designed to analyze trend direction across multiple timeframes using Exponential Moving Averages. it calculates the 50, 100, and 200 period EMAs for fiver user defined timeframes and compares their relationships to provide a visual snapshot of bullish or bearish momentum.
How it Works:
EMA Calculations: For each selected timeframe, the indicator computes the 50, 100, and 200 period EMAs based on the closing price.
Band Comparisons: Three key relationships are evaluated:
50 EMA vs 100 EMA
100 EMA vs 200 EMA
50 EMA vs 200 EMA
Scoring System: Each comparison is assigned a score:
🟢 (Green Circle): The shorter EMA is above the longer EMA, signaling bullish momentum.
🔴 (Red Circle): The shorter EMA is below the longer EMA, signaling bearish momentum.
⚪️ (White Circle): The EMAs are equal or data is unavailable (rare).
Average Score:
An overall average score is calculated across all 15 comparisons ranging from 1 to -1, displayed with two decimal places and color coded.
Customization:
This indicator is fully customizable from the timeframe setting to the color of the table. The only specific part that is not changeable is the EMA bands.
Cleop tradingcleop trading It uses a combination of RSI, MACD, and Bollinger Bands to generate buy/sell signals.
The signals are categorized as "normal" and "strong" based on different conditions.
Best Asia Range IndicatorUse this to map out the high or low of the day.
if im buying i will wait for a sweep of asia low
if im selling i wait for sweep of asia high
Trend V2 (2025 Colorized) /w filterSame trend candle logic from before, but with a linear regression slope filter. The idea is going long when both are green and short when both are red. Simple and seems to be pretty effective.
CVD Divergence Insights📘 CVD Divergence Insights – by Colicoid
Pine Script v6 | Volume Delta Divergence Oscillator with Spike Detection
⸻
🔍 Overview
CVD Divergence Insights is a volume-aware oscillator and divergence spike detector that helps you spot smart money activity, absorption, failed pressure, and hidden strength or weakness — even when price action alone gives little away.
It works by comparing normalized Cumulative Volume Delta (CVD) against normalized price movement, and optionally applying a volume-weighting layer to highlight when aggressive participation is truly behind the divergence. The result is a dynamic visual tool that identifies tension in the market, and helps you trade based on how that tension resolves.
⸻
🧠 Core Concept
• When price moves one way and CVD moves another, it reflects imbalance between aggression and result.
• Divergence is not a trigger — it’s a build-up of pressure.
• The real edge lies in the resolution of that pressure.
• Optional volume-weighting helps you ignore noise and focus on high-conviction moves only.
⸻
⚙️ How It Works
1. CVD Calculation
CVD is generated using lower-timeframe delta volume (buy vs. sell pressure), accumulated per bar.
2. Oscillator
A normalized divergence between the smoothed CVD and smoothed price.
3. Volume Weighting (optional)
Emphasizes divergences occurring on higher-than-normal volume, deprioritizes low-volume noise.
4. Signal Line (optional)
A short EMA of the oscillator to help track momentum shifts (hidden by default).
5. Divergence Spikes
Statistical spike detection using standard deviation — green/red dots highlight unusually large divergence activity.
⸻
🎛️ Inputs
Anchor Period
Higher timeframe where the CVD is accumulated and processed.
Lower Timeframe
Optional override for granularity of buy/sell volume data.
SMA Length
Used for smoothing both price and CVD before divergence is calculated.
Volume Weighted?
Enables adaptive weighting based on relative volume size.
Volume Normalization Length
Lookback period used to define what is “normal” volume.
Divergence Spike Threshold
StdDev-based threshold to detect abnormally large divergences.
Signal Line Length
Controls the EMA smoothing of the optional signal line (hidden by default).
⸻
📈 Trade Setup Example: Hidden Bullish Divergence
1. Price forms a higher low, but CVD forms a lower low — hidden bullish divergence.
2. This shows aggressive sellers are trying, but price is resilient — likely absorption.
3. You wait for a "convergent signal bar":
• A bullish candle with strong structure or body
• Confirmed by CVD starting to turn upward
4. That’s your trigger bar — the tension resolves upward.
⸻
🤝 Recommended Pairings
For best results, combine CVD Divergence Insights with the companion script:
🔗 Cumulative Volume Delta Line (also by Colicoid)
This lets you:
• See the raw CVD line and its SMA visually
• Spot standard and hidden divergences in price/CVD directly
• Use the Insights indicator to evaluate divergence quality and flag aggressive bull/bear behavior
• Use the same SMA length on both indicators for alignment
👉 Tip: To save screen space, drag the CVD Line indicator into the same panel as CVD Divergence Insights.
⸻
🧰 Why Use This?
• ✅ Catch absorption setups and failed pressure zones
• ✅ Filter out low-quality divergences using volume context
• ✅ Understand why price is hesitating or breaking out
• ✅ Add smart confirmation to breakout/reversal trades
• ✅ Align your execution with who’s actually in control
⸻
📎 Created by Colicoid
Built in Pine Script v6 for advanced price-volume analysis, with focus on effort vs result, market psychology, and smart money detection.
Multi-TF Support LevelsThe Multi-TF Support Levels indicator identifies and displays key support levels based on swing lows across three user-selected timeframes.
How it works:
Input Parameters:
Lookback Period (100) — historical depth to search for swing lows.
Timeframe 1-3 (15, 45, 240) — three timeframes (e.g., 15min, 45min, 4hr).
Logic:
For each timeframe, a swing low is detected: the lowest price within the lookback period that is also lower than the two preceding candles.
Support levels update dynamically when new swing lows are formed.
The most recent levels are plotted as horizontal cross marks (blue, red, green for each timeframe).
Purpose: Visualize significant support zones from multiple timeframes to identify confluent areas for trading decisions.
Индикатор Multi-TF Support Levels (Мультитаймфреймовые уровни поддержки) определяет и отображает ключевые уровни поддержки на основе минимумов свингов (swing lows) на трёх выбранных таймфреймах.
Как работает:
Входные параметры:
Lookback Period (100) — глубина анализа для поиска минимумов.
Timeframe 1-3 (15, 45, 240) — три таймфрейма (например, 15 минут, 45 минут, 4 часа).
Логика:
Для каждого таймфрейма определяется свинг-минимум: цена, которая является самой низкой за период lookback и ниже двух предыдущих свечей.
Уровни поддержки обновляются при появлении новых свинг-минимумов.
Последние актуальные уровни отображаются на графике в виде горизонтальных линий-крестиков (синий, красный, зелёный для каждого таймфрейма).
Цель: Визуализировать значимые уровни поддержки с разных таймфреймов для поиска зон "конфлюэнса".
Naveen SR Levels (with SR Alerts)Most accurate Sr levels to find major support resistance of any time frame