Smoothed Gaussian Trend Filter [AlgoAlpha]Experience seamless trend detection and market analysis with the Smoothed Gaussian Trend Filter by AlgoAlpha! This cutting-edge indicator combines advanced Gaussian filtering with linear regression smoothing to identify and enhance market trends, making it an essential tool for traders seeking precise and actionable signals.
Key Features :
🔍 Gaussian Trend Filtering: Utilizes a customizable Gaussian filter with adjustable length and pole settings for tailored smoothing and trend identification.
📊 Linear Regression Smoothing: Reduces noise and further refines the Gaussian output with user-defined smoothing length and offset, ensuring clarity in trend representation.
✨ Dynamic Visual Highlights: Highlights trends and signals based on volume intensity, allowing for real-time insights into market behavior.
📉 Choppy Market Detection: Identifies ranging or choppy markets, helping traders avoid false signals.
🔔 Custom Alerts: Set alerts for bullish and bearish signals, trend reversals, or choppy market conditions to stay on top of trading opportunities.
🎨 Color-Coded Visuals: Fully customizable colors for bullish and bearish signals, ensuring clear and intuitive chart analysis.
How to Use :
Add the Indicator: Add it to your favorites and apply it to your TradingView chart.
Interpret the Chart: Observe the trend line for directional changes and use the accompanying buy/sell signals for entry and exit opportunities. Choppy market conditions are flagged for additional caution.
Set Alerts: Enable alerts for trend signals or choppy market detections to act promptly without constant chart monitoring.
How It Works :
The Smoothed Gaussian Trend Filter uses a combination of advanced smoothing techniques to identify trends and enhance market clarity. First, a Gaussian filter is applied to price data, using a user-defined length (Gaussian length) and poles (smoothness level) to calculate an alpha value that determines the degree of smoothing. This creates a refined trend line that minimizes noise while preserving key market movements. The output is then further processed using linear regression smoothing, allowing traders to adjust the length and offset to flatten minor oscillations and emphasize the dominant trend. To incorporate market activity, volume intensity is analyzed through a normalized Hull Moving Average (HMA), dynamically adjusting the trend line's color transparency based on trading activity. The indicator also identifies trend direction by comparing the smoothed trend line with a calculated SuperTrend-style level, generating clear trend regimes and highlighting ranging or choppy conditions where trends are less reliable and avoiding false signals. This seamless integration of Gaussian smoothing, regression analysis, and volume dynamics provides traders with a powerful and intuitive tool for market analysis.
지표 및 전략
IU Trailing Stop Loss MethodsThe 'IU Trailing Stop Loss Methods' it's a risk management tool which allows users to apply 12 trailing stop-loss (SL) methods for risk management of their trades and gives live alerts when the trailing Stop loss has hit. Below is a detailed explanation of each input and the working of the Script.
Main Inputs:
- bar_time: Specifies the date from which the trade begins and entry price will be the open of the first candle.
- entry_type: Choose between 'Long' or 'Short' positions.
- trailing_method: Select the trailing stop-loss method. Options include ATR, Parabolic SAR, Supertrend, Point/Pip based, Percentage, EMA, Highest/Lowest, Standard Deviation, and multiple target-based methods.
- exit_after_close: If checked, exits the trade only after the candle closes.
Optional Inputs:
ATR Settings:
- atr_Length: Length for the ATR calculation.
- atr_factor: ATR multiplier for SL calculation.
Parabolic SAR Settings:
- start, increment, maximum: Parameters for the Parabolic SAR indicator.
Supertrend Settings:
- supertrend_Length, supertrend_factor: Length and factor for the Supertrend indicator.
Point/Pip Based:
- point_base: Set trailing SL in points/pips.
Percentage Based:
- percentage_base: Set SL as a percentage of entry price.
EMA Settings:
- ema_Length: Length for EMA calculation.
Standard Deviation Settings:
- std_Length, std_factor: Length and factor for standard deviation calculation.
Highest/Lowest Settings:
- highest_lowest_Length: Length for the highest/lowest SL calculation.
Target-Based Inputs:
- ATR, Point, Percentage, and Standard Deviation based target SL settings with customizable lengths and multipliers.
Entry Logic:
- Trades initiate based on the entry_type selected and the specified bar_time.
- If Long is selected, a long trade is initiated when the conditions match, and vice versa for Short.
Trailing Stop-Loss (SL) Methods Explained:
The strategy dynamically adjusts stop-loss based on the chosen method. Each method has its calculation logic:
- ATR: Stop-loss calculated using ATR multiplied by a user-defined factor.
- Parabolic SAR: Uses the Parabolic SAR indicator for trailing stop-loss.
- Supertrend: Utilizes the Supertrend indicator as the stop-loss line.
- Point/Pip Based: Fixed point-based stop-loss.
- Percentage Based: SL set as a percentage of entry price.
- EMA: SL based on the Exponential Moving Average.
- Highest/Lowest: Uses the highest high or lowest low over a specified period.
- Standard Deviation: SL calculated using standard deviation.
Exit Conditions:
- If exit_after_close is enabled, the position will only close after the candle confirms the stop-loss hit.
- If exit_after_close is disabled, the strategy will close the trade immediately when the SL is breached.
Visualization:
The script plots the chosen trailing stop-loss method on the chart for easy visualization.
Target-Based Trailing SL Logic:
- When a position is opened, the strategy calculates the initial stop-loss and progressively adjusts it as the price moves favorably.
- Each SL adjustment is stored in an array for accurate tracking and visualization.
Alerts and Labels:
- When the Entry or trailing stop loss is hit this scripts draws a label and give alert to the user that trailing stop has been hit for the trade.
Note - on the historical data The Script will show nothing if the entry and the exit has happened on the same candle, because we don't know what was hit first SL or TP (basically how the candle was formed on the lower timeframe).
Summary:
This script offers flexible trailing stop-loss options for traders who want dynamic risk management in their strategies. By offering multiple methods like ATR, SAR, Supertrend, and EMA, it caters to various trading styles and risk preferences.
Chart InfoOVERVIEW
What would a general summary of the symbol on the chart look like? Here’s an example: This script was created to help you easily access the essential details of a symbol, which I believe are critical for daily use.
CONCEPTS
When using any indicator or analysing price movement, the characteristics of the chart become important. Each symbol has a unique character and the more we can quickly find out about it, the better. Instead of embedding those details within each individual indicator, it is often more practical to access these data through an external tool. This indicator presents the following results related to the symbol on your chart in a table format:
ID : Ticker ID (Exchange, Base Currency, and Quote Currency)
TIMEFRAME : The chart's time period
START : The starting date of the chart
FINISH : The finishing date of the chart
INTERVAL : The total time between the start and finish dates (based on timeframe). The current bar is not included in the total time until it is closed.
BAR INDEX : The total number of bars on the chart (can also be viewed in both forward and backward directions in the data window as a series type).
VOLATILITY : Percentage ratio of 14-bar ATR to close.
CHANGE : The daily percentage change.
HODL : The percentage return that would be gained if the symbol had been bought and held since the first bar.
DAILY BUY : The percentage return that would be gained if the same amount of buying was made daily (a kind of DCA).
MECHANICS
This is a very simple script. I didn't add user-defined timestamp inputs because I didn’t want to overwhelm the indicator with parameters. However, if requested, i can make improvements in this direction in a second version.
NOTES
I live in Istanbul, so I designed the default timezone offset as GMT+3. Please remember to adjust it according to your own timezone to ensure the date results are accurate.
I hope it helps everyone. Do not forget to manage your risk. And trade as safely as possible. Best of luck!
measure last swing [keypoems]MEASURE LAST SWING
Version: v0.0.7
An indicator for measuring market swings and calculating position sizing based on pivot points and risk parameters. Helps traders visualize price swings and automatically compute position sizes based on their desired risk amount.
FEATURES:
• Identifies and tracks last pivot point in price action
• Displays visual measurements of price swing
• Calculates position sizes based on risk parameters
• Supports major futures contracts with automatic multiplier detection
HOW IT WORKS:
The indicator detects pivot highs and lows using your specified pivot strength, then draws measurement lines and calculates position sizes based on your risk parameters. It automatically cleans up old drawings when new pivot points are identified.
INPUT PARAMETERS:
General Settings:
• Risk Amount - Amount you want to risk per trade
• Pivot Strength - Bars required on either side to confirm a pivot
• Offset - Number of bars to offset the vertical line
Visual Settings:
• Horizontal and Vertical Lines - Customizable colors, widths (1-4), and styles
• Labels - Adjustable text color and size
CONTRACT MULTIPLIERS:
Automatically detects and applies the correct multiplier:
• ES (E-mini S&P 500): 50.0
• MES (Micro E-mini S&P 500): 5.0
• NQ (E-mini Nasdaq): 20.0
• MNQ (Micro E-mini Nasdaq): 2.0
• YM (E-mini Dow): 5.0
• MYM (Micro E-mini Dow): 0.5
• Other symbols: 1.0 (default)
DISPLAY ELEMENTS:
1. Horizontal line showing the level of the last pivot point
2. Vertical line measuring the distance to current price
3. Distance label showing point distance
4. Risk/Position label showing risk amount and calculated position size
POSITION SIZING:
Position Size = Floor(Risk Amount / (Distance in Points × Contract Multiplier))
IDEAL FOR:
• Measuring price swings for technical analysis
• Position sizing based on risk management rules
• Identifying potential entry and exit points
• Visual analysis of market structure
• Risk management automation
369 TPF369 Frequency using futures contracts.its using the 369 frequency lines to find the cycle for a buy or sell entry
Fibonacci Düzeltme SeviyeleriBelirtilen bar sayısı ve fibonacci değerlerine göre fibonacci düzeltme seviyelerini grafik üzerinde çizer. Eğer grafikte belirtilenden daha az bar var ise bu durumda grafikte yer alan max bar sayısını dikkate alarak çizim yapar.
Daily Close Levels with ATR and Custom OffsetsDescription:
This Pine Script visualizes daily close levels, calculates key price zones based on custom offsets and ATR (Average True Range), and is an essential tool for traders analyzing support and resistance zones.
Features
Close Value Line: Displays the daily close value as a line on the chart.
ATR Values: Shows the ATR value in both price and tick format.
Custom Offsets:
Calculates positive and negative price levels based on a user-defined tick offset.
Supports multipliers for extended zones (e.g., 2x offset).
Labels:
Displays the close value and ATR on the chart.
Annotates calculated price levels directly on the corresponding lines.
Time Control: Calculates levels at a user-defined hour (e.g., 20:00).
Customizable Parameters:
Close Time (Hour): Choose the specific hour for analyzing the close price.
Custom Line Offset: Define the price offset in ticks.
ATR Length: Adjust the ATR calculation length.
Timezone Offset: Supports time adjustments for different time zones.
Enable/Disable Labels and Values: Toggle the display of labels and values on the chart.
Mxwll Hedge Suite [Mxwll]Hello Traders!
The Mxwll Hedge Suite determines the best asset to hedge against the asset on your chart!
By determining correlation between the asset on your chart and a group of internally listed assets, the Mxwll Hedge Suite determines which asset from the list exhibits the highest negative correlation, and then determines exactly how many coins/shares/contracts of the asset must be bought to achieve a perfect 1:1 hedge!
The image above exemplifies the process!
The purple box on the chart shows the eligible price action used to determine correlation between the asset on my chart (BTCUSDT.P) and the list of cryptocurrencies that can be used as a hedge!
From this price action, the coin determined to have to greatest negative correlation to BTCUSDT.P is FTMUSD.
The image above further outlines the hedge table located in the bottom-right corner of your chart!
The hedge table shows exactly how many coins you’d need to purchase for the hedge asset at various leverages to achieve a perfect 1:1 hedge!
Hedge Suite works on any asset on any timeframe!
And that’s all! A short and sweet script that is hopefully helpful to traders looking to hedge their positions with a negatively correlated asset!
Thank you, Traders!
Harmonic Heikin-Ashi TraderHarmonic Heikin-Ashi Trader
A comprehensive tool for traders who prefer a blend of trend analysis and technical signals. This script offers:
Heikin-Ashi Candles
Smoothens market noise to help identify trends with ease.
Candles change dynamically based on calculated Heikin-Ashi open, high, low, and close.
Custom Background Color
Customize the chart's background for improved clarity and focus.
EMAs with Buy/Sell Signals
Two customizable Exponential Moving Averages (EMAs).
Visual buy/sell signals when EMA crossover events occur.
MACD Integration
Detect momentum shifts with the classic MACD indicator.
Configurable fast, slow, and signal line parameters.
Generates buy/sell signals for actionable insights.
Customizable Display
Toggle signal visibility for a cleaner or more detailed chart.
Price line harmonized with the background color.
Harmonic Heikin-Ashi Trader is designed for all trading styles and enhances decision-making in dynamic markets.
Intraday Strategy with VWAP, Fibonacci, RSI, and SMAThis Pine Script code defines a TradingView strategy for intraday trading, integrating multiple indicators and techniques, including VWAP, Fibonacci retracements, RSI, and SMA. Below is an explanation of the components:
Strategy Definition:
The script is titled "Intraday Strategy with VWAP, Fibonacci, RSI, and SMA".
The strategy is set to overlay on the price chart for easy visualization.
Input Settings:
RSI Length: Defines the period for calculating the RSI (default: 14).
Fibonacci Lookback Period: Determines the range for Fibonacci retracement levels.
VWAP Timeframe: Allows the user to specify the timeframe for VWAP calculations.
SMA Length: Sets the period for calculating the SMA (default: 9).
Indicators:
RSI: Used to determine overbought or oversold conditions.
SMA (Simple Moving Average): Used to identify trend direction and potential price crossovers.
VWAP (Volume Weighted Average Price): Used to identify price levels relative to volume.
Fibonacci Retracements: Calculates key levels (0.382 and 0.618) for potential price reactions.
Trading Conditions:
Buy Signal:
RSI crosses above 30.
Price is within the Fibonacci retracement zone.
Price is above the VWAP.
Alternatively, price crosses above the SMA.
Sell Signal:
RSI crosses below 70.
Price is within the Fibonacci retracement zone.
Price is below the VWAP.
Alternatively, price crosses below the SMA.
Trade Execution:
If a buy signal (finalBuySignal) is triggered, the strategy enters a long position.
If a sell signal (finalSellSignal) is triggered, the strategy enters a short position.
Plotting:
Buy and sell signals are plotted on the chart with green and red markers, respectively.
VWAP is displayed in blue.
SMA is displayed in yellow.
Fibonacci retracement levels are shown as orange (upper) and purple (lower) lines.
Purpose:
Squeeze Momentum Indicator v1 by KevyStocksReach out for my exact settings.
Some things I would like to change/add in the next version are: \
Allow plot sizes to be customizable
Default arrow colors to red or green
Squeeze Dashboard - when in a squeeze, and when squeeze released to upside, and squeeze released to downside.
Add Previous Day High
Add Previous Day Low
Add Previous Day 50% Marker
Add Golden Pocket Fibonacci
Order Blocks with Volume Heatmap & Clusters - VK TradingOrder Blocks with Volume Heatmap & Clusters - VK Trading
This script is designed to identify and highlight Order Blocks, a key concept in institutional trading, and combines it with powerful tools like volume heatmaps and accumulation clusters for enhanced market analysis. Suitable for traders of all experience levels, this script provides a clear and customizable visualization to help identify significant market zones effectively.
What Does This Script Do?
Order Block Identification: Highlights bullish and bearish order blocks directly on the chart, making it easier to spot key supply and demand zones.
Volume Heatmap: A dynamic heatmap adjusts colors based on relative volume, allowing you to quickly identify areas of heightened activity.
Institutional Accumulation Clusters: Zones of potential institutional accumulation are calculated using a combination of ATR (Average True Range), standardized volume, and RSI (Relative Strength Index).
Automatic Clearing: Invalidated order blocks are automatically removed, ensuring your charts remain clean and focused.
Key Features
Customizable Sensitivity: Adjust the script’s sensitivity to tailor order block detection to different market conditions and strategies.
Advanced Volume Display Options: Toggle volume visibility on or off. Customize the position, size, and color of volume labels for better integration with your chart's design.
Dynamic Heatmap Intensity: Fine-tune the heatmap’s intensity and color to highlight areas of interest based on trading volume.
Dual Order Block Detection: Uses two independent detection settings to analyze the market from multiple perspectives.
Visual Alerts: Automatically draws key level lines based on detected order blocks for better clarity.
User Benefits:
Clear Market Analysis: Helps pinpoint institutional activity and key levels with minimal effort.
Increased Efficiency: Automates plotting and analysis, allowing you to focus on decision-making.
Versatile Compatibility: Complements strategies like Smart Money Concepts, Wyckoff, and Price Action approaches.
Disclaimer
This script is intended as an analytical and educational tool. It does not guarantee specific outcomes or eliminate trading risks. Use this tool at your own discretion and always practice proper risk management.
Smart Moving AveragesSmart Moving Averages analyzes the dynamic interplay between price action and multiple moving averages to identify high-probability support and resistance zones.
The script's distinguishing features include:
Bounce detection that filters out noise by requiring specific penetration thresholds (0.1-1.5%), helping traders identify genuine support tests versus false signals
Real-time MA clustering analysis that reveals zones where multiple moving averages converge, indicating potentially stronger support/resistance levels
Statistical tracking of bounce success rates for each MA, allowing traders to identify which moving averages are most reliable for the current market conditions
Power bounce detection that combines EMA spread analysis with trend confirmation, highlighting especially strong bullish setups
Visual stack status system that instantly communicates market health through an intuitive color-coded display showing how many MAs are below price
The script helps traders make more informed decisions by quantifying the historical reliability of different moving averages while providing real-time analysis of MA interactions with price. This systematic approach moves beyond simple MA crossovers to identify higher probability trading opportunities.
[blackcat] L1 Small Wave Operation L1 Small Wave Operation
Overview
Are you looking to catch those elusive small waves in the market? Look no further than " L1 Small Wave Operation." This script offers a unique way to identify potential buying opportunities by analyzing price movements, volume changes, and trend directions. With customizable inputs and clear visual indicators, it’s designed to help traders spot favorable entry points with precision.
Features
Dynamic Signal Identification: Automatically detects two types of buy signals labeled "S" and "B."
Adaptable Parameters: Allows users to adjust low period, high period, EMA periods, SMA period, and various threshold values to fine-tune the strategy.
Visual Clarity: Plots K and D lines along with four distinct threshold levels for easy visualization.
Condition-Based Signals: Uses multiple conditions including volume increases, price actions, and crossover events to confirm signals.
How It Works
Calculate Percent Range: Determines where the current closing price lies within the recent low and high range.
Compute Moving Averages: Calculates Exponential Moving Average (EMA) and Simple Moving Average (SMA) of the percent range.
Define Conditions: Checks for bullish or strong bullish patterns, uptrends, and specific crossover events between K and D lines.
Generate Signals: Marks potential buying opportunities when predetermined conditions are met.
How To Use
Add this script to your TradingView chart.
Adjust the input parameters according to your preferred settings.
Monitor the plotted lines and look for "S" and "B" labels indicating buy signals.
Consider incorporating these signals into a broader trading strategy that includes risk management techniques.
What Makes It Special
Flexibility: Users can easily modify parameters to adapt the script to different markets or personal preferences.
Automation: Saves time by automatically scanning for trade setups based on predefined rules.
Comprehensive Analysis: Combines multiple factors like volume, price action, and moving averages to provide reliable signals.
Limitations
Past performance does not guarantee future results.
Market conditions can vary, affecting signal reliability.
Not suitable for very short-term trades without additional refinements.
Notes
Always perform backtesting on historical data before implementing live trades.
Understand the underlying logic of the script to avoid misinterpretation of signals.
Regularly review and adjust parameters based on changing market dynamics.
QQE MT4 V5 Glaz-modified by JustUncleL (updated)Thanks JustUnclel hope your posts last forever. Script updated to Version 5. RIP JustUncleL
Mean Reversion Pro Strategy [tradeviZion]Mean Reversion Pro Strategy : User Guide
A mean reversion trading strategy for daily timeframe trading.
Introduction
Mean Reversion Pro Strategy is a technical trading system that operates on the daily timeframe. The strategy uses a dual Simple Moving Average (SMA) system combined with price range analysis to identify potential trading opportunities. It can be used on major indices and other markets with sufficient liquidity.
The strategy includes:
Trading System
Fast SMA for entry/exit points (5, 10, 15, 20 periods)
Slow SMA for trend reference (100, 200 periods)
Price range analysis (20% threshold)
Position management rules
Visual Elements
Gradient color indicators
Three themes (Dark/Light/Custom)
ATR-based visuals
Signal zones
Status Table
Current position information
Basic performance metrics
Strategy parameters
Optional messages
📊 Strategy Settings
Main Settings
Trading Mode
Options: Long Only, Short Only, Both
Default: Long Only
Position Size: 10% of equity
Starting Capital: $20,000
Moving Averages
Fast SMA: 5, 10, 15, or 20 periods
Slow SMA: 100 or 200 periods
Default: Fast=5, Slow=100
🎯 Entry and Exit Rules
Long Entry Conditions
All conditions must be met:
Price below Fast SMA
Price below 20% of current bar's range
Price above Slow SMA
No existing position
Short Entry Conditions
All conditions must be met:
Price above Fast SMA
Price above 80% of current bar's range
Price below Slow SMA
No existing position
Exit Rules
Long Positions
Exit when price crosses above Fast SMA
No fixed take-profit levels
No stop-loss (mean reversion approach)
Short Positions
Exit when price crosses below Fast SMA
No fixed take-profit levels
No stop-loss (mean reversion approach)
💼 Risk Management
Position Sizing
Default: 10% of equity per trade
Initial capital: $20,000
Commission: 0.01%
Slippage: 2 points
Maximum one position at a time
Risk Control
Use daily timeframe only
Avoid trading during major news events
Consider market conditions
Monitor overall exposure
📊 Performance Dashboard
The strategy includes a comprehensive status table displaying:
Strategy Parameters
Current SMA settings
Trading direction
Fast/Slow SMA ratio
Current Status
Active position (Flat/Long/Short)
Current price with color coding
Position status indicators
Performance Metrics
Net Profit (USD and %)
Win Rate with color grading
Profit Factor with thresholds
Maximum Drawdown percentage
Average Trade value
📱 Alert Settings
Entry Alerts
Long Entry (Buy Signal)
Short Entry (Sell Signal)
Exit Alerts
Long Exit (Take Profit)
Short Exit (Take Profit)
Alert Message Format
Strategy name
Signal type and direction
Current price
Fast SMA value
Slow SMA value
💡 Usage Tips
Consider starting with Long Only mode
Begin with default settings
Keep track of your trades
Review results regularly
Adjust settings as needed
Follow your trading plan
⚠️ Disclaimer
This strategy is for educational and informational purposes only. It is not financial advice. Always:
Conduct your own research
Test thoroughly before live trading
Use proper risk management
Consider your trading goals
Monitor market conditions
Never risk more than you can afford to lose
📋 Release Notes
14 January 2025
Added New Fast & Slow SMA Options:
Fibonacci-based periods: 8, 13, 21, 144, 233, 377
Additional period: 50
Complete Fast SMA options now: 5, 8, 10, 13, 15, 20, 21, 34, 50
Complete Slow SMA options now: 100, 144, 200, 233, 377
Bug Fixes:
Fixed Maximum Drawdown calculation in the performance table
Now using strategy.max_drawdown_percent for accurate DD reporting
Previous version showed incorrect DD values
Performance metrics now accurately reflect trading results
Performance Note:
Strategy tested with Fast/Slow SMA 13/377
Test conducted with 10% equity risk allocation
Daily Timeframe
For Beginners - How to Modify SMA Levels:
Find this line in the code:
fastLength = input.int(title="Fast SMA Length", defval=5, options= )
To add a new Fast SMA period: Add the number to the options list, e.g.,
To remove a Fast SMA period: Remove the number from the options list
For Slow SMA, find:
slowLength = input.int(title="Slow SMA Length", defval=100, options= )
Modify the options list the same way
⚠️ Note: Keep the periods that make sense for your trading timeframe
💡 Tip: Test any new combinations thoroughly before live trading
"Trade with Discipline, Manage Risk, Stay Consistent" - tradeviZion
NAMA Stochastic RSI - Quan DaoThanks for many follows in the beginning of 2025.
I would love to share publicly a new indicator with all of you to show my gratitude.
It's a simple oscillator, using my NAMA moving average at the core of the RSI of the Stochastic RSI indicator.
Probably should be used for long-term investment, as I set the default period for the stochastic pretty big.
The use is pretty forward:
- When you have the green arrow at the bottom, it's time to consider a buy.
- When you have the red arrow at the top, it's time to consider a sell.
I would love to hear your feedback on how you used it and if it's useful for you at all.
Cheers,
Strategy with MACD and EMA"Strategy with MACD and EMA"
This is a simple strategy designed to enter LONG positions when the MACD crossover occurs below the 0 point and the price is above the EMA (200), and SHORT when the reverse conditions are met.
With TradingView's premium options, you can perform backtesting to obtain a more reliable sample, but I recommend not exceeding more than 3 months for the 5-minute timeframe.
The ratio is set by default to 2:1. You can modify the Take Profit (TP), Stop Loss (SL), EMA length, and MACD settings.
My advice is to perform backtesting on pairs that adapt best to it.
It is recommended to periodically change the pairs that fit the strategy best or adjust the TP/SL, as volatility changes constantly.
A pair may work better for LONG positions than for SHORT , and vice versa.
The strategy is initially designed for use with the 5-minute timeframe, but it can be adapted to any timeframe and asset (stocks, cryptocurrencies, etc.).
If your exchange charges a 0.05% commission per trade, the strategy must have at least a 36.67% win rate to be profitable with the established TP/SL parameters.
The source code is open for customization and modification.
----------------------------------------------------------------------------------------------
Esta es una estrategia simple, diseñada para entrar en posiciones LONG cuando el cruce del MACD ocurre por debajo del punto 0 y el precio se encuentra sobre la EMA (200), y en posiciones SHORT cuando se da todo a la inversa.
Con las opciones premium de TradingView, puedes realizar análisis retroactivos para obtener una muestra más confiable, pero recomiendo que no se exceda más de los 3 meses para la temporalidad de 5 minutos.
El ratio está predeterminado en 2:1. Puedes modificar el Take Profit (TP), Stop Loss (SL), la longitud de la EMA y la configuración del MACD.
Mi consejo es hacer backtesting en los pares que mejor se adapten a ella.
Es recomendable cambiar con periodicidad los pares que más se adapten a la estrategia o ajustar el TP/SL, ya que la volatilidad varía constantemente.
Un par puede funcionar mejor para posiciones LONG que para SHORT , y viceversa.
La estrategia inicialmente está pensada para usarse en temporalidad de 5 minutos, pero puede adaptarse a cualquier temporalidad y activo (acciones, criptomonedas, etc.).
Si tu exchange cobra un 0,05% de comisión por operación, la estrategia debe tener al menos un 36,67% de acierto para ser rentable bajo los parámetros de TP/SL preestablecidos.
El código fuente está abierto para su personalización y modificación.
REVERSÃO POR ZONA DE RSI//@version=5
indicator('REVERSÃO POR ZONA DE RSI- I', overlay=false)
//functions
xrf(values, length) =>
r_val = float(na)
if length >= 1
for i = 0 to length by 1
if na(r_val) or not na(values )
r_val := values
r_val
r_val
xsa(src, len, wei) =>
sumf = 0.0
ma = 0.0
out = 0.0
sumf := nz(sumf ) - nz(src ) + src
ma := na(src ) ? na : sumf / len
out := na(out ) ? ma : (src * wei + out * (len - wei)) / len
out
// inputs
n1 = input.int(30, title='n1', minval=1)
//threshold lines
h1 = hline(50, color=color.red, linestyle=hline.style_dotted)
h2 = hline(50, color=color.green, linestyle=hline.style_dotted)
h3 = hline(10, color=color.lime, linestyle=hline.style_dotted)
h4 = hline(90, color=color.red, linestyle=hline.style_dotted)
fill(h2, h3, color=color.new(color.green, 70))
fill(h1, h4, color=color.new(color.red, 70))
//KDJ indicator
rsv = (close - ta.lowest(low, n1)) / (ta.highest(high, n1) - ta.lowest(low, n1)) * 100
k = xsa(rsv, 3, 1)
d = xsa(k, 3, 1)
crossover_1 = ta.crossover(k, d)
buysig = d < 25 and crossover_1 ? 30 : 0
crossunder_1 = ta.crossunder(d, k)
selsig = d > 75 and crossunder_1 ? 70 : 100
//plot buy and sell signal
ple = plot(buysig, color=color.new(color.green, 0), linewidth=1, style=plot.style_area)
pse = plot(selsig, color=color.new(color.red, 0), linewidth=2, style=plot.style_line)
//plot KD candles
plotcandle(k, d, k, d, color=k >= d ? color.green : na)
plotcandle(k, d, k, d, color=d > k ? color.red : na)
// KDJ leading line
var1 = (close - ta.sma(close, 13)) / ta.sma(close, 13) * 100
var2 = (close - ta.sma(close, 26)) / ta.sma(close, 21) * 100
var3 = (close - ta.sma(close, 90)) / ta.sma(close, 34) * 100
var4 = (var1 + 3 * var2 + 9 * var3) / 13
var5 = 100 - math.abs(var4)
var10 = ta.lowest(low, 10)
var13 = ta.highest(high, 25)
leadingline = ta.ema((close - var10) / (var13 - var10) * 4, 4) * 25
pbias = plot(leadingline, color=k >= d ? color.green : color.red, linewidth=4, style=plot.style_line, transp=10)
Sina vwapSina VWAP: Multi-Timeframe Highs and Lows with VWAP Integration
This custom Pine Script indicator, "Sina VWAP," combines the visualization of significant highs and lows from multiple timeframes with a Volume-Weighted Average Price (VWAP) overlay for enhanced market analysis. It is designed for traders seeking precision in identifying support and resistance zones, while also benefiting from the dynamic nature of VWAP.
Features:
Highs & Lows Visualization:
Timeframes Supported: Daily, Weekly, Monthly, Quarterly, 3-Month, 6-Month, and 12-Month.
Custom Line Styles: Configure line styles (solid, dashed, dotted) and widths for each timeframe.
Color & Transparency Settings: Adjust colors and transparency for easy chart readability.
Projections: Extend previous highs and lows into the future for predictive insights.
Gradient Option: Highlight recency of highs and lows using a color gradient for improved visual interpretation.
VWAP Overlay:
Calculate and display Volume-Weighted Average Price to track dynamic market trends.
Optional standard deviation bands for added statistical context around the VWAP.
Dynamic Adjustments:
Automatically updates with new data points across selected timeframes.
Optimized for intraday and longer-term analysis.
Custom Lookback Periods:
Define how many historical highs and lows to retain for each timeframe.
Automatically remove outdated levels to keep the chart clean and uncluttered.
How It Works:
The indicator requests data from multiple timeframes using the request.security function to capture highs and lows. These levels are then plotted on the chart, with options to extend their projections into the future for planning trades.
The VWAP component dynamically adapts to current price action, providing traders with an additional edge in identifying trend directions and reversal zones.
Settings Overview:
Highs & Lows:
Enable/disable levels for each timeframe.
Customize line styles, colors, and transparency for distinct visualization.
VWAP:
Enable/disable VWAP overlay.
Configure standard deviation bands for additional context.
Style:
Adjust gradient intensity for recent highs/lows.
Set projection offset to control the extension of lines into the future.
Use Cases:
Intraday Trading: Utilize daily and weekly levels to pinpoint short-term support/resistance zones.
Swing Trading: Leverage monthly and quarterly levels for mid-term price targets.
Long-Term Analysis: Identify strategic zones using 6-month and 12-month levels.
Precision Trade Zone By KittisakThis indicator is designed for Money Management calculations, helping to facilitate risk management in trading, determining suitable leverage based on acceptable risk, and adjusting the Stop Loss level to align with the calculated leverage.
Abbreviation Descriptions
LR : Suitable Leverage.
EP : Entry Price.
BEP : Break-Even Point (a point where you can move your Stop Loss to prevent losses once the price reaches a certain level).
SL : Stop Loss (a recalculated Stop Loss level to match the leverage. You should use this as the Stop Loss price instead of the initial level you set).
TP : Take Profit (a point where you take profit based on the defined risk-reward ratio).
Note
When first activating the indicator, an error may occur, and no output will be displayed. This happens because you must first specify the Entry Price and Stop Loss in the indicator settings.
How Much Leverage Should You Use?
It may seem like a simple question but is difficult to answer.
Method for Calculating Suitable Leverage
Use the formula:
Leverage = Acceptable Loss / (Distance between Entry Price and Stop Loss + (Buy Fee + Sell Fee))
Calculating the Correct Stop Loss Point
(Stop Loss levels will be slightly adjusted or extended)
For Long Positions :
New Stop Loss = Entry Price * (1 - Acceptable Loss / (Calculated Leverage * 100))
For Short Positions :
New Stop Loss = Entry Price * (1 + Acceptable Loss / (Calculated Leverage * 100))
Calculating the Correct Take Profit Point
(Take Profit levels will be slightly adjusted or extended)
For Long Positions :
Take Profit = Entry Price * (1 + (Acceptable Loss / (Calculated Leverage * 100) * RR) + ((Buy Fee + Sell Fee) / 100))
For Short Positions :
Take Profit = Entry Price * (1 - (Acceptable Loss / (Calculated Leverage * 100) * RR) + ((Buy Fee + Sell Fee) / 100))
Benefits of This Calculation
1. Accurate Risk Assessment
The calculated leverage accounts for trading fees. For example, if you aim for a 2% loss, this method ensures the actual loss is exactly 2%, not more (e.g., 2% plus fees).
2. Eliminates Guesswork
Randomly setting leverage can lead to risks because the Stop Loss level may not align with your position. This calculation ensures that the leverage aligns precisely with your desired Stop Loss level.
3. Realistic Profit Targets
For example, with a 2% acceptable loss and a 1:2 RR, you expect a 4% profit. However, without this calculation, fees may reduce your profit below 4%. This method includes fees, ensuring your profit matches the intended target.
Caution
This indicator does not account for slippage or requotes. Use it with caution and allow a buffer for slippage in your calculations.
Indicator นี้มีไว้สำหรับคำนวณ Money Management ซึ่งจะช่วยอำนวยความสะดวกในการจัดการความเสี่ยงในการเทรด การคำนวณ Leverage ที่เหมาะสมกับความเสี่ยงที่คุณยอมรับได้ และจัดการจุด Stop Loss ให้เหมาะสมกับ Leverage นั้น
คำอธิบายเกี่ยวกับคำย่อ
LR หมายถึง Leverage ที่เหมาะสม
EP หมายถึง Entry Price หรือราคาเข้าซื้อ
BEP หมายถึง Break-Even Point หรือจุดคุ้มทุน (คุณสามารถย้าย Stop Loss มาที่จุดนี้เมื่อราคาไปถึงจุดหนึ่งเพื่อป้องกันการขาดทุนได้)
SL หมายถึง Stop Loss (ซึ่งเป็น Stop Loss ที่คำนวณใหม่เพื่อให้ตำแหน่งเหมาะสมกับ Leverage ที่คำนวณได้ คุณควรใช้จุดนี้เพื่อเป็นราคา Stop Loss แทนจุด Stop Loss ที่คุณกำหนดไว้ในตอนแรก)
TP หมายถึง Take Profit (เป็นจุดที่คุณจะขายทำกำไรตาม RR ที่กำหนดไว้)
* หมายเหตุ เมื่อเริ่มเปิด Indicator จะเกิด Error ขึ้น และไม่มีผลลัพท์ใด ๆ แสดงให้เห็น นั่นเป็นเพราะคุณต้องเข้าไปกำหนด Entry Price และ Stop Loss ในการตั้งค่าของ Indicator เสียก่อน
ต้องใช้ Leverage เท่าไหร่? มันเป็นคำถามที่ดูเหมือนง่าย แต่ตอบยาก
วิธีคำนวณ Leverage ที่เหมาะสม ใช้สมการคือ
Levarage = การขาดทุนที่ยอมรับได้ / (ระยะห่างระหว่าง Entry Price และ Stop Loss + (ค่าธรรมเนียมซื้อ + ค่าธรรมเนียมขาย))
นำผลลัพท์ Leverage ที่ได้มาคำนวณเพื่อหาจุด Stop Loss ที่ถูกต้อง (จุดของ Stop Loss จะมีการยืดขยายออกไปเล็กน้อย) โดยใช้สมการ
ตำแหน่ง Stop Loss ใหม่ = Entry Price * (1 - การขาดทุนที่ยอมรับได้ / (Leverage ที่คำนวณได้ * 100)) // สำหรับ Long
ตำแหน่ง Stop Loss ใหม่ = Entry Price * (1 + การขาดทุนที่ยอมรับได้ / (Leverage ที่คำนวณได้ * 100)) // สำหรับ Short
นำผลลัพท์ Leverage ที่ได้มาคำนวณเพื่อหาจุด Take Profit ที่ถูกต้อง (จุดของ Take Profit จะมีการยืดขยายออกไปเล็กน้อย) โดยใช้สมการ
ตำแหน่ง Take Profit = Entry Price * (1 + (การขาดทุนที่ยอมรับได้ / (Leverage ที่คำนวณได้ * 100) * RR) + ((ค่าธรรมเนียมซื้อ + ค่าธรรมเนียมขาย) / 100)) // สำหรับ Long
ตำแหน่ง Take Profit = Entry Price * (1 - (การขาดทุนที่ยอมรับได้ / (Leverage ที่คำนวณได้ * 100) * RR) + ((ค่าธรรมเนียมซื้อ + ค่าธรรมเนียมขาย) / 100)) // สำหรับ Short
ข้อดีของการคำนวณคือ
1. คุณจะได้ค่า Leverage ที่เหมาะสมกับความเสี่ยงที่คุณยอมรับได้โดยรวมค่าธรรมเนียมเข้าไปในนั้นแล้ว นั่นหมายความว่า ความสูญเสียจะเป็น 2% (ตามตัวอย่าง) จริง ๆ ไม่ใช่ 2% และถูกหักค่าธรรมเนียมเพิ่มอีก กลายเป็นสูญเสียมากกว่า 2%
2. การตั้ง Leverage มั่ว ๆ กลายเป็นความเสี่ยง นั่นเพราะตำแหน่งของ Stop Loss ไม่ได้อยู่ในจุดที่ควรจะเป็น การคำนวณนี้ช่วยให้คุณได้ Leverage ในตำแหน่ง Stop Loss ที่คุณต้องการโดยแท้จริง
3. ผลกำไรที่ได้รับตรงกับความต้องการจริง ๆ เช่น การขาดทุนที่ยอมรับได้ 2% และ RR 1:2 สิ่งที่คุณคิดคือกำไร 4% แต่จริง ๆ แล้วไม่ถึง 4% นั่นเพราะว่าโดนหักค่าธรรมเนียมไปส่วนหนึ่ง การคำนวณนี้ได้รวมค่าธรรมเนียมให้แล้ว คุณจึงได้กำไรที่ 4% อย่างถูกต้องตามต้องการ
ข้อควรระวัง
Indicator นี้ไม่ได้มีการควบคุมความเสี่ยงในเรื่องของ slippage หรือ requote โปรดใช้งานอย่างระมัดระวังและมีการเผื่อระยะสำหรับ slippage ด้วย
VWAP Breakout and Pullback StrategyThis Pine Script implements the following setups:
Breakout Trades:
A long breakout trade occurs when:
The price is above VWAP.
RSI > 50.
Volume is higher than the average volume (indicating a volume spike).
A short breakout trade occurs when:
The price is below VWAP.
RSI < 50.
Volume is higher than the average volume.
Pullback Entries:
A long pullback trade occurs when:
The price crosses above VWAP.
RSI > 50.
Volume is lower than the average volume (indicating a pullback with low momentum).
A short pullback trade occurs when:
The price crosses below VWAP.
RSI < 50.
Volume is lower than the average volume.
Features:
Signals: Buy and sell signals are plotted on the chart with breakout or pullback labels.
Alerts: Alerts are configured for each type of signal, enabling automation or notifications.
You can copy and paste this code into TradingView's Pine Script editor to test and use it for real-time
VWAP Divergence | dobofulopOverview :
This script identifies potential bullish and bearish divergence signals using the Volume Weighted Average Price (VWAP). It calculates VWAP resets based on a selected “Anchor Period” (Session, Week, Month, Quarter, Year, Decade, Century, or corporate events like Earnings, Dividends, Splits). When price action and VWAP move in opposite directions with a sufficiently large ATR-based move over a chosen lookback period, the script plots divergence dots on the chart.
Key Features:
VWAP Anchoring : Choose an anchor period for resetting VWAP. This could be daily, weekly, monthly, or based on specific corporate events (Earnings, Dividends, Splits).
Divergence Detection : Looks for instances where the price is moving up while VWAP moves down (potential bullish divergence), and vice versa for bearish divergence.
ATR Filter : Uses the ATR (Average True Range) to filter out minor or insignificant price moves, helping to reduce noise.
Gap Check : Automatically invalidates signals if large price gaps occur within the lookback range.
Visual Signals : Bullish divergences are plotted below the bar, while bearish divergences are plotted above, making it easy to spot potential reversal zones.
How to Us
Inputs:
- Anchor Period (Session, Week, Month, etc.) – determines when the VWAP calculation restarts.
- Source (Default: HLC3) – Price source for the VWAP.
- ATR Multiplier and Lookback Period – Fine-tune the threshold for detecting significant moves vs. VWAP.
Interpretation:
- Bullish Divergence Dot: Suggests potential price strength when price moves higher but VWAP moves lower.
- Bearish Divergence Dot: Suggests potential price weakness when price moves lower but VWAP moves higher.
Disclaimer:
This script is provided for educational purposes only and should not be interpreted as financial advice. Past performance does not guarantee future results. Always conduct your own analysis and consider consulting a financial professional before making trading decisions.