SMA Trend Spectrum [InvestorUnknown]The SMA Trend Spectrum indicator is designed to visually represent market trends and momentum by using a series of Simple Moving Averages (SMAs) to create a color-coded spectrum or heatmap. This tool helps traders identify the strength and direction of market trends across various time frames within one chart.
Functionality:
SMA Calculation: The indicator calculates multiple SMAs starting from a user-defined base period (Starting Period) and increasing by a specified increment (Period Increment). This creates a sequence of moving averages that span from short-term to long-term perspectives.
Trend Analysis: Each segment of the spectrum compares three SMAs to determine the market's trend strength: Bullish (color-coded green) when the current price is above all three SMAs. Neutral (color-coded purple) when the price is above some but not all SMAs. Bearish (color-coded red) when the price is below all three SMAs.
f_col(x1, x2, x3) =>
min = ta.sma(src, x1)
mid = ta.sma(src, x2)
max = ta.sma(src, x3)
c = src > min and src > mid and src > max ? bull : src > min or src > mid or src > max ? ncol : bear
Heatmap Visualization: The indicator plots these trends as a vertical spectrum where each row represents a different set of SMAs, forming a heatmap-like display. The color of each segment in the heatmap directly correlates with market conditions, providing an intuitive view of market sentiment.
Signal Smoothing: Users can choose to smooth the trend signal using either a Simple Moving Average (SMA), Exponential Moving Average (EMA), or leave it as raw data (Signal Smoothing). The length of smoothing can be adjusted (Smoothing Length). The signal is displayed in a scaled way to automatically adjust for the best visual experience, ensuring that the trend is clear and easily interpretable across different chart scales and time frames
Additional Features:
Plot Signal: Optionally plots a line representing the average trend across all calculated SMAs. This line helps in identifying the overall market direction based on the spectrum data.
Bar Coloring: Bars on the chart can be colored according to the average trend strength, providing a quick visual cue of market conditions.
Usage:
Trend Identification: Use the heatmap to quickly assess if the market is trending strongly in one direction or if it's in a consolidation phase.
Entry/Exit Points: Look for shifts in color patterns to anticipate potential trend changes or confirmations for entry or exit points.
Momentum Analysis: The gradient from bearish to bullish across the spectrum can be used to gauge momentum and potentially forecast future price movements.
Notes:
The effectiveness of this indicator can vary based on market conditions, asset volatility, and the chosen SMA periods and increments.
It's advisable to combine this tool with other technical indicators or fundamental analysis for more robust trading decisions.
Disclaimer: Past performance does not guarantee future results. Always use this indicator as part of a broader trading strategy.
אינדיקטורים ואסטרטגיות
Range Channel by Atilla YurtsevenThis script creates a dynamic channel around a user-selected moving average (MA). It calculates the relative difference between price and the MA, then finds the average of the positive differences and the negative differences separately. Using these averages, it plots upper and lower bands around the MA as well as a histogram-like oscillator to show when price moves above or below the average thresholds.
How It Works
Moving Average Selection
The indicator allows you to choose among multiple MA types (SMA, EMA, WMA, Linear Regression, etc.). Depending on your preference, it calculates the chosen MA for the selected lookback period.
Relative Difference Calculation
It then computes the percentage difference between the source (typically the closing price) and the MA. (diff = (src / ma - 1) * 100)
Positive & Negative Averages
- Positive differences are averaged and represent how far the price typically moves above the MA.
- Negative differences are similarly averaged for when price moves below the MA.
Range Channel & Oscillator
- The channel is plotted around the MA using the average positive and negative differences (Upper Edge and Lower Edge).
- The “Untrended” histogram plots the difference (diff). Green bars occur when price is above the MA on average, and red bars when below. Two additional lines mark the upper and lower average thresholds on this histogram.
How to Use
Identify Overbought/Oversold Zones: The upper edge can serve as a dynamic overbought level, while the lower edge can suggest potential oversold conditions. When the histogram approaches or crosses these levels, it may signal price extremes relative to its average movement.
Trend Confirmation: Compare price action relative to the channel. If price and the histogram consistently remain above the MA and upper threshold, it could indicate a stronger bullish trend. If they remain below, it might signal a prolonged bearish trend.
Entry/Exit Timings:
- Entry: Traders can look for moments when price breaks back inside the channel from an extreme, anticipating a mean reversion.
- Exit: Watching how price interacts with these dynamic edges can help define stop-loss or take-profit points.
Because these thresholds adapt over time based on actual price behavior, they can be more responsive than fixed-percentage bands. However, like all indicators, it’s most effective when used in conjunction with other technical and fundamental tools.
Disclaimer
This script is provided for educational and informational purposes only. It does not guarantee any specific outcome or profit. Use it at your own discretion and risk.
Trade smart, stay safe.
Atilla Yurtseven
Scalping Strategy RSI & ADXThis Pine Script implements a scalping strategy that leverages the Relative Strength Index (RSI) and the Average Directional Index (ADX) to identify short-term trading opportunities. The strategy is designed for traders who aim to profit from quick price movements in highly volatile markets.
Key Components:
RSI (Relative Strength Index):
RSI is used to identify overbought and oversold conditions in the market.
If RSI is below the oversold level (default: 30), the script generates a buy signal.
If RSI is above the overbought level (default: 70), the script generates a sell signal.
ADX (Average Directional Index):
ADX measures the strength of a trend.
The script only triggers buy or sell signals when ADX is above a specified threshold (default: 25), ensuring trades occur only in strong trending markets.
Combined Logic:
A buy condition is met when RSI is below the oversold level and ADX indicates a strong trend.
A sell condition is met when RSI is above the overbought level and ADX indicates a strong trend.
Inputs:
RSI Length: Period for RSI calculation (default: 14).
RSI Overbought Level: Threshold for overbought conditions (default: 70).
RSI Oversold Level: Threshold for oversold conditions (default: 30).
ADX Length: Period for ADX calculation (default: 14).
ADX Smoothing: Smoothing factor for ADX (default: 14).
ADX Threshold: Minimum value for ADX to consider a trend strong (default: 25).
Visual Signals:
Green upward arrows indicate buy signals.
Red downward arrows indicate sell signals.
Strategy Execution:
The script uses strategy.entry to open positions based on the defined conditions.
It plots RSI and ADX values for additional visual confirmation.
How to Use:
Apply this script to your TradingView chart.
Adjust the input parameters to suit your preferred market and timeframe.
Backtest the strategy on historical data to assess its performance.
Use in live markets with appropriate risk management measures.
This strategy is ideal for traders who prefer a systematic and rule-based approach to scalping. However, always test and validate the strategy before using it with real funds.
CandlestickThe indicator generates a table that offers a clear visualization of the historical return percentages for each candlestick pattern strategy over a specified time period. This table serves as an organized resource, serving as a launching point for in-depth research into candle formations. It may help to rectify any misconceptions surrounding candlestick patterns, refine trading approaches, and it could be foundation to make informed decisions in trading journey.
mr.crypto731mr.crypto731 is the user name of My Instagram
it's Enhanced MACD Indicator is a powerful tool designed to provide traders with visual signals for potential market entry and exit points based on the Moving Average Convergence Divergence (MACD) strategy. This customized indicator adds clear and creative strong buy and sell signals within the MACD panel, making it easier to identify key trading opportunities.
Key Features:
MACD Calculation:
Fast Length: 12
Slow Length: 26
Signal Smoothing: 9
The indicator calculates the MACD line, signal line, and histogram using these parameters.
Strong Buy Signal:
Triggered when the MACD line (green) crosses above the signal line (red) and the histogram is positive (above zero).
This signal is marked by a lime-colored triangle pointing up with the text "🚀".
Strong Sell Signal:
Triggered when the signal line (red) crosses above the MACD line (green) and the histogram is negative (below zero).
This signal is marked by a red-colored triangle pointing down with the text "🔻".
Visual Enhancements:
Signal Labels: Creative labels with emojis to highlight the strength of the signals.
Background Color: Highlights the background in lime for strong buy signals and red for strong sell signals to make them stand out.
Integration:
Plots all signals within the MACD indicator panel for clear visualization and easy interpretation.
Usage:
Buy Signal: Look for a strong buy signal when the MACD line crosses above the signal line and the histogram is positive.
Sell Signal: Look for a strong sell signal when the signal line crosses above the MACD line and the histogram is negative.
This enhanced MACD indicator is ideal for traders looking for a straightforward and visually appealing tool to identify potential trading opportunities based on MACD crossovers. Its clear signals and creative styling make it a valuable addition to any trading strategy.
EMA Crossover Buy/Sell Signals 29 decbuy when 20 ema crosses above 50 ema and sell when 20 ema crosses below 50 ema
Zero Lag Signals For Loop [QuantAlgo]Elevate your trend-following investing and trading strategy with Zero Lag Signals For Loop by QuantAlgo , a simple yet effective technical indicator that merges advanced zero-lag mechanism with adaptive trend analysis to bring you a fresh take on market momentum tracking. Its aim is to support both medium- to long-term investors monitoring broader market shifts and precision-focused traders seeking quality entries through its dual-focused analysis approach!
🟢 Core Architecture
The foundation of this indicator rests on its zero-lag implementation and dynamic trend assessment. By utilizing a loop-driven scoring system alongside volatility-based filtering, each market movement is evaluated through multiple historical lenses while accounting for current market conditions. This multi-layered approach helps differentiate between genuine trend movements and market noise across timeframe and asset classes.
🟢 Technical Foundation
Three distinct components of this indicator are:
Zero Lag EMA : An enhanced moving average calculation designed to minimize traditional lag effects
For Loop Scoring System : A comprehensive scoring mechanism that weighs current price action against historical contexts
Dynamic Volatility Analysis : A sophisticated ATR-based filter that adjusts signal sensitivity to market conditions
🟢 Key Features & Signals
The Zero Lag Signals For Loop provides market insights through:
Color-coded Zero Lag line that adapts to trend direction
Dynamic fills between price and Zero Lag basis for enhanced visualization
Trend change markers (L/S) that highlight potential reversal points
Smart bar coloring that helps visualize market momentum
Background color changes with vertical lines at significant trend shifts
Customizable alerts for both bullish and bearish reversals
🟢 Practical Usage Tips
Here's how you can get the most out of the Zero Lag Signals For Loop :
1/ Setup:
Add the indicator to your TradingView chart by clicking on the star icon to add it to your favorites ⭐️
Start with the default Zero Lag length for balanced sensitivity
Use the standard volatility multiplier for proper filtering
Keep the default loop range for comprehensive trend analysis
Adjust threshold levels based on your investing and/or trading style
2/ Reading Signals:
Watch for L/S markers - they indicate validated trend reversals
Pay attention to Zero Lag line color changes - they confirm trend direction
Monitor bar colors for additional trend confirmation
Configure alerts for trend changes in both bullish and bearish directions, ensuring you can act on significant technical developments promptly.
🟢 Pro Tips
Fine-tune the Zero Lag length based on your timeframe:
→ Lower values (20-40) for more responsive signals
→ Higher values (60-100) for stronger trend confirmation
Adjust volatility multiplier based on market conditions:
→ Increase multiplier in volatile markets
→ Decrease multiplier in stable trending markets
Combine with:
→ Volume analysis for trade validation
→ Multiple timeframe analysis for broader context
→ Other technical tools for comprehensive analysis
MomentumGridThis indicator provides a comprehensive view of key market dynamics using a combination of technical tools. It features:
- **VWAP (Volume Weighted Average Price):** A powerful indicator that shows the average price weighted by volume, helping traders identify trends and key price levels for the day.
- **EMA (Exponential Moving Average):** A popular trend-following indicator that highlights the smoothing of price data, making it easier to identify the direction of the market with a focus on more recent prices.
- **Supply and Demand Zones:** Visual markers of key levels where buying and selling pressure have historically been strong. These zones can help traders spot potential reversal points.
- **Volume Analysis:** Volume data displayed alongside price action to provide insights into the strength of price movements and potential market shifts.
This indicator combines these elements to help traders make more informed decisions by providing both trend-following and market structure insights. The VWAP and EMA serve as trend indicators, while the supply and demand zones highlight critical price levels, all supported by volume analysis.
Uptrick: Arbitrage OpportunityINTRODUCTION
This script, titled Uptrick: Arbitrage Monitor, is a Pine Script™ indicator that aims to help traders quickly visualize potential arbitrage scenarios across multiple cryptocurrency exchanges. Arbitrage, in general, involves taking advantage of price differences for the same asset across different trading platforms. By comparing market prices of the same symbol on two user-selected exchanges, as well as scanning a broader list of exchanges, this script attempts to signal areas where you might want to buy on one exchange and sell on another. It includes various graphical tools, calculations, and an optional Automated Detection signal feature, allowing users to incorporate more advanced data scanning into their trading decisions. Keep in mind that transaction fees must also be considered in real-world scenarios. These fees can negate potential profits and, in some cases, result in a net loss.
PURPOSE
The primary purpose of this indicator is to show potential percentage differences between the same cryptocurrency trading pairs on two different exchanges. This difference is displayed numerically, visually as a line chart, and it is also tested against user-defined thresholds. With the threshold in place, buy and sell signals can be generated. The script allows you to quickly gauge how significant a spread is between two exchanges and whether that spread surpasses a specified threshold. This is particularly useful for arbitrage trading, where an asset is bought at a lower price on one exchange and sold at a higher price on another, capitalizing on price discrepancies. By identifying these opportunities, traders can potentially secure profits across different markets.
WHY IT WAS MADE
This script was developed to help traders who frequently look for arbitrage opportunities in the fast-paced cryptocurrency market. Cryptocurrencies sometimes experience quick price divergences across different exchanges. By having an automated approach that compares and displays prices, traders can spend less time manually tracking price discrepancies and more time focusing on actual trading strategies. The script was also made with user customization in mind, allowing you to toggle an optional Automated-based approach and choose different moving average methods to smooth out the displayed price difference.
WHAT ARBITRAGE IS
Arbitrage is the practice of buying an asset on one market (or exchange) at a lower price and simultaneously selling it on another market where the price is higher, thus profiting from the price difference. In cryptocurrency markets, these price differentials can occur across multiple exchanges due to varying liquidity, trading volume, geographic factors, or market inefficiencies. Though sometimes small, these differences can be exploited for profit when approached methodically.
EXPLANATION OF INPUTS
The script includes a variety of user inputs that help tailor the indicator to your specific needs:
1. Compared Symbol 1: This is the primary symbol you want to track (for example, BTCUSDT). Make sure it's written in all capital and make sure that it's price from that exchange is available on Tradingview.
2. Compare Exchange 1: The first exchange on which the script will request pricing data for the chosen symbol.
3. Compared to Exchange: The second exchange, used for the comparison.
4. Opportunity Threshold (%): A percentage threshold that, when exceeded by the price difference, can trigger buy or sell signals.
5. Plot Style?: Allows you to choose between plotting the raw difference line or a moving average of that difference.
6. MA Type: Select among SMA, EMA, WMA, RMA, or HMA for your moving average calculation.
7. MA Length: The lookback period for the selected moving average.
8. Plot Buy/Sell Signals?: Enables or disables the plotting of arrows signaling potential buy or sell zones based on threshold crossovers.
9. Automated Detection?: Toggles an additional multi-exchange data scan feature that calculates the highest and lowest prices for the specified symbol across a predefined list of exchanges.
CALCULATIONS
At its core, the script calculates price1 and price2 using the request.security function to fetch close prices from two selected exchanges. The difference is measured as (price1 - price2) / price2 * 100. This results in a percentage that indicates how much higher or lower price1 is relative to price2. Additionally, the script calculates a slope for this difference, which helps color the line depending on whether it is trending up or down. If you choose the moving average option, the script will replace the raw difference data with one of several moving average calculations (SMA, EMA, WMA, RMA, or HMA).
The script also includes an iterative scan of up to 15 different exchanges for Automated detection, collecting the highest and lowest price across all those exchanges. If the Automated option is enabled, it compiles a potential recommendation: buy at the cheapest exchange price and sell at the most expensive one. The difference across all exchanges (allExDiffPercent) is calculated using (highestPriceAll - lowestPriceAll) / lowestPriceAll * 100.
WHAT AUTOMATED DETECTION SIGNAL DOES
If enabled, the Automated detection feature scans all 15 supported exchanges for the specified symbol. It then identifies the exchange with the highest price and the exchange with the lowest price. The script displays a recommended action: buy on the lowest-exchange price and sell on the highest-exchange price. While called “Automated,” it is essentially a multi-exchange data query that automates a portion of research by consolidating different price points. It does not replace thorough analysis or guaranteed execution; it simply provides an overview of potential extremes.
WHAT ALL-EX-DIFF IS
The variable allExDiffPercent is used to show the overall difference between the highest price and the lowest price found among the 15 pre-chosen exchanges. This figure can be useful for anyone wanting a big-picture view of how large the arbitrage spread might be across the broader market.
SIGNALS AND HOW THEY ARE GENERATED
The script provides two main modes of signal generation:
1. Raw Difference Mode: If the user chooses “Use Normal Line,” the script compares the percentage difference of the two selected exchanges (price1 and price2) to the user-defined threshold. When the difference crosses under the positive threshold, a sell signal is displayed (red arrow). Conversely, when the difference crosses above the negative threshold, a buy signal is displayed (green arrow).
2. Moving Average Mode: If the user selects “Use Moving Average,” the script instead references the moving average values (maValue). The signals fire under similar conditions but use the average line to gauge whether the threshold has been crossed.
HOW TO USE THE INDICATOR
1. Add the script to your chart in TradingView.
2. In the script’s settings panel, configure the symbol you wish to compare (for example, BTCUSDT), choose the two exchanges you want to evaluate, and set your desired threshold.
3. Optionally, pick a moving average type and length if you prefer a smoother representation of the difference.
4. Enable or disable buy/sell signals according to your preference.
5. If you’d like to see potential extremes among a broader list of exchanges, enable Automated Detection. Keep in mind that this feature runs additional security requests, so it might slow down performance on weaker devices or if you already have many scripts running.
EXCHANGES TO USE
The script currently supports up to 15 exchanges: BYBIT, BINANCE, MEXC, BLOFIN, BITGET, OKX, KUCOIN, COINBASE, COINEX, PHEMEX, POLONIEX, GATEIO, BITSTAMP, and KRAKEN. You can choose any two of these for direct comparison, and if you enable the Automated detection, it will attempt to query them all to find extremes in real time.
VISUALS
The exchanges and current prices & differences are all plotted in the table while the colored line represents the difference in the price. The two thresholds colored red are where signals are generated. A cross below the upper threshold is a sell signal and a cross above the lower threshold is a buy signal. In the line at the bottom, purple is a negative slope and aqua is a positive slope.
LIMITATIONS AND POTENTIAL PROBLEMS
If you enable too many visual elements such as signals, additional lines, and the Automated-based scanning table, you may find that your chart becomes cluttered, or text might overlap. One workaround is to remove and reapply the indicator to refresh its display. You may also want to reduce the number of displayed table rows by disabling some features if your chart becomes too crowded. Sometimes there might be an error that the price of an asset is not available on an exchange, to fix this, go and select another exchange to compare it to, or if it happens in Automated detection, choose a different asset, ideally more widely spread.
UNIQUENESS
This indicator stands out due to its multifaceted approach: it doesn’t just look at two exchanges but optionally scans up to 15 exchanges in real time, presenting users with a much broader view of the market. The dual-mode system (raw difference vs. moving average) allows for both immediate, unfiltered signals and smoother, noise-reduced signals depending on user preference. By default, it introduces dynamic visual cues through color changes when the slope of the difference transitions upward or downward. The optional Automated detection, while not a deep learning system, adds a functional intelligence layer by collating extreme price points from multiple exchanges in one place, thereby streamlining the manual research process. This combination of features gives the script a unique edge in the TradingView ecosystem, catering equally to novices wanting a straightforward approach and to advanced users looking for an aggregated multi-exchange analysis.
CONCLUSION
Uptrick: Arbitrage Monitor is a versatile and customizable Pine Script™ indicator that highlights price differences for a specified symbol between two user-selected exchanges. Through signals, threshold-based alerts, and optional Automated detection across multiple exchanges, it aims to support traders in identifying potential arbitrage opportunities quickly and efficiently. This script makes no guarantees of profitability but can serve as a valuable tool to add to your trading toolkit. Always use caution when implementing arbitrage strategies, and be mindful of market risks, exchange fees, and latency.
ADDITIONAL DISCLOSURES
This script is provided for educational and informational purposes only. It does not constitute financial advice or a guarantee of performance. Users are encouraged to conduct thorough research and consider the inherent risks of arbitrage trading. Market conditions can change rapidly, and orders may fail to execute at desired prices, especially when large price discrepancies attract competition from other traders.
GOLDEN BLOCK VER:4-newBlock indicator is based on breakdown.
When a candle closes above previous highest high or below previous lowest low a block is made.
When a candle closes below previous highest high or above previous lowest low the block continues and just high and low are updated.
This indicator is very useful for supply and demand strategy.
Have much profit with this indicator.
Ultra TrendlinesThis indicator automatically draws trendlines based on every pivot point, helping traders visualize key support and resistance levels. It dynamically adjusts as new pivots are detected and validates the trendlines against price movement.
Introduction
The Ultra Trendlines indicator is designed to help traders identify and track significant trendlines on their charts. By automatically detecting pivot points (both highs and lows), it draws trendlines that highlight key market movements. These trendlines are valuable for understanding the broader trend and for making informed trading decisions.
Detailed Description
The indicator analyzes price data to find pivot points highs and lows over a user-defined lookback period. Once a pivot is detected, it draws trendlines between the pivot points.
.........
Accuracy
To ensure accuracy, the indicator only keeps trendlines that are confirmed by price action. It checks if the price crosses the trendline and deletes invalid lines.
Additionally, it checks if the trendlines stay within predefined price thresholds, filtering out irrelevant lines that are too far from current price action.
The indicator also has an option to only show "rising lows" and "falling highs" trendlines, offering further precision in trend direction.
As new pivots are detected, older trendlines that fall outside the lookback period are removed, ensuring the chart remains clean.
.....
Style
The trendlines can extend forward (infinite and userdefined), backward, both or none. The lines are drawn with a customizable style (solid, dotted, or dashed), color, and width.
.........
Summary of Key Points
The indicator automatically detects pivot points (highs and lows) and draws trendlines based on them. It allows you to customize the style, color, and width of the trendlines. The indicator filters out invalid trendlines by checking if they are still relevant based on price action and price thresholds. Additionally, you can choose to only display rising lows and falling highs for more accurate trend analysis. It also removes outdated trendlines to keep the chart clean.
AdibXmos// © AdibXmos
//@version=5
indicator('Sood Indicator V2 ', overlay=true, max_labels_count=500)
show_tp_sl = input.bool(true, 'Display TP & SL', group='Techical', tooltip='Display the exact TP & SL price levels for BUY & SELL signals.')
rrr = input.string('1:2', 'Risk to Reward Ratio', group='Techical', options= , tooltip='Set a risk to reward ratio (RRR).')
tp_sl_multi = input.float(1, 'TP & SL Multiplier', 1, group='Techical', tooltip='Multiplies both TP and SL by a chosen index. Higher - higher risk.')
tp_sl_prec = input.int(2, 'TP & SL Precision', 0, group='Techical')
candle_stability_index_param = 0.5
rsi_index_param = 70
candle_delta_length_param = 4
disable_repeating_signals_param = input.bool(true, 'Disable Repeating Signals', group='Techical', tooltip='Removes repeating signals. Useful for removing clusters of signals and general clarity.')
GREEN = color.rgb(29, 255, 40)
RED = color.rgb(255, 0, 0)
TRANSPARENT = color.rgb(0, 0, 0, 100)
label_size = input.string('huge', 'Label Size', options= , group='Cosmetic')
label_style = input.string('text bubble', 'Label Style', , group='Cosmetic')
buy_label_color = input(GREEN, 'BUY Label Color', inline='Highlight', group='Cosmetic')
sell_label_color = input(RED, 'SELL Label Color', inline='Highlight', group='Cosmetic')
label_text_color = input(color.white, 'Label Text Color', inline='Highlight', group='Cosmetic')
stable_candle = math.abs(close - open) / ta.tr > candle_stability_index_param
rsi = ta.rsi(close, 14)
atr = ta.atr(14)
bullish_engulfing = close < open and close > open and close > open
rsi_below = rsi < rsi_index_param
decrease_over = close < close
var last_signal = ''
var tp = 0.
var sl = 0.
bull_state = bullish_engulfing and stable_candle and rsi_below and decrease_over and barstate.isconfirmed
bull = bull_state and (disable_repeating_signals_param ? (last_signal != 'buy' ? true : na) : true)
bearish_engulfing = close > open and close < open and close < open
rsi_above = rsi > 100 - rsi_index_param
increase_over = close > close
bear_state = bearish_engulfing and stable_candle and rsi_above and increase_over and barstate.isconfirmed
bear = bear_state and (disable_repeating_signals_param ? (last_signal != 'sell' ? true : na) : true)
round_up(number, decimals) =>
factor = math.pow(10, decimals)
math.ceil(number * factor) / factor
if bull
last_signal := 'buy'
dist = atr * tp_sl_multi
tp_dist = rrr == '2:3' ? dist / 2 * 3 : rrr == '1:2' ? dist * 2 : rrr == '1:4' ? dist * 4 : dist
tp := round_up(close + tp_dist, tp_sl_prec)
sl := round_up(close - dist, tp_sl_prec)
if label_style == 'text bubble'
label.new(bar_index, low, 'BUY', color=buy_label_color, style=label.style_label_up, textcolor=label_text_color, size=label_size)
else if label_style == 'triangle'
label.new(bar_index, low, 'BUY', yloc=yloc.belowbar, color=buy_label_color, style=label.style_triangleup, textcolor=TRANSPARENT, size=label_size)
else if label_style == 'arrow'
label.new(bar_index, low, 'BUY', yloc=yloc.belowbar, color=buy_label_color, style=label.style_arrowup, textcolor=TRANSPARENT, size=label_size)
label.new(show_tp_sl ? bar_index : na, low, 'TP: ' + str.tostring(tp) + ' SL: ' + str.tostring(sl), yloc=yloc.price, color=color.gray, style=label.style_label_down, textcolor=label_text_color)
if bear
last_signal := 'sell'
dist = atr * tp_sl_multi
tp_dist = rrr == '2:3' ? dist / 2 * 3 : rrr == '1:2' ? dist * 2 : rrr == '1:4' ? dist * 4 : dist
tp := round_up(close - tp_dist, tp_sl_prec)
sl := round_up(close + dist, tp_sl_prec)
if label_style == 'text bubble'
label.new(bear ? bar_index : na, high, 'SELL', color=sell_label_color, style=label.style_label_down, textcolor=label_text_color, size=label_size)
else if label_style == 'triangle'
label.new(bear ? bar_index : na, high, 'SELL', yloc=yloc.abovebar, color=sell_label_color, style=label.style_triangledown, textcolor=TRANSPARENT, size=label_size)
else if label_style == 'arrow'
label.new(bear ? bar_index : na, high, 'SELL', yloc=yloc.abovebar, color=sell_label_color, style=label.style_arrowdown, textcolor=TRANSPARENT, size=label_size)
label.new(show_tp_sl ? bar_index : na, low, 'TP: ' + str.tostring(tp) + ' SL: ' + str.tostring(sl), yloc=yloc.price, color=color.gray, style=label.style_label_up, textcolor=label_text_color)
alertcondition(bull or bear, 'BUY & SELL Signals', 'New signal!')
alertcondition(bull, 'BUY Signals (Only)', 'New signal: BUY')
alertcondition(bear, 'SELL Signals (Only)', 'New signal: SELL')
BUY & SELL CIPHER (ANDY CANE)Designed to detect and highlight potential trend reversals or momentum shifts in the market. It utilizes the WaveTrend Oscillator (WT) along with a custom RSI+MFI filter to generate actionable signals. Here's a breakdown of its features and functionality.
Green dots: Represent potential buy signals.
Red dots: Represent potential sell signals.
Twenty-Trend -Boxes (20 Trend)"The 20-Trend indicator is a comprehensive trend-following tool designed primarily for equity markets, focusing on identifying and tracking bullish trends. It integrates price channels, moving averages, volatility-based analysis, and volume dynamics to detect potential breakouts and pyramiding opportunities.
Key features include:
Volatility-based channels: Dynamic price channels calculated using ATR (Average True Range), adapting to market volatility.
Multi-timeframe trend detection: Offers a built-in overview of daily, weekly, and monthly trends for a complete market perspective.
Breakout detection: Identifies price action escaping resistance levels, signaling potential entries.
Pyramiding logic: Highlights opportunities to scale into positions with customizable thresholds for gains and maximum additions.
Visual aids: A "Boxes" system highlights price ranges, key support/resistance zones, and trend direction through intuitive color-coding.
Fully customizable settings: The indicator allows full adjustment of ATR length, price channel factor, box length, and filter channel settings.
While fully customizable, the recommended settings are ATR = 14, Boxes Length = 20, Factor = 2, and Filter Channel = 100.
Complementary tool: For efficient position sizing and risk management, this indicator pairs seamlessly with the Risk Management Table indicator, designed to optimize position control.
This indicator is best suited for trending stocks but can also be applied to other markets exhibiting strong directional movement. With its user-friendly settings, it adapts to various trading styles while maintaining a focus on bullish trends.
Note: This tool is optimized for tracking bullish trends and is not intended for shorting or bearish trend analysis."
Linear Signal-Based Strategy[Kopottaja]
Strategy Description for "Linear Signal-Based Strategy"
Key Features:
Linear Signal Calculation:
Combines the RSI (or other exogenous variables) with BTC price data using a weighted sum. The weight (signal_alpha) can be adjusted to emphasize either the exogenous variable or price.
Z-Score Normalization:
Standardizes the linear signal into a Z-score, enabling robust threshold-based decisions for long and short trades.
Threshold-Based Entry:
Long Position: Triggered when the Z-score falls below the lower threshold (-risk_adjustment_factor), indicating a potential oversold condition in BTC.
Short Position: Triggered when the Z-score rises above the upper threshold (risk_adjustment_factor), indicating a potential overbought condition in BTC.
Risk Management:
Configurable stop-loss and take-profit levels automatically manage risk and lock in profits for each trade.
Timeframe Focus:
Optimized for 15-minute and 5-minute charts, making it ideal for intraday and high-frequency trading in BTC/USDT.
How It Works:
The strategy calculates a linear signal as a weighted combination of RSI and BTC price data.
It computes the mean and standard deviation of the linear signal over a configurable lookback_period.
A Z-score is calculated to measure how far the current signal deviates from its mean.
Trading signals are generated when the Z-score crosses the specified thresholds:
Long trades: When the Z-score is below -risk_adjustment_factor.
Short trades: When the Z-score is above risk_adjustment_factor.
Trades are closed automatically at take-profit or stop-loss levels.
Customizable Parameters:
lookback_period: Number of bars for calculating moving averages and Z-score.
signal_alpha: Weight assigned to the exogenous variable (RSI) versus BTC price.
take_profit_percent and stop_loss_percent: Define the profit and risk limits for each trade.
risk_adjustment_factor: Controls the sensitivity of the strategy by setting thresholds for entry conditions.
Applications:
This strategy is optimized for BTC/USDT on 15-minute and 5-minute timeframes, making it suitable for intraday and scalping strategies. It is versatile and can be adapted for other cryptocurrencies or volatile assets with high liquidity. The configurable parameters make it adaptable to various market conditions and risk preferences.
Profitability Visualization with Bid-Ask Spread ApproximationOverview
The " Profitability Visualization with Bid-Ask Spread Approximation " indicator is designed to assist traders in assessing potential profit and loss targets in relation to the current market price or a simulated entry price. It provides flexibility by allowing users to choose between two methods for calculating the offset from the current price:
Bid-Ask Spread Approximation: The indicator attempts to estimate the bid-ask spread by using the highest (high) and lowest (low) prices within a given period (typically the current bar or a user-defined timeframe) as proxies for the ask and bid prices, respectively. This method provides a dynamic offset that adapts to market volatility.
Percentage Offset: Alternatively, users can specify a fixed percentage offset from the current price. This method offers a consistent offset regardless of market conditions.
Key Features
Dual Offset Calculation Methods: Choose between a dynamic bid-ask spread approximation or a fixed percentage offset to tailor the indicator to your trading style and market analysis.
Entry Price Consideration: The indicator can simulate an entry price at the beginning of each trading session (or the first bar on the chart if no sessions are defined). This feature enables a more realistic visualization of potential profit and loss levels based on a hypothetical entry point.
Profit and Loss Targets: When the entry price consideration is enabled, the indicator plots profit target (green) and loss target (red) lines. These lines represent the price levels at which a trade entered at the simulated entry price would achieve a profit or incur a loss equivalent to the calculated offset amount.
Offset Visualization: Regardless of whether the entry price is considered, the indicator always displays upper (aqua) and lower (fuchsia) offset lines. These lines represent the calculated offset levels based on the chosen method (bid-ask approximation or percentage offset).
Customization: Users can adjust the percentage offset, toggle the bid-ask approximation and entry price consideration, and customize the appearance of the lines through the indicator's settings.
Inputs
useBidAskApproximation A boolean (checkbox) input that determines whether to use the bid-ask spread approximation (true) or the percentage offset (false). Default is false.
percentageOffset A float input that allows users to specify the percentage offset to be used when useBidAskApproximation is false. The default value is 0.63.
considerEntryPrice A boolean input that enables the consideration of a simulated entry price for calculating and displaying profit and loss targets. Default is true.
Calculations
Bid-Ask Approximation (if enabled): bidApprox = request.security(syminfo.tickerid, timeframe.period, low) Approximates the bid price using the lowest price (low) of the current period. askApprox = request.security(syminfo.tickerid, timeframe.period, high) Approximates the ask price using the highest price (high) of the current period. spreadApprox = askApprox - bidApprox Calculates the approximate spread.
Offset Amount: offsetAmount = useBidAskApproximation ? spreadApprox / 2 : close * (percentageOffset / 100) Determines the offset amount based on the selected method. If useBidAskApproximation is true, the offset is half of the approximated spread; otherwise, it's the current closing price (close) multiplied by the percentageOffset.
Entry Price (if enabled): var entryPrice = 0.0 Initializes a variable to store the entry price. if considerEntryPrice Checks if entry price consideration is enabled. if barstate.isnew Checks if the current bar is the first bar of a new session. entryPrice := close Sets the entryPrice to the closing price of the first bar of the session.
Profit and Loss Targets (if entry price is considered): profitTarget = entryPrice + offsetAmount Calculates the profit target price level. lossTarget = entryPrice - offsetAmount Calculates the loss target price level.
Plotting
Profit Target Line: Plotted in green (color.green) with a dashed line style (plot.style_linebr) and increased linewidth (linewidth=2) when considerEntryPrice is true.
Loss Target Line: Plotted in red (color.red) with a dashed line style (plot.style_linebr) and increased linewidth (linewidth=2) when considerEntryPrice is true.
Upper Offset Line: Always plotted in aqua (color.aqua) to show the offset level above the current price.
Lower Offset Line: Always plotted in fuchsia (color.fuchsia) to show the offset level below the current price.
Limitations
Approximation: The bid-ask spread approximation is based on high and low prices and may not perfectly reflect the actual bid-ask spread of a specific broker, especially during periods of high volatility or low liquidity.
Simplified Entry: The entry price simulation is basic and assumes entry at the beginning of each session. It does not account for specific entry signals or order types.
No Order Execution: This indicator is purely for visualization and does not execute any trades.
Data Discrepancies: The high and low values used for approximation might not always align with real-time bid and ask prices due to differences in data aggregation and timing between TradingView and various brokers.
Disclaimer
This indicator is for educational and informational purposes only and should not be considered financial advice. Trading involves substantial risk, and past performance is not indicative of future results. Always conduct thorough research and consider your own risk tolerance before making any trading decisions. It is recommended to combine this indicator with other technical analysis tools and a well-defined trading strategy.
IronBot v3Introduction
IronBot V3 is a TradingView indicator that analyzes market trends, identifies potential trading opportunities, and helps manage trades by visualizing entry points, stop-loss levels, and take-profit targets.
How It Works
The indicator evaluates price action within a specified analysis window to determine market trends. It uses Fibonacci retracement levels to identify key price levels for trend detection and trading signals. Based on user-defined inputs, it calculates and displays trade levels, including entry points, stop-loss, and multiple take-profit levels.
Trend Definition:
The highest high and lowest low are calculated over a specified number of candles.
The price range is determined as the difference between the highest high and lowest low.
Three Fibonacci levels are calculated within this range:
- Fib Level 0.236
- Trend Line (0.5 level)
- Fib Level 0.786
Determining Long and Short Conditions:
Long Conditions (Buy):
The closing price must be above both the trend line (0.5 level) and the Fib Level 0.236.
Additionally, the market must not currently be in a bearish trend.
Short Conditions (Sell):
The closing price must be below both the trend line and the Fib Level 0.786.
The market must not currently be in a bullish trend.
Trend State Updates:
When a condition is met, the indicator sets the trend to bullish or bearish and turns off bearish or bullish trend conditions.
If neither buy nor sell conditions are met, the trend remains unchanged, and no new trade signals are generated.
Inputs and Their Role in the Algorithm
General Settings
Analysis Window: Specifies the number of historical candles to analyze. This influences the calculation of key levels such as highs and lows, which are critical for determining Fibonacci retracement levels.
First Trade: Defines the start date for generating trading signals.
Trade Configuration
Display TP/SL: Enables or disables the visualization of take-profit and stop-loss levels on the chart.
Leverage: Defines the leverage applied to trades for risk and position size calculations.
Initial Capital: Specifies the starting capital, which is used for calculating position sizes and profits.
Exchange Fees (%): Sets the percentage of fees applied by the exchange, which is factored into profit calculations.
Country Tax (%): Allows users to define applicable taxes, which are subtracted from net profits.
Stop-Loss Configuration
Break Even: Toggles the break-even functionality. When enabled, the stop-loss level adjusts dynamically as take-profit levels are reached.
Stop Loss (%): Defines the percentage distance from the entry price to the stop-loss level.
Take-Profit Settings
The indicator supports up to four take-profit levels:
- TP1 through TP4 Ratios: Specify the price levels for each take-profit target as a percentage of the entry price.
- Profit Percentages: Allocate a percentage of the position size to each take-profit level.
Visualization Elements
Trend Indicators: Displays Fibonacci-based trend lines and markers for bullish or bearish conditions.
Trade Levels: Entry, stop-loss, and take-profit levels are visualized on the chart by dotted lines for clarity. Additionally, a semi-transparent background is applied when a portion of the trade is closed to enhance visualization. Positive profits from a closed trade are green; otherwise, they are red.
Trade Profit Indicator: On each trade, every time a part of the trade is closed (e.g., take profit is reached), the profit indicator will be updated.
Performance Panel: Summarizes key account statistics, including net balance, profit/loss, and trading performance metrics.
Usage Guidelines
Add the indicator to your TradingView chart.
Configure the input settings based on your trading strategy.
Use the displayed levels and trend signals to make informed trading decisions.
Contact
For further assistance, including automation inquiries, feel free to contact me through TradingView’s messaging system.
Purpose and Disclaimer
IronBot V3 is designed for educational purposes and to assist in analyzing market trends. It is not financial advice, and users should perform their own due diligence before making any trading decisions.
Trading involves significant risk, and past performance is not indicative of future results. Use this indicator responsibly.
Super Billion VVIPThis Pine Script code is an advanced script designed for TradingView. It integrates supply and demand zones, price action labels, zigzag lines, and a modified ATR-based SuperTrend indicator. Here's a breakdown of its key components:
Key Features
Supply and Demand Zones:
Automatically identifies and plots supply (resistance) and demand (support) zones using swing highs and lows.
Zones are extended dynamically and updated based on market movements.
Prevents overlapping zones by ensuring a minimum ATR-based buffer.
Zigzag Indicator:
Adds zigzag lines to connect significant swing highs and lows.
Helps identify market trends and potential turning points.
SuperTrend Indicator:
A trend-following component using ATR (Average True Range) with configurable periods and multipliers.
Provides buy and sell signals based on trend changes.
Includes alerts for trend direction changes.
Swing High/Low Labels:
Labels significant price action points as "HH" (Higher High), "LL" (Lower Low), etc., for easy visual reference.
Customizable Visuals:
Allows users to customize colors, label visibility, box widths, and more through inputs.
Alerts:
Generates alerts for buy/sell signals and trend direction changes.
Inputs and Settings
Supply and Demand Settings:
Swing length, zone width, and history size.
Visual Settings:
Toggle zigzag visibility, label colors, and highlight styles.
SuperTrend Settings:
ATR periods, multiplier, and signal visibility.
How to Use
Copy the script into the Pine Editor on TradingView.
Customize the input settings as per your trading strategy.
Add the script to your chart to visualize zones, trends, and signals.
Set alerts for buy/sell signals or trend changes.
Notes
Ensure the script complies with TradingView’s limitations (e.g., max objects).
Fine-tune settings based on the asset's volatility and timeframe.
Let me know if you need help optimizing or further explaining specific parts!
Dead Zone HighlighterDead Zone Highlighter: A precise tool for marking low-probability trading zones between the daily open and the last 15-minute close of the first 2 hours. Simplify your decision-making by identifying non-trading zones with clear visual cues.
Dynamic Support Resistance Strategy @tradingbauhausDynamic Support Resistance Strategy @tradingbauhaus
This script is designed to identify dynamic support and resistance levels on a trading chart based on pivots (highs and lows) detected over a specific period. It also includes a basic strategy logic to generate entry signals when the price breaks these support or resistance levels. Below is a step-by-step explanation of how it works:
How the Script Works:
Pivot Detection:
The script identifies pivots (highs and lows) using the pivothigh and pivotlow functions.
The period for detecting pivots is configurable (Pivot Period).
The source for pivots can be either High/Low (highs and lows) or Close/Open (close and open), depending on user selection.
Creation of Support and Resistance Channels:
The detected pivots are used to create dynamic support and resistance channels.
The maximum channel width is defined as a percentage (Maximum Channel Width %) of the price range over a 300-bar period.
Only channels containing a minimum number of pivots (Minimum Strength) are considered valid.
Visualization of Channels:
Support and resistance channels are plotted on the chart as shaded areas.
Channel colors are customizable:
Resistance: Red.
Support: Blue.
Channel (price inside): Gray.
Optionally, the detected pivots can be displayed on the chart.
Breakout Detection:
The script checks if the price breaks a support or resistance level.
If the price breaks a resistance level, a buy signal is generated.
If the price breaks a support level, a sell signal is generated.
Breakouts are visually marked with triangles (optional) and trigger alerts.
Moving Averages (Optional):
The script allows displaying two moving averages (SMA or EMA) with configurable periods.
These moving averages can be used as additional reference tools for analysis.
Strategy Logic:
When the price breaks a resistance level, the script enters a long position.
When the price breaks a support level, the script enters a short position.
Script Workflow:
Pivot Identification:
The script searches for highs and lows on the chart based on the configurable period.
These pivots are stored in arrays for later use.
Channel Creation:
For each pivot, the script calculates a support/resistance channel, ensuring it meets the maximum width and minimum pivot requirements.
Valid channels are stored and sorted by "strength" (number of included pivots).
Visualization:
Channels are plotted on the chart as shaded areas using the configured colors.
If enabled, pivots are marked on the chart with labels.
Breakout Detection:
The script checks if the price has broken a support or resistance level on the current bar.
If a breakout is detected, a signal is generated and optionally marked on the chart.
Strategy:
If the price breaks a resistance level, a buy signal is triggered.
If the price breaks a support level, a sell signal is triggered.
User Configuration:
The script allows customization of several parameters to adapt it to different trading styles and assets:
Pivot Period: Period for detecting pivots.
Source: Source for pivots (High/Low or Close/Open).
Maximum Channel Width %: Maximum channel width as a percentage of the price range.
Minimum Strength: Minimum number of pivots required to form a channel.
Maximum Number of S/R: Maximum number of channels to display.
Loopback Period: Lookback period for detecting pivots.
Colors: Customization of colors for resistance, support, and channel.
Extras: Options to display pivots, breakouts, and moving averages.
Example Use Case:
Chart Analysis:
On a daily chart, the script identifies key support and resistance levels based on pivots from the last 10 candles.
Channels are plotted as shaded areas, providing a clear visualization of key zones.
Breakout Trading:
If the price breaks a resistance level, the script generates a buy signal.
If the price breaks a support level, the script generates a sell signal.
Moving Averages:
If moving averages are enabled, they can be used as additional confirmation for signals.
Conclusion:
This script is a powerful tool for traders looking to identify dynamic support and resistance levels and capitalize on breakouts as trading signals. Its flexibility and customization make it suitable for a variety of assets and timeframes.
Volume Profile with Bull/Bear ColorsI took the Volume Profile from kv4coins and added different colors to identify net bearish and net bullish volume. The original code required me to switch the settings from bullish, bearish, or both, but both was monochromatic, so I couldn't identify the sells from the buys. The author recommended opening up two instances of the script, one for bullish and one for bearish, but I would have to upgrade my TV account to display more scripts. So this combines the two.
Here is the original explanation:
______________________________________________________________________
This is a Volume Profile based on pine script arrays.
The main idea behind this script is from the user IldarAkhmetgaleev .
He created an awesome piece of code for free users on tradingview.
Here are some changes to the main script:
0. Used Pine Script Arrays for doing/storing calculations.
1. The bar labels are replaced with lines.
2. Added a POC line.
3. Bar growing directions changed from right to left.
4. Added an option to change bar width.
Inputs:
0. Volume Lookback Depth : Number of bars to look back for volume calculations.
1. Bar Length Multiplier : Bar length multiplier to make bar long or short.
2. Bar Horizontal Offset : Horizontal distance from the current bar in the right direction.
3. Bar Width : Width of the bars.
4. Show POC Line : Show or hide the POC line.
Happy trading.
Oct 20, 2020
Release Notes
Added option for changing Bar and POC line colors.
Nov 12, 2020
Release Notes
According to the latest update from the Tradingview, now we can define number of drawable lines in the study parameter as 'max_lines_count' up to the 500.
So here are our Volume Profile script with updated features.
Changes:
1. Added option for setting number of bars from 10 to 500.
2. Codes cleaned little bit.
Feb 22, 2021
Release Notes
Added delta option as suggested by @NXT2017.
Options: Both, Bullish and Bearish.
Both: bullish and bearish both candles ae used to calculate volume profile (default).
Bullish: only bullish candles are used.
Bearish: only bearish candles are used.
Feb 22, 2021
Release Notes
For viewing delta in volume profile, add this indicator two times and set delta type to bullish on the first one and bearish on the second one, now set same bar numbers on both.
Custom Fibonacci Strategyhi this is my hard area .. I used many times and its very good to win money
13-week high, low, Fibonacci retracement levels, with 100SMAIndicator: 13 Week High/100 Day SMA/13 Week Low with 0.382, 0.5, and 0.618 Fibonacci Levels
Description:
This indicator for TradingView, written in Pine Script version 6, displays a table on the chart that provides a visual analysis of key price levels based on a 13-week timeframe and a 100-day Simple Moving Average (SMA).
Core Calculations:
13-Week High and Low: The indicator calculates the highest high and lowest low over the past 13 weeks using weekly data. This provides a longer-term perspective on the price range.
13-Week Fibonacci Retracement Levels: Based on the calculated 13-week high and low, the script determines the 0.382, 0.5, and 0.618 Fibonacci retracement levels. These levels are often used by traders to identify potential support and resistance areas.
100-Day SMA: The indicator calculates the 100-day Simple Moving Average of the closing price using daily data. The SMA is a widely used trend-following indicator.
Table Display:
The indicator presents the calculated values in a neatly formatted table on the chart.
The table includes the following information:
13W High: The highest price reached over the last 13 weeks.
13W Low: The lowest price reached over the last 13 weeks.
13W SMA: The calculated 100-day Simple Moving Average value.
Fibonacci Levels: The 0.382, 0.5 ("Mid"), and 0.618 Fibonacci retracement levels, labeled as "↗," "|," and "↘," respectively.
Dynamic SMA Coloring:
The 100-day SMA value in the table is dynamically colored to provide a quick visual indication of the current price's relationship to the SMA:
Teal: The current closing price is above the 100-day SMA, suggesting a potential uptrend.
Red: The current closing price is below the 100-day SMA, suggesting a potential downtrend.
Blue: The current closing price is equal to the 100-day SMA.