NCrypt30 Breadth Strategy (Long Only, SMA 60, 7% SL)Breadth indication is the top 30 coin on coinbase by marketcap excluding BTC ETH & Stables to show overall alts sentiment. Trade will trigger when breadth hits 0 = the top 30 tokens on coinbase are all under the 60sma on the 4hr timeframe. The strategy has the trade close when breadth hits 100 or hits the stop loss which i have set at 7%, although is changeable to your risk tolerance.
Indicadores e estratégias
NA GPT - TTM Squeeze Strategy**NA GPT - TTM Squeeze Strategy**” transforms the well-known TTM Squeeze indicator into a back-testable, long-only strategy.
It combines **volatility compression** (Bollinger Bands inside Keltner Channels) with **momentum confirmation** to catch powerful bullish breakouts and then trails positions with a simple 21-period moving-average stop.
---
## 1. Core Concepts & Calculations
| Component | What it measures | How it works |
| ---------------------- | ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Squeeze State** | Volatility contraction vs. expansion | • Calculate a 20-period Bollinger Band (BB). • Calculate a 20-period Keltner Channel (KC). • **Squeeze ON** when the entire BB is *inside* the KC (narrow volatility). |
| **Momentum Histogram** | Direction & strength of pressure building inside the squeeze | • Compute the midpoint of the recent high/low range and the 20-period SMA of close. • Take the price’s deviation from that blended average. • Fit a **20-period linear regression** to that deviation to produce the histogram. • Color logic: ↗ increasing green/lime for strengthening bulls, ↘ red/maroon for bears. |
| **Blue-Dot Theme** | Visual cue of squeeze state | • **Navy-blue dot** = Squeeze ON (ready to pop). • **Steel-blue dot** = Squeeze just released. • **Sky-blue dot** = Neutral (no squeeze). |
---
## 2. Trade Logic
| Step | Condition | Rationale |
| ---------------- | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| **Entry (Long)** | Three consecutive navy-blue dots (i.e., **3 bars with Squeeze ON in a row**) *inside the user-defined date window*. | Requires sustained volatility compression before committing capital, filtering out one-bar “fake” squeezes. |
| **Exit (Flat)** | Close price **crosses below** the 21-period Simple Moving Average. | A classic trailing stop that lets profits run while cutting momentum failures. |
| **Positioning** | Long-only, one trade at a time. No short sales. | Focuses on bullish breakouts, keeps strategy simple and margin-friendly. |
---
## 3. Inputs & Customisation
| Input | Default | Purpose |
| -------------------------- | ------------------------ | ---------------------------------------------- |
| **BB Length / Multiplier** | 20 / 2.0 | Adjust sensitivity of Bollinger Bands. |
| **KC Length / Multiplier** | 20 / 1.5 | Adjust Keltner Channel width. |
| **Use True Range (KC)** | ✔ | Pick *True Range* vs. *High-Low* for KC width. |
| **Trade Window** | 1 Jan 2022 → 31 Dec 2069 | Back-test only the period you care about. |
| **Commission** | 0.01 % | Embedded in `strategy()` header. |
| **Slippage (Ticks)** | 3 | Models real-world order fill uncertainty. |
---
## 4. Visual Outputs
* **Momentum Histogram** (green / lime / red / maroon).
* **Zero Line** colored by squeeze state (blue / dark navy / grey).
* **Blue-Dot Row** at the chart bottom showing squeeze timing.
The visuals are **identical** to the original indicator, letting you correlate back-test trades with familiar chart cues.
---
## 5. How to Use
1. **Add to chart**, choose your symbol & timeframe (works on anything from 1-minute to weekly).
2. **Tune the BB/KC/ATR settings** to match instrument volatility.
3. **Adjust the date window** for focused walk-forward testing.
4. Run the “**Strategy Tester**” to inspect historical performance, P\&L; curves, drawdowns, and trade list.
5. Use the plotted dots & histogram to visually validate why each trade fired.
6. Combine with your own risk-management (position sizing, portfolio filters, etc.) before going live.
---
## 6. Practical Notes
* Designed for educational/back-testing purposes—**not financial advice**.
* Long-only by design; add your own short logic if desired.
* Because exits rely on the 21-SMA, extremely low-volume instruments or illiquid intraday timeframes may experience wider drawdowns.
* Commission/slippage values are easily editable in the first line of the script.
Nikko MACD + SMA 200 MEME coin strategyStrategy: MACD + SMA 200
Version: 2.0
Original Concept: ChartArt – November 30, 2015
Updated By: CryptoNikkoid – June 2025
📈 Description
This strategy combines the MACD indicator with a long-term trend filter using the 200-period Simple Moving Average (SMA 200). It aims to capture trend-following entries while avoiding false signals during choppy or sideways markets.
✅ Entry Conditions
Long Entries:
MACD Histogram is greater than 0
MACD Momentum is positive
MACD Fast Line crosses above the Slow Line
Price is above the SMA 200
Short Entries:
All of the above conditions are reversed
MACD Histogram < 0
MACD Momentum < 0
Fast Line crosses below the Slow Line
Price is below the SMA 200
🛡️ Risk Management
Includes a maximum intraday equity loss filter of 50% to prevent large drawdowns.
Disclaimer:
This strategy is provided for educational and informational purposes only. Trading involves risk, and results may vary depending on configuration and market conditions. Always backtest thoroughly over a significant number of trades and monitor live performance carefully before considering any real trading. I am not offering financial advice.
[alert-custome] direction-ema-dca-rsi-security
Below is a detailed description of the Pine Script v5 strategy titled direction-ema-dca-rsi-security. This strategy automates Long or Short trading on cryptocurrency pairs (e.g., BTCUSDT.P), leveraging technical indicators such as EMA, RSI, and ATR, combined with a Dollar Cost Averaging (DCA) approach. It integrates with OKX via alerts for automated trading execution.
Overview
Strategy Name: direction-ema-dca-rsi-security
Objective: Automate Long or Short trades using EMA, RSI, and ATR signals, with DCA to improve average position price when the market moves against the position. The strategy allows customization of trade direction (Long or Short) and integrates with OKX for automated execution.
Type: Supports both Long and Short trades, using leverage and flexible capital management.
Target Market: Designed for high-volatility cryptocurrency markets, particularly perpetual futures pairs like BTCUSDT.P.
Key Features:
Uses Fast and Slow EMAs to identify trends and entry points.
Combines RSI from the current timeframe and a user-defined timeframe (security RSI) to detect overbought/oversold conditions.
Implements DCA to add to positions when prices move unfavorably.
Integrates with OKX via JSON alerts for automated trading.
Supports Take Profit (TP) and Stop Loss (SL) based on ATR or percentage values.
Structure and Key Components
1. Strategy Configuration
Basic Settings:
Initial Capital: $1,000.
Leverage: Default 6x, adjustable from 1x to 10x.
Order Type: Cash-based, with a default quantity of 10.
Commission: 0.1% per trade.
Pyramiding: Allows up to 100 concurrent orders.
Slippage: 3 pips.
Backtest Fill Limits Assumption: 3 pips, ensuring limit orders are filled within a price range.
Calculate on Order Fills: Enabled (calc_on_order_fills = true).
Use Bar Magnifier: Enabled for detailed candle data calculations.
Fill Orders on Standard OHLC: Enabled, ensuring orders match standard open, high, low, close prices.
2. Input Parameters
The strategy offers customizable inputs, grouped as follows:
Strategy:
Fast/Slow EMA Length: Fast EMA (default 9), Slow EMA (default 21) for trend detection.
ATR Length: Default 14 for volatility measurement.
RSI Length: Default 14 for overbought/oversold detection.
RSI Security Timeframe: Default 15 minutes (options: 5m, 15m, 30m, 1h, 4h, D, W, M).
Direction Security Timeframe: Default daily (options: 4h, D, W, M).
Strategy Size:
Init Webhook Balance ($): Initial balance for webhook (default 0, uses strategy balance if unset).
Leverage: Financial leverage (default 6x).
Init Size Equity (%): Initial position size as a percentage of equity (default 2%).
Size Increase (%): Position size increase per DCA order (default 15%).
Max DCA Orders: Maximum DCA orders (default 15).
Strategy DCA:
Init Percent to DCA (%): Initial price drop/rise for DCA (default 2%).
Increase Step Percent to DCA (%): Incremental DCA price adjustment (default 1%).
Decrease DCA with ATR: ATR multiplier for DCA price (default 0, disabled).
Strategy DCA RSI:
RSI to DCA: RSI threshold for DCA (default 50, below for Long, above for Short).
Security RSI to DCA: RSI threshold for security timeframe (default 50).
Strategy Delay:
Off-Time Delays / Order (s): Delay between orders (default 1000 seconds).
Off-Time Active Stop Loss (Hour): Delay for activating Stop Loss (default 0, disabled).
Strategy TPSL (Take Profit/Stop Loss):
ATR Multiplier TP: ATR multiplier for Take Profit (default 2x).
Init TP (%): Initial Take Profit percentage (default 2%).
ATR Multiplier SL: ATR multiplier for Stop Loss (default 0, disabled).
Init SL (%): Initial Stop Loss percentage (default 0%, disabled).
Strategy Direction:
Trade Direction: Trade direction (default Long, options: Long, Short).
Strategy OKX:
OKX Signal Key: Signal key for OKX API integration.
3. Market Data
Technical Indicators:
EMA: Fast EMA (9) and Slow EMA (21) on the current timeframe for trend identification.
RSI: RSI (14) on the current timeframe and a user-defined timeframe (rsiSecurityTimeframe) for overbought/oversold signals.
ATR: ATR (14) for volatility-based calculations of TP, SL, and DCA prices.
External Library: Uses jason5480/chrono_utils/6 for time-related functions.
4. Entry Conditions
Long Position:
Condition 1: Fast EMA crosses above Slow EMA (ta.crossover(fastMA, slowMA)), or
Condition 2: RSI ≤ rsiTrigger (default 50), Fast EMA ≤ Slow EMA, and RSI security ≤ rsiSecurityTrigger (default 50).
Short Position:
Condition 1: Fast EMA crosses below Slow EMA (ta.crossunder(fastMA, slowMA)), or
Condition 2: RSI ≥ rsiTrigger, Fast EMA ≥ Slow EMA, and RSI security ≥ rsiSecurityTrigger.
Constraints:
Entries are allowed only if tradeDirection matches the signal (Long or Short).
Open trades ≤ maxDCAOrders (default 15).
Current price meets DCA conditions (if positions exist).
Time since last order ≥ offTimeMsOpen (default 1000 seconds).
5. Dollar Cost Averaging (DCA)
DCA Conditions:
Long: Current price ≤ DCA price, calculated as:
strategy.position_avg_price - (atrValue * decreaseDCAWithATR), or
strategy.position_avg_price * (1 - currentUnderPercentDCA) (default 2%, increasing by 1% per DCA).
Short: Current price ≥ DCA price, calculated similarly but for price increases.
DCA Management:
Position size increases by 15% per DCA (stepSizePercent).
DCA price distance increases by 1% per order (stepDecreasePercentDCA).
Maximum 15 DCA orders (maxDCAOrders).
6. Position Management
Position Size:
Initial size: 2% of equity (initSizeEquity).
Increases by 15% per DCA order.
Limited by leverage and current balance (currentBalance).
Current Balance:
If webhookInitBalance = 0, uses initial_capital + netprofit + openprofit.
If webhookInitBalance > 0, uses this value plus net and open profits.
Order Delay: Ensures a minimum gap of 1000 seconds between orders (offTimeMsOpen).
7. Exit Conditions
Take Profit (TP):
Long: strategy.position_avg_price + (atrValue * atrMultiplierTP) (default 2x ATR), or strategy.position_avg_price * (1 + initTP) (default 2%).
Short: strategy.position_avg_price - (atrValue * atrMultiplierTP), or strategy.position_avg_price * (1 - initTP).
Stop Loss (SL):
Long: strategy.position_avg_price - (atrValue * atrMultiplierSL), or strategy.position_avg_price * (1 - initSL).
Short: strategy.position_avg_price + (atrValue * atrMultiplierSL), or strategy.position_avg_price * (1 + initSL).
Currently, atrMultiplierSL and initSL = 0, meaning Stop Loss is disabled.
Exit Execution:
Uses strategy.order for Long TP and strategy.exit for Short TP, closing the entire position when TP is reached.
Sends OKX alerts for exits (EXIT_LONG or EXIT_SHORT).
8. Visualization
Plots:
Fast EMA: Red.
Slow EMA: Aqua.
Take Profit Price: Lime.
Position Average Price: Gray.
Background Color: Commented out, but can display green for Long or red for Short.
9. OKX Integration
Alerts:
Sends JSON alerts for entries (ENTER_LONG, ENTER_SHORT) and exits (EXIT_LONG, EXIT_SHORT), including:
Market position, size, order type (market), and investment percentage.
OKX signal key (okxSignalKeyInput) for API integration.
How the Strategy Works
Market Analysis:
Uses EMA (9, 21) for trend detection (crossover/crossunder).
Combines RSI from the current and security timeframes to confirm overbought/oversold conditions.
ATR measures volatility for TP, SL, and DCA price calculations.
Entry:
Long: Triggers on EMA crossover or RSI in oversold territory with a bearish trend.
Short: Triggers on EMA crossunder or RSI in overbought territory with a bullish trend.
Entries are restricted by tradeDirection setting.
DCA:
Adds positions when price moves against the trade (down for Long, up for Short) based on RSI or ATR conditions.
Increases position size and DCA price distance per order.
Exit:
Closes positions when price hits TP (ATR or percentage-based).
Stop Loss is currently disabled, posing a risk.
Risk Management:
Limits DCA orders to 15.
Enforces time delays between orders.
Caps leverage at 10x.
Strengths
Flexible Direction: Supports both Long and Short trades.
Effective DCA: Improves average position price in volatile markets.
OKX Integration: Automates trading via OKX API.
Multi-Timeframe Analysis: Uses RSI from a secondary timeframe for confirmation.
Customizable Capital Management: Adjustable position sizes and leverage.
Weaknesses
No Stop Loss: Disabled SL increases risk of large losses.
OKX Dependency: Requires accurate API configuration.
Simple Conditions: Relies primarily on EMA and RSI, potentially lacking depth.
Fixed Timeframes: Commented-out EMA security logic limits trend analysis flexibility.
Practical Applications
Target Market: High-volatility crypto markets, especially perpetual futures like BTCUSDT.P.
Trading Style: Suitable for short- to medium-term traders using DCA for risk management.
Optimization: Adjust fastMALen, slowMALen, rsiTrigger, or maxDCAOrders for specific markets.
Improvement Suggestions
Enable Stop Loss: Set atrMultiplierSL or initSL > 0 to protect capital.
Use EMA Security: Uncomment fastDirectionEMA and slowDirectionEMA code to enhance trend accuracy.
Optimize Parameters: Use TradingView’s optimization tool to fine-tune rsiTrigger, atrMultiplierTP, or maxDCAOrders.
Add Indicators: Incorporate Volume, ADX, or other indicators for robust entry signals.
Leverage Alerts: Add warnings for high-leverage risks in volatile conditions.
If you need further analysis, code optimization, or additional strategy development, let me know!
IKODO Breakout Strategy📈 IKODO Breakout Strategy – Customizable Candle-Based Breakout Detector
This indicator is designed to detect breakout opportunities based on your preferred candle range.
Whether you're a scalper looking for short-term moves or a swing trader waiting for longer consolidations, you can fully customize the number of candles used to define the breakout window.
🔧 Features:
Adjustable breakout period (define how many candles the price should consolidate before a breakout is valid)
Works on all timeframes and assets
Ideal for identifying breakout zones and potential trend initiations
🎯 How It Works: The indicator analyzes price action within the defined candle range and highlights breakout points when price exceeds the established high/low thresholds.
This gives traders clear signals when a breakout from a range is statistically significant.
💡 Tip: Combine with volume or momentum indicators for more confluence.
Not Financal advice
15m Breakout w/ % SL + Min HoldThis 15-minute breakout strategy identifies the prior period’s swing high and swing low over a user-defined lookback, plotting them as entry thresholds. Trades execute only within a specified session and align with the EMA trend: longs above the EMA, shorts below. Upon entry, a fixed percentage stop-loss immediately caps risk. After holding for a minimum number of bars, the strategy replaces the hard stop with an ATR-based trailing stop—triggered once the specified hold-time elapses—to lock in profits as momentum continues. By combining breakout triggers, trend filtering, hard stops, and delayed trailing exits, it provides disciplined risk management and profit capture.
Zero Lag Trend Strategy (MTF)🧠 Strategy Overview
The Zero Lag Trend Signals Strategy (MTF) is a high-precision, multi-timeframe trend-following system designed for traders seeking early trend entries and intelligent exits. Built around ZLEMA-based signal detection, based on the original indicator Zero Lag Trend Signals (MTF) from AlgoAlpha, now built as a strategy with several improvements for Exit Criteria include RR, ATR Stop Loss, Trailing stop loss, etc. See below.
This momentum strategy works much better for higher timeframes, typically 4 hours or higher. This particular combination only contains 57 trades because this captures larger trend moves. The dataset contains realistic commission and slippage. You can try to run this on a smaller timeframe, but you will need to try different combinations of length, band multiplier, risk-reward ratios, and other stop loss criteria.
🔍 Key Components
1️⃣ ZLEMA Trend Engine
ZLEMA (Zero-Lag EMA) forms the foundation of the trend signal system.
Detects bullish and bearish momentum by analyzing price action crossing custom ZLEMA bands.
Optional confirmation using 5-bar ZLEMA slope filters (up/down trends) ensures high-conviction entries.
2️⃣ Volatility-Based Signal Bands
Dynamic bands are calculated using ATR (volatility) stretched over 3× period length.
These bands define entry zones (outside the bands) and trend strength.
Price crossing above/below the bands triggers trend change detection.
3️⃣ Entry Logic
Primary long entries occur when price crosses above the upper ZLEMA band.
Short entries (optional) trigger on downside cross under the lower band.
Re-entry logic allows continuation trades during strong trends.
Filters include date range, ZLEMA confirmation, and previous position state.
4️⃣ Exit Logic & Risk Management
Supports multiple customizable exit mechanisms:
🔺 Stop-Loss & Take-Profit
ATR-Based SL/TP: Uses ATR multipliers to dynamically set levels based on volatility.
Fixed Risk-Reward TP: Targets profit based on predefined RR ratios.
Break-Even Logic: Automatically moves SL to entry once a threshold RR is hit.
EMA Exit: Optional trailing exit based on price vs. short EMA.
🔀 Trailing Stop
Follows price action using a trailing ATR-based buffer that tightens with trend movement.
🔁 Trend-Based Exit
Automatically closes positions when the detected trend reverses.
5️⃣ Multi-Option Trade Filtering
Enable/disable short trades, ZLEMA confirmations, re-entries, etc.
Time-based backtesting filters for isolating performance within custom periods.
6️⃣ Visual Feedback & Annotations
Trend shading overlays: Green for bullish, red for bearish zones.
Up/Down triangle markers show when ZLEMA is rising/falling for 5 bars.
Stop-loss, TP, trailing lines drawn dynamically on the chart.
Floating stats table displays live performance (PnL, win %, GOA, drawdown, etc.).
Trade log labels annotate closed trades with entry/exit, duration, and reason.
7️⃣ CSV Export Integration
Seamless export of trade data including:
Entry/exit prices
Bars held
Encoded exit reasons
Enables post-processing or integration with external optimizers.
⚙️ Configurable Parameters
All key elements are customizable:
Entry band length and multiplier
ATR lengths, multipliers, TP/SL, trailing stop, break-even
Profit target RR ratio
Toggle switches for confirmations, trade types, and exit methods
🔥 Nikko Ultra-Active Scalper (MACD + RSI)🔥 Nikko Ultra-Active Scalper (MACD + RSI)
This is a fun, high-frequency scalper with some unpredictable results in backtesting. II recommend you backtest it over a 1-year period with CRYPTOCAP:SUI to see for yourself.
While the strategy works in live conditions, there seems to be a strange issue with how TradingView calculates the backtesting (the Hold blue line behaves oddly). It might be due to certain factors in the script's execution, but I’m not entirely sure. Sor example I get a negative PNL while making profit? That is weird. I might have missed something.
I’ve not encrypted the source code, so I’m hoping someone in the community can help identify why the backtest results are behaving unexpectedly.
Enjoy experimenting with this little bot, use 1m-2n timeframe— and while it’s fun to imagine getting rich with minimal effort, remember, it’s just for entertainment and educational purposes!
----------------------------------------------
DESCRIPTION: READ FIRST
This script is a high-frequency trading strategy written in Pine Script v6 for use on TradingView, designed to open several long positions per day on fast-moving markets like crypto. Here's how it works:
📌 Strategy Overview:
It uses short-term technical indicators — MACD and RSI — to detect brief momentum bursts, enters trades quickly, and exits with a tight take-profit. It’s optimized for 1-minute timeframes.
🧠 Entry Conditions (When it Buys):
The strategy opens a long position when:
MACD > Signal Line using fast settings (6,13,5):
This shows short-term upward momentum.
RSI > 40 with a 7-period length:
This confirms bullish strength, even if modest.
Because the settings are very relaxed, this combination triggers frequently, producing multiple trades per day.
🎯 Exit Condition (When it Sells):
It closes all open positions when:
The price rises to a set profit target (takeProfitPercent, default 0.9%).
There is no stop loss or trailing stop — this means the trade will stay open until it either hits the profit or you close manually (or modify the script).
⚙️ Other Features:
pyramiding = 100
Allows up to 100 simultaneous open positions (great for scalping in volatile uptrends).
strategy.percent_of_equity = 1
Each trade uses 1% of available equity, but can be adjusted.
Visual Bar Coloring
Bars turn green when an entry condition is met (barcolor(entryCond ? color.lime : na)).
📈 Designed For:
1-2 minute(S) timeframes
Volatile assets (crypto, meme coins, high-volume stocks)
High-frequency trading where you're in/out fast with small gains
SniperMA Scalper (Long Only, Clean)use on 15s chart and back test from 01.01 2024 100.000k good luck and don't forget to like if you find good results
IKODO Engulfing Strategy with Dynamic RR# 📈 ELITE ENGULFING STRATEGY - PUBLICATION DESCRIPTION
## **🎯 TITLE:**
**Elite Engulfing Strategy with Dynamic Risk Management - Advanced Pattern Recognition System**
---
## **📊 DESCRIPTION:**
### **🚀 OVERVIEW:**
The **Elite Engulfing Strategy** is a sophisticated trading system that combines advanced pattern recognition with dynamic risk management. This strategy identifies high-probability engulfing patterns while using the 50 EMA as a trend filter, ensuring trades align with the dominant market direction.
### **🔍 KEY FEATURES:**
**📈 ADVANCED PATTERN RECOGNITION:**
- Enhanced engulfing pattern detection with mathematical validation
- Quality filters including wick analysis and body-to-body ratio
- Volume confirmation for signal strength
- ATR-based volatility filtering for optimal entry timing
**🎯 DYNAMIC RISK MANAGEMENT:**
- Customizable Risk-Reward ratio (0.5x to 10x)
- Fibonacci-based take profit levels using swing highs/lows
- ATR-enhanced stop loss placement with buffer zones
- Real-time position sizing based on market volatility
**📊 INTELLIGENT FILTERING SYSTEM:**
- 50 EMA trend filter for directional bias
- Volume multiplier confirmation (1.0x to 3.0x average)
- Minimum engulfing ratio validation (0.01 to 1.0)
- Maximum wick ratio quality control (10% to 80%)
**🔔 COMPREHENSIVE ALERT SYSTEM:**
- Real-time entry signals with price and RR information
- Both alertcondition() and alert() functions for maximum compatibility
- Detailed signal descriptions for manual verification
### **📋 STRATEGY LOGIC:**
**🟢 LONG ENTRY CONDITIONS:**
- Price above 50 EMA (bullish trend confirmation)
- Current bullish candle completely engulfs previous bearish candle
- Current candle's low penetrates previous candle's low
- Volume exceeds average by specified multiplier
- ATR volatility meets minimum threshold
- Wick size within acceptable parameters
**🔴 SHORT ENTRY CONDITIONS:**
- Price below 50 EMA (bearish trend confirmation)
- Current bearish candle completely engulfs previous bullish candle
- Current candle's high penetrates previous candle's high
- Volume and volatility confirmations as above
### **⚙️ CUSTOMIZABLE PARAMETERS:**
**🎯 Risk Management:**
- Risk-Reward Ratio: 0.5 to 10.0 (default: 2.0)
- Fibonacci TP Level: 0.236 to 1.0 (default: 0.618)
- Use Fibonacci toggle for advanced exit strategy
**📈 Trend Analysis:**
- EMA Length: 1 to 200 periods (default: 50)
- EMA Source: OHLC4, Close, HL2, etc.
**🔍 Pattern Quality:**
- Minimum Engulfing Ratio: 0.01 to 1.0 (default: 0.1)
- Maximum Wick Ratio: 10% to 80% (default: 30%)
**🔧 Advanced Filters:**
- Volume Filter: On/Off with 1.0x to 3.0x multiplier
- ATR Filter: 1 to 50 periods with 0.1 to 2.0 ratio threshold
### **📊 PERFORMANCE METRICS:**
- Real-time P&L tracking
- Current trend identification
- ATR volatility measurement
- Risk-reward ratio display
- Strategy parameter overview
### **🎨 VISUAL ELEMENTS:**
- 50 EMA trend line with dynamic coloring
- Entry signals with triangular markers
- Stop loss and take profit levels
- Entry price reference line
- Comprehensive information table
### **💡 BEST PRACTICES:**
- Recommended for 1H to 4H timeframes
- Works best in trending markets
- Combine with higher timeframe analysis
- Use proper position sizing (1-2% risk per trade)
- Monitor during high-impact news events
### **🔧 COMPATIBILITY:**
- Pine Script v6
- Compatible with all TradingView account types
- Optimized for both free and premium users
- Works on all asset classes (Forex, Crypto, Stocks, Indices)
### **⚠️ DISCLAIMER:**
This strategy is for educational purposes only. Past performance does not guarantee future results. Always use proper risk management and never risk more than you can afford to lose. Test thoroughly on paper trading before live implementation.
## **📝 USAGE INSTRUCTIONS:**
1. Add the strategy to your chart
2. Adjust parameters according to your risk tolerance
3. Set up alerts for automated notifications
4. Backtest on your preferred timeframe and asset
5. Start with paper trading to validate performance
6. Implement proper position sizing for live trading
**🎯 Ready to elevate your trading game with professional-grade pattern recognition!**
MTF strategy with (CE, TT, Bernoulli,DMF,RSI filters)Strategy Overview
The strategy designed to be highly customizable, allowing users to select and configure different components.
Key Components:
1. Entry Signal Source
You can choose between two primary signal generators:
Chandelier Exit: A volatility-based indicator that provides buy/sell signals when the price moves a certain multiple of the Average True Range (ATR) away from a high or low.
Configurable parameters: ATR Period, ATR Multiplier, and whether to use the Close price for extremums.
Trend Trader: This appears to be a custom combination of MACD and ADX. It generates buy/sell signals based on MACD crossovers when the ADX is above a certain threshold (25, indicating a trending market).
Configurable parameters: Fast Length, Slow Length, Signal Smoothing (for MACD), ADX Length, and DI Length.
2. Take Profit (TP) Settings
The strategy offers flexible Take Profit options:
Enable/Disable: You can choose whether to use Take Profit at all.
Method:
Percentage: Closes the trade when a specified percentage profit is reached.
Risk/Reward Ratio: Calculates the Take Profit level based on a multiple of the initial Stop Loss distance.
Hold Until Stop: An option to override Take Profit and reverse signals, keeping the trade open until the Stop Loss is hit.
3. Stop Loss (SL) Settings (by chadmex)
This section defines how Stop Loss is calculated and managed:
Type:
Trailing: The Stop Loss dynamically adjusts as the trade moves in profit, locking in gains.
Fixed: The Stop Loss remains at its initial calculated level.
ATR Length: Period for ATR calculation, used in determining the Stop Loss distance.
Use Structure (High/Low): If enabled, the Stop Loss is calculated relative to recent Highs/Lows; otherwise, it's based on the Close price.
Lookback: The period for finding recent Highs/Lows for structure-based Stop Loss.
ATR Multiplier: A multiplier applied to the ATR value to set the Stop Loss distance.
4. Alert Settings
Customizable messages for various trade events:
Long Entry
Short Entry
Take Profit Hit
Stop Loss Hit
5. Filtering Mechanisms
The strategy includes a wide array of filters that can be independently enabled and configured to refine trade entries:
EMA Crossover Filter: Allows trades only when a fast EMA is above a slow EMA (for long) or vice versa (for short).
Configurable parameters: Timeframe, Fast EMA Length, Slow EMA Length.
RSI + Bollinger Bands + EMA Filter: Filters trades based on the relationship between an RSI-based Moving Average (Fast or Slow EMA of RSI) and the Bollinger Band Basis of RSI.
Configurable parameters: Timeframe, RSI Length, BB Length, BB Multiplier, Fast EMA Length, Slow EMA Length.
RSI EMA Level Filter: Prevents trades when RSI EMA is in overbought (for long) or oversold (for short) regions.
Configurable parameters: Upper Level (forbid longs), Lower Level (forbid shorts).
MFI (Custom) Filter: Filters trades based on a custom Money Flow Index (MFI) indicator. Default is long for MFI > 0, short for MFI < 0, with an option to reverse the logic.
Configurable parameters: Timeframe, MFI Period.
RSI+MFI (by VuManChu) Filter: Filters trades based on a combined RSI and MFI indicator. Default is long for indicator > 0, short for < 0, with an option to reverse the logic.
Configurable parameters: Timeframe, RSI+MFI Period, Multiplier, Y Position Offset.
OBV (On-Balance Volume) Filter: Two options for filtering based on OBV and its EMAs/SMAs.
Option 1: Fast EMA of OBV vs. OBV SMA.
Option 2: Fast EMA of OBV vs. OBV SMA and Slow EMA.
Configurable parameters: Timeframe, OBV BB Length, OBV Fast EMA Length, OBV Slow EMA Length, and an option to invert the logic.
Bernoulli (by kocurekc) Filter: Filters trades using a Bernoulli entropy indicator. Default is long for value > 0, short for < 0, with options to reverse the logic and block trades in a "gray zone" (close to zero).
Configurable parameters: Timeframe, Entropy Length, Averaging Length, Trade Band (gray zone), Measurement Type, Bernoulli Purest, Probability Smoother, Include Source (price), Include Volume.
EMA Deviation (v2) Filter: Prevents trades after significant price deviations from EMAs, indicating potential overextension.
Configurable parameters: Timeframe, Fast EMA Length, Slow EMA Length, Average Lookback, Signal Multiplier.
Advanced RSI Conditions Filter (Forbidding): Allows defining multiple conditions based on RSI, its EMAs, and Bollinger Bands that, if any are met, forbid a trade. Includes "Death Cross" and "Golden Cross" variations.
Configurable parameters: Timeframe, RSI Length, BB Length, BB Multiplier, Fast EMA Length, Slow EMA Length, and numerous toggleable rules with customizable operators (Above/Below) and values for BB, RSI, and EMA relationships.
Advanced RSI Conditions Filter - 2 (Allowing): Similar to the forbidding filter, but trades are only allowed if all enabled conditions are met.
Configurable parameters: Same as the forbidding filter, but for allowing rules.
DMF (Dynamic Money Flow) Filter: Filters trades based on a custom Dynamic Money Flow indicator and its moving averages.
Configurable parameters: Timeframe, Period, Moving Average Type (EMA, WMA, T3, FRAMA), Fast Length, Slow Length.
Detailed Long/Short Conditions: Allows precise control over the DMF value, fast MA, and slow MA ranges, and cloud conditions for both long and short entries.
Trade Execution Logic:
Signal Generation: Either Chandelier Exit or Trend Trader generates a raw buy or sell signal.
Filter Application: The raw signal is then passed through all enabled filters.
For forbidding filters, if any of their active rules are met, the trade is blocked.
For allowing filters, all of their active rules must be met for the trade to proceed.
Combined Filters: All active filters must allow a trade for it to be considered valid.
Entry: If a valid buySignal and allowLong conditions are met (and not holding until stop, or if holding until stop, there's no open position), a "Long" entry is executed. The same applies for "Short" entries.
Stop Loss Calculation: Upon entry, an initial Stop Loss price is calculated based on the chosen type (Fixed/Trailing) and parameters.
For trailing SL, the active_long_stop or active_short_stop is updated to trail the price.
Take Profit Calculation: If useTakeProfit is true and holdUntilStop is false, a Take Profit target is calculated based on the chosen method (Percentage or Risk/Reward).
Exit:
If the price hits the Stop Loss, the position is closed.
If the price hits the Take Profit target, the position is closed (unless holdUntilStop is active).
Plotting:
The script plots:
Calculated Stop Loss and Take Profit levels (as white lines, typically for visual debugging).
The active Trailing Stop Loss lines (green for long, red for short).
VWAP + EMA20 + EMA200 + RSI + SR + Panel vwap ema 20 + ema 200 con senales de entrada y soportes dinamicos ideal 1 hora
Valtoro Adaptive Momentum//@version=5
strategy("Valtoro Adaptive Momentum", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// === Inputs ===
lengthFast = input.int(14, title="Fast EMA")
lengthSlow = input.int(28, title="Slow EMA")
rsiPeriod = input.int(14, title="RSI Period")
atrPeriod = input.int(14, title="ATR Period")
riskMultiplier = input.float(1.5, title="Volatility Threshold Multiplier", step=0.1)
rsiOB = input.int(70, title="RSI Overbought")
rsiOS = input.int(30, title="RSI Oversold")
// === Indicators ===
fastEMA = ta.ema(close, lengthFast)
slowEMA = ta.ema(close, lengthSlow)
rsi = ta.rsi(close, rsiPeriod)
atr = ta.atr(atrPeriod)
avgATR = ta.sma(atr, atrPeriod)
// === Conditions ===
longCond = ta.crossover(fastEMA, slowEMA) and rsi < rsiOB and atr > avgATR * riskMultiplier
shortCond = ta.crossunder(fastEMA, slowEMA) and rsi > rsiOS and atr > avgATR * riskMultiplier
// === Risk Management ===
longSL = close * 0.98 // 2% Stop Loss
longTP = close * 1.05 // 5% Take Profit
shortSL = close * 1.02
shortTP = close * 0.95
// === Strategy Entries and Exits ===
if (longCond)
strategy.entry("Long", strategy.long)
strategy.exit("Exit Long", from_entry="Long", stop=longSL, limit=longTP)
if (shortCond)
strategy.entry("Short", strategy.short)
strategy.exit("Exit Short", from_entry="Short", stop=shortSL, limit=shortTP)
// === Visuals ===
plot(fastEMA, title="Fast EMA", color=color.blue)
plot(slowEMA, title="Slow EMA", color=color.red)
hline(rsiOB, "RSI Overbought", color=color.red)
hline(rsiOS, "RSI Oversold", color=color.green)
Simple MA AI Strategy + All Pattern Recognition (Reversed)just try m1 chart only 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
[Mustang Algo] Channel Strategy# Mustang Algo Channel Strategy - Universal Market Sentiment Oscillator
## 🎯 ORIGINAL CONCEPT
This strategy employs a unique market sentiment oscillator that works on ALL financial assets. It uses Bitcoin supply dynamics combined with stablecoin market capitalization as a macro sentiment indicator to generate universal timing signals across stocks, forex, commodities, indices, and cryptocurrencies.
## 🌐 UNIVERSAL APPLICATION
- **Any Asset Class:** Stocks, Forex, Commodities, Indices, Crypto, Bonds
- **Market-Wide Timing:** BTC/Stablecoin ratio serves as a global risk sentiment gauge
- **Cross-Market Signals:** Trade any instrument using macro liquidity conditions
- **Ecosystem Approach:** One oscillator for all financial markets
## 🧮 METHODOLOGY
**Core Calculation:** BTC Supply / (Combined Stablecoin Market Cap / BTC Price)
- **Data Sources:** DAI + USDT + USDC market capitalizations
- **Signal Generation:** RSI(14) applied to the ratio, double-smoothed with WMA
- **Timing Logic:** Crossover signals filtered by overbought/oversold zones
- **Multi-Timeframe:** Configurable timeframe analysis (default: Daily)
## 📈 TRADING STRATEGY
**LONG Entries:** Bullish crossover when market sentiment is oversold (<48)
**SHORT Entries:** Bearish crossover when market sentiment is overbought (>55)
**Universal Timing:** These macro signals apply to trading any financial instrument
## ⚙️ FLEXIBLE RISK MANAGEMENT
**Three SL/TP Calculation Modes:**
- **Percentage Mode:** Traditional % based (4% SL, 12% TP default)
- **Ticks Mode:** Precise tick-based calculation (50/150 ticks default)
- **Pips Mode:** Forex-style pip calculation (50/150 pips default)
**Realistic Parameters:**
- Commission: 0.1% (adjustable for different asset classes)
- Slippage: 2 ticks
- Position sizing: 10% of equity (conservative)
- No pyramiding (single position management)
## 📊 KEY ADVANTAGES
✅ **Universal Application:** One strategy for all asset classes
✅ **Macro Foundation:** Based on global liquidity and risk sentiment
✅ **False Signal Filtering:** Overbought/oversold zones reduce noise
✅ **Flexible Risk Management:** Multiple SL/TP calculation methods
✅ **No Lookahead Bias:** Clean backtesting with realistic results
✅ **Cross-Market Correlation:** Captures broad market risk cycles
## 🎛️ CONFIGURATION GUIDE
1. **Asset Selection:** Apply to stocks, forex, commodities, indices, crypto
2. **Timeframe Setup:** Daily recommended for swing trading
3. **Sentiment Bounds:** Adjust 48/55 levels based on market volatility
4. **Risk Management:** Choose appropriate SL/TP mode for your asset class
5. **Direction Filter:** Select Long Only, Short Only, or Both
## 📋 BACKTESTING STANDARDS
**Compliant with TradingView Guidelines:**
- ✅ Realistic commission structure (0.1% default)
- ✅ Appropriate slippage modeling (2 ticks)
- ✅ Conservative position sizing (10% equity)
- ✅ Sustainable risk ratios (1:3 SL/TP)
- ✅ No lookahead bias (proper historical simulation)
- ✅ Sufficient sample size potential (100+ trades possible)
## 🔬 ORIGINAL RESEARCH
This strategy introduces a revolutionary approach to financial markets by treating the BTC/Stablecoin ratio as a global risk sentiment gauge. Unlike traditional indicators that analyze individual asset price action, this oscillator captures macro liquidity flows that affect ALL financial markets - from stocks to forex to commodities.
## 🎯 MARKET APPLICATIONS
**Stocks & Indices:** Risk-on/risk-off sentiment timing
**Forex:** Global liquidity flow analysis for major pairs
**Commodities:** Risk appetite for inflation hedges
**Bonds:** Flight-to-safety vs. risk-seeking behavior
**Crypto:** Native application with direct correlation
## ⚠️ RISK DISCLOSURE
- Designed for intermediate to long-term trading across all timeframes
- Market sentiment can remain extreme longer than expected
- Always use appropriate position sizing for your specific asset class
- Adjust commission and slippage settings for different markets
- Past performance does not guarantee future results
## 🚀 INNOVATION SUMMARY
**What makes this strategy unique:**
- First to use BTC/Stablecoin ratio as universal market sentiment indicator
- Applies macro-economic principles to technical analysis across all assets
- Single oscillator provides timing signals for entire financial ecosystem
- Bridges traditional finance with digital asset insights
- Combines fundamental liquidity analysis with technical precision
GWA 15min Strategy (Relaxed with TP/SL)Long Entry Conditions (Relaxed)
You enter a long position when all three of the following are true:
Stochastic Crossover Below 30
%K crosses above %D,
and %K is less than 30 (mildly oversold).
MACD Bullish Crossover (Relaxed)
MACD Line is just slightly greater than Signal Line:
macdLine > signalLine * 0.995
This allows for weaker bullish momentum entries.
Soft Trend Filter (Near EMA)
Price is above 98% of the 20-period EMA:
close > emaFilter * 0.98
Allows buying even slightly below the EMA, rather than strictly above.
📉 Long Exit Conditions
You exit the long position when both of the following are true:
Stochastic Overbought Reversal
%K is above 70 and crosses below %D.
MACD Bearish Crossover
MACD Line falls below the Signal Line.
🛠️ Notes
Relaxation Points:
Standard entries would require more strict crossovers (e.g., K < 20 for buy, or MACD > signalLine strictly).
You're allowing signals to trigger earlier and more often to catch quicker price action.
Labeling:
Long entries and exits are visually marked on the chart using label.new().
GWA 15min Strategy (Relaxed)Long Entry Conditions (Relaxed)
You enter a long position when all three of the following are true:
Stochastic Crossover Below 30
%K crosses above %D,
and %K is less than 30 (mildly oversold).
MACD Bullish Crossover (Relaxed)
MACD Line is just slightly greater than Signal Line:
macdLine > signalLine * 0.995
This allows for weaker bullish momentum entries.
Soft Trend Filter (Near EMA)
Price is above 98% of the 20-period EMA:
close > emaFilter * 0.98
Allows buying even slightly below the EMA, rather than strictly above.
📉 Long Exit Conditions
You exit the long position when both of the following are true:
Stochastic Overbought Reversal
%K is above 70 and crosses below %D.
MACD Bearish Crossover
MACD Line falls below the Signal Line.
🛠️ Notes
Relaxation Points:
Standard entries would require more strict crossovers (e.g., K < 20 for buy, or MACD > signalLine strictly).
You're allowing signals to trigger earlier and more often to catch quicker price action.
Strategy [High-Low Cloud Trend] (v6, perf-safe)Description
High-Low Cloud Trend Strategy (Performance-Safe Edition)
Version 6 • RezzoRedPriest (based on the original logic by @rottor29)
How it works
Dynamic range ― The script tracks the highest high / lowest low over a look-back of N bars (len). When price tags one extreme, a “pivot” flips to the opposite extreme, forming the core of the cloud.
Trend filter ― If the candle closes above the pivot, trend = bullish; below it, trend = bearish. The optional “Trade only with trend” switch forces longs in bullish mode and shorts in bearish mode.
Signals
Cloud Retest – price pulls back to the inner edge (band1) and rejects it.
Cloud Cross – price breaks through the outer edge (band).
Mean Reversion – spikes beyond the inner edge and snap back (optional).
Execution model – trades are processed once per bar (process_orders_on_close = true), capped at maxTradesPerDay.
Performance guardrails
Only the most-recent visBars bars are calculated and painted.
Object limits: max_labels_count = 400, max_lines_count = 30.
Inputs
Group Name Purpose
Display Drawings: show last N bars Hard cap for calculations & drawings (default = 500).
Display Show markers / labels Toggle all arrows / diamonds.
Display Show cloud fill & background Toggle the colored cloud & background.
Strategy Look-back period (len) Width of the cloud; larger = smoother trend.
Strategy Enable trading Completely turn trade logic on/off.
Strategy Take cloud-retest / cross / mean-reversion signals Select which setups feed the engine.
Strategy Trade only with trend Filter counter-trend signals.
Risk Max trades per day Hard daily cap.
Recommended use
Works on any timeframe; common sweet spots are 5 m & 15 m for liquid futures / FX.
Increase len for higher timeframes (e.g. 55–100 on 1 H) to avoid noise.
If your chart still lags, either:
Lower Drawings: show last N bars, or
Turn Show cloud fill off – the fill is the heaviest operation.
Disclaimer
This script is for educational purposes only and does not constitute financial advice. Always test on demo data first and use proper risk management.
Retiremont StratRetiremont Strat is a dynamic trend-based strategy designed for traders seeking a balanced approach between responsive entries and controlled exits. By analysing directional momentum through a proprietary (and customisable) smoothing method, this script adapts intelligently to market shifts while offering configurable filters for refined trade timing.
What sets this strategy apart is its flexible structure—giving users the option to delay entries for signal confirmation, enforce cooldown periods between trades, and leverage trailing logic for exit precision. Optional visual elements like trend zones and slope overlays enhance interpretability without cluttering the chart.
Ideal for traders who want to stay aligned with the prevailing trend while maintaining granular control over trade filters, this tool is both adaptive and disciplined—without exposing its inner mechanics.
This strategy is invite-only. To request access, please contact @nubreed1337 on X.
Tolomeo ea1This strategy seeks to identify potential trend reversals or strong trend continuations:
with Exponential Moving Averages giving more weight to recent prices, making them more reactive to price changes than Simple Moving Averages (SMAs). The crossing of two EMAs with different periods is a classic signal of a trend change.
The strategy relies on a specific sequence of events to generate an entry signal after an EMA crossing
BB Cross + Martingale Hedging StrategyThis strategy blends Bollinger Band cross signals with a Martingale-style position sizing method. Long trades trigger when price crosses above the lower band; shorts when it crosses below the upper band. After a loss, the position size doubles to recover, and resets after a win. Includes trailing stop and stop-loss options for better risk control.
* Designed for mean-reversion setups
* Ideal for sideway or ranging markets
* Fully automated with smart recovery logic
Feel free to leave a comment or suggestion — your feedback helps improve the strategy for everyone !
Nikko William StrategyWelcome to Williams %R Strategy for Pine Script v6
Results may vary depending on the timeframe, asset, and configuration.
📘 Strategy Overview
This strategy is powered the Williams %R (pronounced "Williams Percent R") is a momentum oscillator developed by Larry Williams. It helps traders identify overbought and oversold conditions in the market — similar to the RSI, but inverted.
⚙️ Strategy Characteristics
This system is an experimental strategy and should be used with caution.
🛠️ Key Parameters
Bar Multiple:
Controls how frequently new positions are opened/closed in an uptrend/downtrend.
For example, setting this to 3 means the strategy will enter once every 3 bars during an uptrend, reducing overexposure and allowing better pyramid spacing.
Close All When Bearish:
When enabled, this forces the strategy to close all open positions as soon as the trend turns bearish. When disabled, it allows for pyramiding in both directions, depending on your risk tolerance.
Disclaimer:
This strategy is provided for educational and informational purposes only. Trading involves risk, and results may vary depending on configuration and market conditions. Always backtest thoroughly over a significant number of trades and monitor live performance carefully before considering any real trading. I am not offering financial advice.
Nikko Vortex StrategyWelcome to My Vortex Strategy for Pine Script v6
Results may vary depending on the timeframe, asset, and configuration.
📘 Strategy Overview
This strategy is powered by the Vortex Indicator (VI) — a tool developed by Etienne Botes and Douglas Siepman, introduced in Technical Analysis of Stocks & Commodities in 2010.
The VI is designed to identify trend initiations and confirm ongoing trends, making it ideal for momentum-based strategies.
⚙️ Strategy Characteristics
This system is best suited for moderately volatile coins, where it helps smooth out gains while maintaining steady growth.
🛠️ Key Parameters
Bar Multiple:
Controls how frequently new positions are opened/closed in an uptrend/downtrend.
Close All When Bearish:
When enabled, this forces the strategy to close all open positions as soon as the trend turns bearish. When disabled, it allows for pyramiding in both directions, depending on your risk tolerance.
Disclaimer:
This strategy is provided for educational and informational purposes only. Trading involves risk, and results may vary depending on configuration and market conditions. Always backtest thoroughly over a significant number of trades and monitor live performance carefully before considering any real trading. I am not offering financial advice.