Reverse Divergence Strategy//@version=5
indicator("Reverse Divergence Strategy", overlay=true)
// RSI Settings
rsiLength = 14
rsiOverbought = 70
rsiOversold = 30
rsiValue = ta.rsi(close, rsiLength)
// Bullish Divergence
bullishDivergence = ta.lowest(close, 5) < ta.lowest(close, 5) and ta.lowest(rsiValue, 5) > ta.lowest(rsiValue, 5)
plotshape(bullishDivergence, style=shape.labelup, location=location.belowbar, color=color.green, text="Bullish Div")
// Bearish Divergence
bearishDivergence = ta.highest(close, 5) > ta.highest(close, 5) and ta.highest(rsiValue, 5) < ta.highest(rsiValue, 5)
plotshape(bearishDivergence, style=shape.labeldown, location=location.abovebar, color=color.red, text="Bearish Div")
Bands and Channels
ICT OTE StrategyBased on ICT's OTE Strategy. Feel free to test and where can be improved. Enjoy!
NB! Need to know ICT OTE concept to understand strategy.
Scalping Strategy//@version=5
strategy("Scalping Strategy", overlay=true)
// Indicators
ma50 = ta.sma(close, 50)
ema20 = ta.ema(close, 20)
ema200 = ta.ema(close, 200)
rsi = ta.rsi(close, 14)
osc = ta.stoch(close, high, low, 14)
vol = volume
// Trend Confirmation
bullishTrend = ema20 > ema200 and close > ma50
bearishTrend = ema20 < ema200 and close < ma50
// RSI Divergence Detection
rsiOverbought = rsi > 70
rsiOversold = rsi < 30
// Oscillator Confirmation
oscBull = osc < 20
oscBear = osc > 80
// Volume Confirmation
highVolume = vol > ta.sma(vol, 20)
// Entry Conditions
buySignal = bullishTrend and rsiOversold and oscBull and highVolume
sellSignal = bearishTrend and rsiOverbought and oscBear and highVolume
// Execute Trades
if buySignal
strategy.entry("Buy", strategy.long)
if sellSignal
strategy.entry("Sell", strategy.short)
// Plot indicators
plot(ma50, color=color.blue, title="MA 50")
plot(ema20, color=color.green, title="EMA 20")
plot(ema200, color=color.red, title="EMA 200")
Merged Trading Script [BigBeluga]Merger Of two pole oscillator and Volumatic variable dynamic average to create perfect sell and buy signals
Turtle Trading Mejorado para BTC 1Hturtle trading adapated to 1h
Canales Donchian:
Entrada: Periodo de 20 para detectar rupturas (largas y cortas).
Salida: Periodo de 10 para cerrar posiciones.
ATR (Average True Range):
Periodo de 14 para medir volatilidad y calcular el tamaño de las posiciones.
Gestión de Riesgo:
Riesgo por operación: 2% del capital.
Máximo de 4 unidades por posición.
Condiciones de Entrada:
Larga: Precio alto supera el máximo de 20 periodos.
Corta: Precio bajo cae por debajo del mínimo de 20 periodos.
Condiciones de Salida:
Larga: Precio bajo cae por debajo del mínimo de 10 periodos.
Corta: Precio alto supera el máximo de 10 periodos.
Añadir Unidades:
Se añaden unidades si el precio se mueve 0.5 ATR a favor, hasta 4 unidades.
Stop Loss:
Dinámico, basado en 2 ATR desde el precio de entrada.
FVG, Supply/Demand, Order Blocks with Volume & RSI Divergenceits a beginners analysis of using different strategies
SMA and EMA CloudEMA and SMA line cloud that shows when the 2 moving averages are either close or wide range, indicating volume and volatility.
Triple EMA with LabelsThis indicator "Triple EMA with Labels", is designed to plot the 8, 21, and 50 period Exponential Moving Averages (EMAs) on the chart. By default, the labels display "8 EMA", "21 EMA", and "50 EMA", positioned slightly above their respective lines for better visibility. Users can customize or remove the label text through the indicator settings, allowing flexibility to suit individual preferences.
Triple Moving Average with LabelsThis indicator "Triple Moving Average with Labels", overlays the 50, 100, and 200 period Simple Moving Averages (SMAs) on the chart and provides customizable floating labels for each line. By default, the labels display "50 MA", "100 MA", and "200 MA", but users can modify or remove the text entirely through the indicator settings. The moving average periods (50, 100, or 200) are also adjustable. The labels are positioned slightly above and to the right of their respective lines for clear visibility.
High and Low with Horizontal TableThis script is rudimentary, but it primarily intended to give the opening highs and lows of a time you specify in the Sydney Australian timezone (UTC+11). It is meant to give the high and low range of the opening market hours for markets opening sessions.
Irchesh Enhanced Momentum StrategyTrend Filter (EMA):
Dual EMA (50/200 periods) to identify the main trend
Long condition only when EMA 50 > EMA 200
Short condition only when EMA 50 < EMA 200
Momentum RSI with Divergences:
14-period RSI with customizable levels
Automatic detection of bullish/bearish divergences
Volume filter (1.5x the 20-period moving average)
Advanced Risk Management:
Fixed stop loss (1%) and take profit (2%)
Dynamic trailing stop (1.5%)
Option to disable the trailing stop
Additional Filters:
Price above/below fast EMA for confirmation
Volume above average to confirm strength
Recommended Optimization:
Test different EMA values (e.g., 21/50 instead of 50/200)
Adjust RSI parameters based on the timeframe
Experiment with different volume multipliers
Optimize stop loss/take profit levels
Important Notes:
The strategy works best in strongly trending markets
RSI divergences require volume confirmation
Use H1 or higher timeframes to reduce noise
Combine with fundamental analysis for better performance
Auto Fib Retracement with Buy/SellKey Features of the Advanced Script:
Multi-Timeframe (MTF) Analysis:
We added an input for the higher timeframe (higher_tf), where the trend is checked on a higher timeframe to confirm the primary trend direction.
Complex Trend Detection:
The trend is determined not only by the current timeframe but also by the trend on the higher timeframe, giving a more comprehensive and reliable signal.
Dynamic Fibonacci Levels:
Fibonacci lines are plotted dynamically, extending them based on price movement, with the Fibonacci retracement drawn only when a trend is identified.
Background Color & Labels:
A background color is added to give a clear indication of the trend direction. Green for uptrend, red for downtrend. It makes it visually easier to understand the current market structure.
"Buy" or "Sell" labels are shown directly on the chart to mark possible entry points.
Strategy and Backtesting:
The script includes strategy commands (strategy.entry and strategy.exit), which allow for backtesting the strategy in TradingView.
Stop loss and take profit conditions are added (loss=100, profit=200), which can be adjusted according to your preferences.
Next Steps:
Test with different timeframes: Try changing the higher_tf to different timeframes (like "60" or "240") and see how it affects the trend detection.
Adjust Fibonacci settings: Modify how the Fibonacci levels are calculated or add more Fibonacci levels like 38.2%, 61.8%, etc.
Optimize Strategy Parameters: Fine-tune the entry/exit logic by adjusting stop loss, take profit, and other strategy parameters.
This should give you a robust foundation for creating advanced trend detection strategies
🐋Parabolic SAR (V1.0)This script provides an enhanced implementation of the Parabolic SAR (Stop and Reverse) indicator, a popular tool for identifying potential trend reversals in financial markets. The script incorporates additional features for improved usability and trading decision-making:
Key Features:
Customizable Parameters:
Initial Acceleration Factor: Start value for the SAR calculation.
Increment: Step value that increases the SAR during a trend.
Maximum Acceleration Factor: Cap for the SAR to prevent over-adjustment.
Buy & Sell Signals:
Buy Signal: Triggered when the price crosses above the SAR.
Sell Signal: Triggered when the price crosses below the SAR.
Signals are displayed as visually intuitive labels ("Buy" and "Sell") on the chart.
Alerts Integration:
Configurable alerts for buy and sell signals, allowing users to stay informed without actively monitoring the chart.
Dynamic Candle Coloring:
Candlesticks are dynamically colored based on the most recent signal:
Green: Buy signal (bullish trend).
Red: Sell signal (bearish trend).
Elegant SAR Plot:
The SAR is plotted as cross-style markers with a visually appealing magenta color.
How to Use:
Adjust the Initial Acceleration Factor, Increment, and Maximum Acceleration Factor in the input settings to match your trading style.
Enable alerts to receive notifications when buy or sell signals are generated.
Use the colored candlesticks as an additional confirmation tool to visualize market trends directly on the chart.
SBS INTRA PROIndicator is useful for both intraday and long term purposes.
use 5 MIn, 15Min TF for intraday
and for long term use Weekly TF.
PSAR with AO and RSIThis script is a Parabolic SAR-based trading strategy enhanced with Awesome Oscillator (AO) confirmation and sideways market detection using RSI. It generates Buy and Sell signals based on the following conditions:
[3Commas] Turtle StrategyTurtle Strategy
🔷 What it does: This indicator implements a modernized version of the Turtle Trading Strategy, designed for trend-following and automated trading with webhook integration. It identifies breakout opportunities using Donchian channels, providing entry and exit signals.
Channel 1: Detects short-term breakouts using the highest highs and lowest lows over a set period (default 20).
Channel 2: Acts as a confirmation filter by applying an offset to the same period, reducing false signals.
Exit Channel: Functions as a dynamic stop-loss (wait for candle close), adjusting based on market structure (default 10 periods).
Additionally, traders can enable a fixed Take Profit level, ensuring a systematic approach to profit-taking.
🔷 Who is it for:
Trend Traders: Those looking to capture long-term market moves.
Bot Users: Traders seeking to automate entries and exits with bot integration.
Rule-Based Traders: Operators who prefer a structured, systematic trading approach.
🔷 How does it work: The strategy generates buy and sell signals using a dual-channel confirmation system.
Long Entry: A buy signal is generated when the close price crosses above the previous high of Channel 1 and is confirmed by Channel 2.
Short Entry: A sell signal occurs when the close price falls below the previous low of Channel 1, with confirmation from Channel 2.
Exit Management: The Exit Channel acts as a trailing stop, dynamically adjusting to price movements. To exit the trade, wait for a full bar close.
Optional Take Profit (%): Closes trades at a predefined %.
🔷 Why it’s unique:
Modern Adaptation: Updates the classic Turtle Trading Strategy, with the possibility of using a second channel with an offset to filter the signals.
Dynamic Risk Management: Utilizes a trailing Exit Channel to help protect gains as trades move favorably.
Bot Integration: Automates trade execution through direct JSON signal communication with your DCA Bots.
🔷 Considerations Before Using the Indicator:
Market & Timeframe: Best suited for trending markets; higher timeframes (e.g., H4, D1) are recommended to minimize noise.
Sideways Markets: In choppy conditions, breakouts may lead to false signals—consider using additional filters.
Backtesting & Demo Testing: It is crucial to thoroughly backtest the strategy and run it on a demo account before risking real capital.
Parameter Adjustments: Ensure that commissions, slippage, and position sizes are set accurately to reflect real trading conditions.
🔷 STRATEGY PROPERTIES
Symbol: BINANCE:ETHUSDT (Spot).
Timeframe: 4h.
Test Period: All historical data available.
Initial Capital: 10000 USDT.
Order Size per Trade: 1% of Capital, you can use a higher value e.g. 5%, be cautious that the Max Drawdown does not exceed 10%, as it would indicate a very risky trading approach.
Commission: Binance commission 0.1%, adjust according to the exchange being used, lower numbers will generate unrealistic results. By using low values e.g. 5%, it allows us to adapt over time and check the functioning of the strategy.
Slippage: 5 ticks, for pairs with low liquidity or very large orders, this number should be increased as the order may not be filled at the desired level.
Margin for Long and Short Positions: 100%.
Indicator Settings: Default Configuration.
Period Channel 1: 20.
Period Channel 2: 20.
Period Channel 2 Offset: 20.
Period Exit: 10.
Take Profit %: Disable.
Strategy: Long & Short.
🔷 STRATEGY RESULTS
⚠️Remember, past results do not guarantee future performance.
Net Profit: +516.87 USDT (+5.17%).
Max Drawdown: -100.28 USDT (-0.95%).
Total Closed Trades: 281.
Percent Profitable: 40.21%.
Profit Factor: 1.704.
Average Trade: +1.84 USDT (+1.80%).
Average # Bars in Trades: 29.
🔷 How to Use It:
🔸 Adjust Settings:
Select your asset and timeframe suited for trend trading.
Adjust the periods for Channel 1, Channel 2, and the Exit Channel to align with the asset’s historical behavior. You can visualize these channels by going to the Style tab and enabling them.
For example, if you set Channel 2 to 40 with an offset of 40, signals will take longer to appear but will aim for a more defined trend.
Experiment with different values, a possible exit configuration is using 20 as well. Compare the results and adjust accordingly.
Enable the Take Profit (%) option if needed.
🔸Results Review:
It is important to check the Max Drawdown. This value should ideally not exceed 10% of your capital. Consider adjusting the trade size to ensure this threshold is not surpassed.
Remember to include the correct values for commission and slippage according to the symbol and exchange where you are conducting the tests. Otherwise, the results will not be realistic.
If you are satisfied with the results, you may consider automating your trades. However, it is strongly recommended to use a small amount of capital or a demo account to test proper execution before committing real funds.
🔸Create alerts to trigger the DCA Bot:
Verify Messages: Ensure the message matches the one specified by the DCA Bot.
Multi-Pair Configuration: For multi-pair setups, enable the option to add the symbol in the correct format.
Signal Settings: Enable the option to receive long or short signals (Entry | TP | SL), copy and paste the messages for the DCA Bots configured.
Alert Setup:
When creating an alert, set the condition to the indicator and choose "alert() function call only".
Enter any desired Alert Name.
Open the Notifications tab, enable Webhook URL, and paste the Webhook URL.
For more details, refer to the section: "How to use TradingView Custom Signals".
Finalize Alerts: Click Create, you're done! Alerts will now be sent automatically in the correct format.
🔷 INDICATOR SETTINGS
Period Channel 1: Period of highs and lows to trigger signals
Period Channel 2: Period of highs and lows to filter signals
Offset: Move Channel 2 to the right x bars to try to filter out the favorable signals.
Period Exit: It is the period of the Donchian channel that is used as trailing for the exits.
Strategy: Order Type direction in which trades are executed.
Take Profit %: When activated, the entered value will be used as the Take Profit in percentage from the entry price level.
Use Custom Test Period: When enabled signals only works in the selected time window. If disabled it will use all historical data available on the chart.
Test Start and End: Once the Custom Test Period is enabled, here you select the start and end date that you want to analyze.
Check Messages: Check Messages: Enable this option to review the messages that will be sent to the bot.
Entry | TP | SL: Enable this options to send Buy Entry, Take Profit (TP), and Stop Loss (SL) signals.
Deal Entry and Deal Exit: Copy and paste the message for the deal start signal and close order at Market Price of the DCA Bot. This is the message that will be sent with the alert to the Bot, you must verify that it is the same as the bot so that it can process properly.
DCA Bot Multi-Pair: You must activate it if you want to use the signals in a DCA Bot Multi-pair in the text box you must enter (using the correct format) the symbol in which you are creating the alert, you can check the format of each symbol when you create the bot.
👨🏻💻💭 We hope this tool helps enhance your trading. Your feedback is invaluable, so feel free to share any suggestions for improvements or new features you'd like to see implemented.
__
The information and publications within the 3Commas TradingView account are not meant to be and do not constitute financial, investment, trading, or other types of advice or recommendations supplied or endorsed by 3Commas and any of the parties acting on behalf of 3Commas, including its employees, contractors, ambassadors, etc.