Lunar Calendar US Stocks StrategyLunar Calendar US Stocks Strategy
A very simple lunar calendar US stock trading strategy.
Buy : 12th day of the lunar calendar
Sell : 2th day of the lunar calendar
Banned period : Solar Dec 14 ~ Lunar Jan. 15
Buy and sell before US holidays
Total profit is almost same as just buy & hold.
But MDD is less.
Compare with following Crypto strategy (Lunar day 5~26)
Statistics
BitLogic Engine# **BitLogic — High-Timeframe Engine for Bitcoin**
! (raw.githubusercontent.com)
**BitLogic** combines trend MAs, adaptive/volatility filters, momentum/oscillators, and percentile logic into one **simple, coherent signal** built to ignore noise and track the dominant move.
**Best use**
* **Market:** **Bitcoin** (BTCUSD / BTCUSDT)
* **Timeframes:** **1D (default)** for the cleanest performance; **6H** and **8H** also work very well
* New to crypto? Prefer **spot buy/sell** (no leverage)
**Why it’s different**
* **No repainting**: signals are confirmed on **bar close** and do **not** repaint afterward.
* **Clean & simple**: minimal on-chart elements—**no clutter, no confusing lines**—so the regime is easy to read at a glance.
* A **purposeful combination** of multiple indicators (not just a stack) tuned for high-TF structure.
* Useful as a **directional market filter** for altcoins too (the market often follows BTC).
**How to use**
* Start on **BTC 1D** with default settings.
* Act on **bar-close** regime flips (keep it simple).
* For alts, take entries only when BTC shows a positive BitLogic regime.
**Backtesting & Performance Table**
* Built for **fast, straightforward backtesting**: one click → immediate stats
**Max DD %**, **% Profitable (Long/Short)**, **Profit Factor**, **Number of Trades**, **Net Profit %** (by side & total).
* Drawdown can use **Open or Closed P/L**, and the table updates instantly.
**Equity curve — how to read it**
* Plots the strategy’s **equity** (with optional **normalization to 100** for easy comparison).
* Optional **EMA smoothing** reduces visual noise on higher TFs.
* **Color-coded by current drawdown** vs running peak (teal < 25%, orange 25–40%, red ≥ 40%) for instant risk context.
* Rising curve with frequent new peaks = strong momentum; extended red segments = elevated risk.
**Notes**
* Works best on liquid BTC spot charts.
* Use proper risk management (position sizing, patience).
* **Educational use only. Not financial advice.**
Backtest - Strategy Builder [AlgoAlpha]🟠 OVERVIEW
This script by AlgoAlpha is a modular Strategy Builder designed to let traders test custom trade entry and exit logic on TradingView without writing their own Pine code. It acts as a framework where users can connect multiple external signals, chain them in sequences, and run backtests with built-in leverage, margin, and risk controls. Its main strength is flexibility—you can define up to five sequential steps for entry and exit conditions on both long and short sides, with logic connectors (AND/OR) controlling how conditions combine. This lets you test complex multi-step confirmation workflows in a controlled, visual backtesting environment.
🟠 CONCEPTS
The system works by linking external signals —these can be values from other indicators, and/or custom sources—to conditional checks like “greater than,” “less than,” or “crossover.” You can stack these checks into steps , where all conditions in a step must pass before the sequence moves to the next. This creates a chain of logic that must be completed before a trade triggers. On execution, the strategy sizes positions according to your chosen leverage mode ( Cross or Isolated ) and allocation method ( Percent of equity or absolute USD value]). Liquidation prices are simulated for both modes, allowing realistic margin behaviour in testing. The script also tracks performance metrics like Sharpe, Sortino, profit factor, drawdown, and win rate in real time.
🟠 FEATURES
Up to 5 sequential steps for both long and short entries, each with multiple conditions linked by AND/OR logic.
Two leverage modes ( Cross and Isolated ) with independent long/short leverage multipliers.
Separate multi-step exit triggers for longs and shorts, with optional TP/SL levels or opposite-side triggers for flipping positions.
Position sizing by equity percent or fixed USD amount, applied before leverage.
Realistic liquidation price simulation for margin testing.
Built-in trade gating and validation—prevents trades if configuration rules aren’t met (e.g., no exit defined for an active side).
Full performance dashboard table showing live strategy status, warnings, and metrics.
Configurable bar coloring based on position side and TP/SL level drawing on chart.
Integration with TradingView's strategy backtester, allowing users to view more detailed metrics and test the strategy over custom time horizons.
🟠 USAGE
Add the strategy to your chart. In the settings, under Master Settings , enable longs/shorts, select leverage mode, set leverage multipliers, and define position sizing. Then, configure your Long Trigger and Short Trigger groups: turn on conditions, pick which external signal they reference, choose the comparison type, and assign them to a sequence step. For exits, use the corresponding Exit Long Trigger and Exit Short Trigger groups, with the option to link exits to opposite-side entries for auto-flips. You can also enable TP and/or SL exits with custom sources for the TP/SL levels. Once set, the strategy will simulate trades, show performance stats in the on-chart table, and highlight any configuration issues before execution. This makes it suitable for testing both simple single-signal systems and complex, multi-filtered strategies under realistic leverage and margin constraints.
🟠 EXAMPLE
The backtester on its own does not contain any indicator calculation; it requires input from external indicators to function. In this example, we'll be using AlgoAlpha's Smart Signals Assistant indicator to demonstrate how to build a strategy using this script.
We first define the conditions beforehand:
Entry :
Longs – SSA Bullish signal (strong OR weak)
Shorts – SSA Bearish signal (strong OR weak)
Exit
Longs/Shorts: (TP/SL hit OR opposing signal fires)
Other Parameters (⚠️Example only, tune this based on proper risk management and settings)
Long Leverage: default (3x)
Short Leverage: default (3x)
Position Size: default (10% of equity)
Steps
Load up the required indicators (in this example, the Smart Signals Assistant).
Ensure the required plots are being output by the indicator properly (signals and TP/SL levels are being plotted).
Open the Strategy Builder settings and scroll down to "CONDITION SETUP"; input the signals from the external indicator.
Configure the exit conditions, add in the TP/SL levels from the external indicator, and add an additional exit condition → {{Opposite Direction}} Entry Trigger.
After configuring the entry and exit conditions, the strategy should now be running. You can view information on the strategy in TradingView's backtesting report and also in the Strategy Builder's information table (default top right corner).
It is important to note that the strategy provided above is just an example, and the complexity of possible strategies stretches beyond what was shown in this short demonstration. Always incorporate proper risk management and ensure thorough testing before trading with live capital.
MMTools - Backtester❖ Overview
Backtester is a script implemented as a strategy, featuring multiple conditions and tools to offer an alternative way to work with Catcher. It supports both backtesting and algorithmic trading, allowing you to evaluate the indicator's performance on historical data for any instrument using the Strategy Tester.
❖ Settings
⚙️ Custom Conditions and Signals
This section is intended to provide flexibility when working with Catcher. (If you intend to use Catcher alone, this section can be disregarded). You may combine the primary indicator (Catcher) with additional custom indicators to define entry and exit signals. Simply add the custom indicator to your chart, display it and then select its name in the corresponding dropdown menu. By default, the 'Close' option is selected, meaning custom conditions are disabled.
Operator 'OR': An entry order is activated when either your custom signal or the primary signal occurs.
Operator 'AND': An entry order is activated only when both the custom and primary signals occur simultaneously.
If both 'AND' and 'OR' operators are used, enabling the 'Only Primary' option will apply the 'AND' operator only to the primary indicator.
Custom Exit: Allows the strategy to close a position based on a custom signal, in addition to standard exit conditions. The first condition met will trigger the exit.
Note: The strategy executes orders at the open of the next bar after the custom condition is met.
⚙️ Confirmation
When enabled, the strategy will enter a position only if a specified number of signals occur within a defined lookback period.
⚙️ Exits
Two types of exit mechanisms are available for take-profit and stop-loss:
Timeout: Sets a maximum duration (in bars) that a trade can remain open. If this limit is exceeded, the strategy will close the position.
Percentage-Based: Exit positions based on a specified percentage move.
⚙️ Start Date
Specifies the starting point for the backtest.
⚙️ Plotting
The green line represents the take-profit level, while the red line indicates the stop-loss level. Plotting is limited to the last 250 bars.
⚙️ Other Settings
Remember to configure additional parameters under the “Properties” tab, including commissions, slippage, and pyramiding. Default commission is set at 0.05%.
❖ Access
Please refer to the Author's Instructions field to request access to the script.
-----------------------------------------------------------
Disclaimer
The information provided by my scripts is for informational purposes only and does not constitute financial advice. Past performance is not indicative of future results. Always do your own research before making financial decisions.
Spread Mean Reversion Strategy [SciQua]╭───────────────────────────────────────╮
Spread Mean Reversion Strategy
╰───────────────────────────────────────╯
This invite-only futures spread strategy applies a statistical mean reversion framework, executing limit orders exclusively at calculated Z-score thresholds for precise, rules-based entries and exits. It is designed for CME-style spreads and synthetic instruments with well-defined reversion tendencies.
╭────────────╮
Core Concept
╰────────────╯
The strategy calculates a rolling mean and standard deviation of a chosen spread or synthetic price series, then computes the Z-score to measure deviation from the mean in standard deviation units.
Long entries trigger when Z crosses upward through a negative entry threshold (`-devEnter`). A buy limit is placed exactly at the price corresponding to that Z-score, optionally offset by a configurable tick amount.
Short entries trigger when Z crosses downward through a positive entry threshold (`+devEnter`). A sell limit is placed at the corresponding threshold price, also with optional offset.
Exits use the same threshold method, with an independent `Close Limit Offset` to fine-tune exit placement.
╭────────────╮
Key Features
╰────────────╯
Persistence filter – Requires the Z-score to remain beyond threshold for a configurable number of bars before entry.
Cooldown after exits – Prevents immediate re-entry to reduce over-trading.
Daily and weekend flattening – Force-flattens positions via limit orders before exchange maintenance breaks and weekend closes.
Auto-rollover detection with persistence – Detects when the second contract month’s daily volume exceeds the first for a set number of days, then blocks new entries (optional).
Configurable tick offsets – Independently adjust entry and exit levels relative to threshold prices.
Minimum spread width filter – Blocks trades when long/short entry thresholds are too close together.
Contract multiplier override – Allows correct sizing for synthetic symbols where `syminfo.pointvalue` is incorrect or missing.
Limit-only execution – All entries, exits, and forced-flat actions are executed with limit orders for price control.
╭────────────────────╮
Entry Blocking Rules
╰────────────────────╯
New trades are blocked:
During daily maintenance break pre-windows
During weekend close pre-windows
After rollover triggers, if `Block After Roll` is enabled
╭────────────────────────╮
Intended Markets & Usage
╰────────────────────────╯
Built for futures spreads and synthetic instruments , including calendar spreads.
Performs best in markets with clear seasonal or statistical mean-reverting tendencies.
Not designed for strongly trending, non-reverting markets.
╭──────────────────────────╮
Risk Management & Defaults
╰──────────────────────────╯
Fixed default position size of 1 contract (qty calc function available for customization).
Realistic commission and slippage assumptions pre-set.
Pyramiding disabled by default.
Default Z-score levels: Entry at ±2.0, Exit at ±0.5.
Separate tick offset controls for entries and exits.
Note: This strategy is for research and backtesting purposes only. Past performance does not guarantee future results. All use is subject to explicit written permission from the author.
POCTraderX Pro— Structure & Precision Algorithm POCTraderX Pro is a market analysis system designed to accurately identify key interest zones and price turning points. It combines advanced Price Action reading with a dynamic filtering process that adapts signals according to market volatility and internal structure.
Methodology
The algorithm analyzes the sequence of relevant highs and lows (HH, HL, LL, LH) along with the price location in relation to Point of Control levels and consolidation ranges.
It uses multi–timeframe confirmations to filter out false breakouts and optimize trade entries.
In high–volatility conditions, it automatically adjusts validation levels to maintain a favorable risk/reward ratio.
Configuration
Recommended timeframes: from 1–minute to daily, depending on the trading style.
Applicable markets: indices, forex, commodities, and cryptocurrencies.
Adjustable parameters:
Structure detection sensitivity.
Enable/disable volatility filters.
Show/hide control zones and previous ranges.
Purpose
Provide a clear reading of market structure and critical zones to help traders execute trades with greater consistency and avoid entries in low–probability areas.
Important Notes
This script is closed–source to protect its internal methodology, but it is based on an original combination of structural analysis and zone validation not available in free indicators.
It does not produce automatic buy or sell signals without context; it is intended to be integrated into a complete trading strategy.
Lunar calendar day Crypto Trading StrategyA very simple lunar calendar day trading strategy.
Trading strategy from the Lunar New Year to the end of December (Solar).
Buy : 5th day of the lunar calendar
Sell : 26th day of the lunar calendar
Backtest [OptAlgo]This backtest script is designed to convert ideas or indicators into backtest results. The script creates buy/sell signals by comparing price sources against fixed values or other imported plots using many comparison methods. It has many features including multiple exit systems: TP/SL, custom plot-based stops and more. It supports full trading automation through webhook alerts with live signal processing.
🔢 Signal Creation System
→ Values Group : Compare price sources against fixed numerical values
→ Plots Group : Compare two different price sources/indicators against each other
→ Flexible Comparisons : 15+ comparison methods (equal, crossover, rising...)
→ Signal Types : Long, Short, Close All, Block signals, and combination signals
→ Merge Rules : Minimum condition requirements for signal activation
🔀 Advanced Signal Logic
→ Counter Signals : Choose between reversing positions or closing them
→ Signal Inversion : Flip all buy/sell signals with one toggle
→ External Signal Import : Import coded signals (1=Long, -1=Short, 0=Close)
→ Day Blocker : Enable/disable trading on specific weekdays
→ Session Control : Limit trading to specific market sessions
⚙️ Strategy Settings
→ Position Sides : All Ways, Long Only, or Short Only modes
→ Signal Control : Individual enable/disable for long and short signals
→ Counter Signal Mode : Reverse Open Position vs Close Open Position
→ Signal Reversal : Global signal inversion capability
🔰 Risk Management (Limiter Settings)
→ Leverage Control : Leverage with liquidation warnings
→ Drawdown Limit : Auto-halt strategy at specified drawdown percentage
→ Tradable Ratio : Use portion of available balance (0.01-1.0)
→ Contract Limit : Cap maximum contract size regardless of balance
🎯 TP/SL System
→ Fixed TP/SL : Set percentage-based take profit and stop loss
→ Custom Plot Stops : Use any indicator/plot as dynamic stop loss
→ ATR-Based Exits : Volatility-adjusted TP/SL using Average True Range
→ Realistic Protection : Prevents unrealistic TP/SL prices in live trading
→ Stop Modes : Instant (Sudden) vs Candle Close execution
→ ATR Stop Loss : Override fixed SL with volatility-based calculations
→ ATR Take Profit : Dynamic TP based on market volatility
→ Trailing Options : Safe, Normal, or Aggressive trailing methods
→ Calculation Modes : Normal, Volume-weighted, or Limited (with max %) options
→ Volume Integration : ATR levels adjust based on volume influx
🤖 Automation & Alerts
→ Webhook Integration : Send JSON alerts for automated execution
→ Live Signals : Real-time signal processing (every tick vs bar close)
→ Strategy Key : Unique identifier for automated systems
→ Early Entry : Send alerts X seconds before candle close
→ Fast Execution : Prevent signal lag in automated trading
🐞 Development Tools
→ Alert Plotting : Visualize signals directly on chart (disable for live alerts)
→ Professional Mode : Remove UI controls for faster calculation
→ Debug : Metrics are plotted in data window.
📊 Key Advantages
→ Multi-Condition Logic : Combine multiple indicators with flexible rules
→ Risk-First Design : Built-in drawdown and leverage protection
→ Automation Ready : Full webhook and alert system integration
⚠️ Important Warnings
→ High leverage combined with high SL may adjust to liquidation price
→ Use consistent leverage across all strategies on same trading isolated margin pair
→ Live signals require "Calculate on every tick" enabled in settings
→ Disable alert plotting when creating actual alerts to prevent latency
FDAX Open Range Breakout StrategyThe Open Range represents the first N minutes of session trading, establishing the day's initial high and low. These levels serve as significant psychological boundaries that often act as support/resistance throughout the trading session.
Reversal & Breakout Strategy - CompleteThis is a complete intraday trading strategy script for TradingView that lets you:
1. Choose Between Two Styles of Trades:
Reversals: It looks for large bullish or bearish candles during market sessions and enters trades expecting price to reverse.
Breakouts: It scans for price breaking above or below a recent high or low (based on a lookback range) and enters in the direction of the breakout.
2. Filters Trades by Session and Day Type:
Trades only during sessions you choose: NY1, NY2, London, Asia, etc.
Trades only on specific day types (e.g., DNP, DWP, Range 1, Range 2), as classified by a custom daily behavior model.
3. Uses 9:30 AM Candle Logic (ORB):
Captures the 9:30 AM Eastern candle's high/low using 1-minute data.
Allows breakout confirmation using this range.
4. Entry + Exit Logic:
Enters on reversal or breakout confirmation.
Automatically places stop-loss and take-profit orders (based on your input, in ticks or points).
Can require classification before entry (e.g., don’t trade until the market type is known).
5. Tracks Trades and Performance:
Records each trade's PnL, drawdown, win/loss, classification, time, and session.
Displays a table with analytics like win rate, expectancy, average drawdown, trade distribution by day/classification.
6. Visually Shows All Trades:
Draws arrows and shapes when trades are triggered.
Labels when trades are blocked (e.g., if not classified yet).
Plots breakout levels and 9:30 AM box.
🏆 UNMITIGATED LEVELS ACCUMULATIONPDH TO ATH RISK FREE
All the PDL have a buy limit which starts at 0.1 lots which will duplicate at the same time the capital incresases. All of the buy limits have TP in ATH for max reward.
safa bot alertGood trading for everying and stuff that very gfood and stuff please let me puibisjertpa 9uihthsi fuckitgn code
Linear Mean Reversion Strategy📘 Strategy Introduction: Linear Mean Reversion with Fixed Stop
This strategy implements a simple yet powerful mean reversion model that assumes price tends to oscillate around a dynamic average over time. It identifies statistically significant deviations from the moving average using a z-score, and enters trades expecting a return to the mean.
🧠 Core Logic:
A z-score is calculated by comparing the current price to its moving average, normalized by standard deviation, over a user-defined half-life window.
Trades are entered when the z-score crosses a threshold (e.g., ±1), signaling overbought or oversold conditions.
The strategy exits positions either when price reverts back near the mean (z-score close to 0), or if a fixed stop loss of 100 points is hit, whichever comes first.
⚙️ Key Features:
Dynamic mean and volatility estimation using moving average and standard deviation
Configurable z-score thresholds for entry and exit
Position size scaling based on z-score magnitude
Fixed stop loss to control risk and avoid prolonged drawdowns
🧪 Use Case:
Ideal for range-bound markets or assets that exhibit stationary behavior around a mean, this strategy is especially useful on assets with mean-reverting characteristics like currency pairs, ETFs, or large-cap stocks. It is best suited for traders looking for short-term reversions rather than long-term trends.
EUR/USD Multi-Layer Statistical Regression StrategyStrategy Overview
This advanced EUR/USD trading system employs a triple-layer linear regression framework with statistical validation and ensemble weighting. It combines short, medium, and long-term regression analyses to generate high-confidence directional signals while enforcing strict risk controls.
Core Components
Multi-Layer Regression Engine:
Parallel regression analysis across 3 customizable timeframes (short/medium/long)
Projects future price values using prediction horizons
Statistical significance filters (R-squared, correlation, slope thresholds)
Signal Validation System:
Lookback validation tests historical prediction accuracy
Ensemble weighting of layer signals (adjustable influence per timeframe)
Confidence scoring combining statistical strength, layer agreement, and validation accuracy
Risk Management:
Position sizing scaled by signal confidence (1%-100% of equity)
Daily loss circuit breaker (halts trading at user-defined threshold)
Forex-tailored execution (pip slippage, percentage-based commissions)
Visual Intelligence:
Real-time regression line plots (3 layered colors)
Projection markers for short-term forecasts
Background coloring for market bias indication
Comprehensive statistics dashboard (R-squared metrics, validation scores, P&L)
Key Parameters
Category Settings
Regression Short/Med/Long lengths (20/50/100 bars)
Statistics Min R² (0.65), Correlation (0.7), Slope (0.0001)
Validation 30-bar lookback, 10-bar projection
Risk Controls 50% position size, 12% daily loss limit, 75% confidence threshold
Trading Logic
Entries require:
Ensemble score > |0.5|
Confidence > threshold
Short & medium-term significance
Active daily loss limit not breached
Exits triggered by:
Opposite high-confidence signals
Daily loss limit violation (emergency exit)
The strategy blends quantitative finance techniques with practical trading safeguards, featuring a self-optimizing design where signal quality directly impacts position sizing. The visual dashboard provides real-time feedback on model performance and market conditions.
CCI-MACD Strategy 4.2
I cerchi si basano sull'oscillatore CCI (Commodity Channel Index).
L’indicatore CCI ci permette di osservare se il livello attuale del prezzo è particolarmente al di sopra o al di sotto di una certa media mobile, avente un numero di periodi scelto da noi.
Più la deviazione dal prezzo medio nel breve termine è forte, e maggiormente l’indicatore si allontanerà dallo 0: verso l’alto in caso di uptrend, o verso il basso in caso di downtrend.
Il segnale viene dato quando il valore del CCI supera la linea dello zero.
Il tutto è filtrato con un altro indicatore, il MACD, acronimo di "Moving Average Convergence Divergence", usato per identificare cambiamenti nel momentum del prezzo.
The circles are based on the CCI (Commodity Channel Index) oscillator.
The CCI indicator allows us to observe whether the current price level is significantly above or below a certain moving average, with a number of periods chosen by us.
The greater the deviation from the short-term average price, the further the indicator will deviate from 0: upwards in the case of an uptrend, or downwards in the case of a downtrend.
The signal is given when the CCI value crosses the zero line.
This is all filtered through another indicator, the MACD, which stands for "Moving Average Convergence Divergence," used to identify changes in price momentum.
ETH-BCH Strategy-V0 (Powered by BCH)ETH-BCH Strategy – Cross-Asset Divergence-Based Momentum Strategy
(Optimized for 2H ETHUSDT)
________________________________________
Strategy Overview
This strategy aims to identify long trade opportunities based on cross-asset divergence among Ethereum (ETH) and Bitcoin Cash (BCH). By integrating momentum filters, volatility bands, volume signals, and timing logic, it captures medium-term price swings while maintaining strict risk controls.
________________________________________
📌 Strategy Logic Overview
Entry Conditions:
• Cross-Asset Momentum:
Enter when BCH outperforms ETH over the last bar.
• Volume Filter:
BCH trading volume must exceed 135% of its 20-period average, indicating genuine market interest.
• Volatility Filter:
ETH price should be below 110% of the lower Bollinger Band boundary (20 periods, 2 standard deviations), signaling oversold conditions.
• RSI & MACD Confirmation:
ETH RSI < 70 (not overbought) and BCH MACD line above its signal line (supporting upward trend).
• Optional Entry Boosters:
Entry signal is reinforced if ETH has fallen more than -20% in the past 48 hours or -25% in the past 72 hours.
• Timing Constraint:
Entry only allowed after at least 1 bar has passed since the last sell.
Exit Conditions:
• Take Profit:
Exit when ETH price rises 30% above the entry price.
• Trailing Stop Loss:
Exit if ETH price drops 6% from the highest point reached after entry.
• Cross-Asset Reversal:
Exit triggered when BTC outperforms BCH by a threshold calculated as ETH short-term/long-term volume ratio × 2.5.
• Timing Constraint:
Exit only allowed after 12 bars have passed since the last buy.
________________________________________
📊 Indicators Used
Category Indicators
Volatility Bollinger Bands (20 periods, 2σ) on ETH close
Momentum RSI(14) on ETH, MACD(12,26,9) on BCH
Volume BCH volume compared to 20-period SMA (threshold at 1.35×)
Divergence Percentage change comparison between ETH, BCH, and BTC closes (1-bar interval)
Volatility Ratio ETH volume short-term vs long-term average to modulate exit threshold
________________________________________
⚙️ Strategy Settings (Backtest)
Setting Value
Chart Symbol ETHUSDT
Timeframe 2 Hours
Position Size 10% of equity (default), also tested at 100% for comparison
Initial Capital $10,000
Commission 0.1%
Slippage 3 points
________________________________________
📈 Performance Summary (Backtested Jan 2023 – Jul 2025, ETHUSDT 2H)
Metric 10% Position Size (Default) 100% Position Size (Aggressive)
Net Profit 30.91% 1064.80%
Max Drawdown(MDD) 1.94% 19.38%
Profit Factor 5.1 4.6
Win Rate 61.54% (40/65) 61.54% (40/65)
Total Trades 65 65
• The 10% position sizing delivers strong risk-adjusted returns with low drawdown, suitable for conservative or institutional traders.
• The 100% sizing highlights the full alpha potential but with significantly higher drawdown risk.
• Both maintain consistent win rate and profit factor, evidencing robustness.
________________________________________
💡 Additional Notes and Usage Suggestions
• The strategy combines cross-asset signals with volatility and momentum validations to reduce false entries.
• Enforces cooldown periods between trades to avoid overtrading.
• Uses 2-hour candles for main logic and 5-minute data for more precise entry and exit pricing.
• Well-suited for traders who prioritize timing over blind holding and want to harness the interplay between ETH, BCH, and BTC.
• Can be integrated into diversified portfolios or as part of rotational trading systems.
• Ideal for advanced users looking to enhance ETH exposure with dynamic timing signals.
________________________________________
⚠️ Disclaimer
This strategy is intended for educational and research purposes only. All performance figures are based on historical backtests and do not guarantee future results. Trading involves risk; use appropriate risk management.
DOGE 15MIN**Warm Reminder:** This strategy is intended solely for exploratory research and experimentation to evaluate the effectiveness of various signals. Drawing inspiration from patterns observed on the DOGE cryptocurrency 15-minute chart, it provides a tailored framework to identify potential trading opportunities. For optimal results, it is currently recommended exclusively for DOGE 15min charts. Remember, trading involves inherent risks, and past performance is not indicative of future results. We are dedicated to ongoing optimizations and refinements to enhance its robustness across broader applications—stay tuned for updates!
#### **A. Long Entry Signals**
These conditions trigger a long position entry, provided the strategy has no existing position (position_size == 0) and is not blocked. Signals can be enabled/disabled via input toggles (e.g., enable_vix).
- **VIX Reversal (vix_long)**: VIX signal shifts from high to low volatility (non-high volatility), with RSI between 30-50.
- **RSI Oversold (rsi_long)**: RSI crosses above 30.
- **CVD Bullish (cvd_long)**: CVD is rising.
- **Price RSI Bullish (prsi_long)**: Price RSI crosses above 30 or a long signal is triggered.
- **RangeEMA Bullish (rema_long)**: Candlestick is above POC, with KAMA trend flipping upward.
- **ZVWAP Oversold (zvwap_long)**: ZVWAP enters the oversold zone.
- **KAMA + Volume Bullish (kama_long)**: KAMA trend flips upward, candlestick is above POC, volume is rising, and the candle is bullish (green).
- **Volume Burst Bullish (vol_burst_long)**: Volume RSI crosses below threshold (default 70), open > close (bearish/red candle), triggered within the last two candles. **Special: Ignores all blocks** (bypasses not_long, Pivot, OI, RSI/ADX extreme filters).
#### **B. Short Entry Signals**
Similar to long entries: requires no existing position and no blocks.
- **RSI Overbought (rsi_short)**: RSI crosses below 70.
- **CVD Bearish (cvd_short)**: CVD is declining.
- **Price RSI Bearish (prsi_short)**: Price RSI crosses below 70 or a short signal is triggered.
- **RangeEMA Bearish (rema_short)**: Candlestick is below POC, with KAMA trend flipping downward.
- **ZVWAP Overbought (zvwap_short)**: ZVWAP enters the overbought zone.
- **KAMA + Volume Bearish (kama_short)**: KAMA trend flips downward, candlestick is below POC, volume is declining, and the candle is bearish (red).
- **Chop Bearish (chop_short)**: Chop crosses below 38.2, with RSI > 50.
- **Volume Burst Bearish (vol_burst_short)**: Volume RSI crosses below threshold (default 70), RSI > 70, and close > open (bullish/green candle), triggered within the last two candles. **Special: Ignores all blocks** (bypasses not_short, Pivot, OI, RSI/ADX extreme filters).
#### **C. Long Entry Blocks/Filters**
These conditions block long entries unless the signal ignores blocks (e.g., Volume Burst).
- **Base Prohibition (not_long)**: Volume is declining, or ADX is bearish (di_bear), or VIX is in high volatility (vix_flag), or RSI < 30.
- **Pivot Filter**: Recent Pivot is in a disadvantaged position.
- **OI Filter**: OI is declining.
- **RSI/ADX Extreme Filter**: RSI > 70 or ADX is bullish (di_bull).
- **Other**: Strategy already has a position (position_size != 0), or extreme volatility (is_extreme, though disabled in code).
#### **D. Short Entry Blocks/Filters**
Similar to long blocks.
- **Base Prohibition (not_short)**: Volume is rising, or (Chop < 38.2 and RSI > 50), or ADX is bullish (di_bull), or RSI > 70.
- **Pivot Filter**: Recent Pivot is in a disadvantaged position.
- **OI Filter**: OI is rising.
- **RSI/ADX Extreme Filter**: RSI < 30 or ADX is bearish (di_bear).
- **Other**: Existing position, or extreme volatility.
#### **E. Long Exit Signals**
Triggers closing of long positions, based on states (e.g., super_long, weak_long, only_kama).
- **KAMA Bearish Flip (exist_long)**: KAMA trend flips downward, or KAMA is downward with a short signal.
- **VIX Signal**: VIX shifts from low to high volatility, with RSI < 50.
- **Reversal Signal**: Short signal present and KAMA is downward.
- **Weak Trend Stop-Loss (weak_stop_long)**: In weak_long state, candlestick near POC, and close crosses below POC.
- **Weak KAMA Stop-Loss (weak_kama_long)**: In weak_long state, candlestick far from POC, and KAMA trend reverses.
- **Global Exit (exist_all)**: Volume RSI crosses below threshold (vol_under), or KAMA exit (kama_exit_long), or weak stop-loss, etc.
- **Special**: If in strong_long_hold (only_kama and KAMA remains bullish), ignore certain exit signals to hold the position.
#### **F. Short Exit Signals**
Similar to long exits.
- **KAMA Bullish Flip (exist_short)**: KAMA trend flips upward, or KAMA is upward with a long signal.
- **Reversal Signal**: Long signal present and KAMA is upward.
- **Weak Trend Stop-Loss (weak_stop_short)**: In weak_short state, candlestick near POC, and close crosses above short_state.current_max.
- **Weak KAMA Stop-Loss (weak_kama_short)**: In weak_short state, candlestick far from POC, and KAMA flips upward.
- **Global Exit (exist_all)**: Same as above.
Eliora Gold 1min (Heikin Ashi)Eliora -focused trading strategy designed for anything on the 1-minute timeframe using Heikin Ashi candles. This mode combines advanced market logic with structured risk management to deliver smooth, disciplined trade execution.
Key Features:
✅ Trend Confirmation – Aligns with dominant market direction for higher accuracy.
✅ ATR-Based Volatility Filter – Avoids high-risk conditions and chaotic price action.
✅ Candle Strength Logic – Filters weak setups, focusing on strong momentum.
✅ Balanced Risk/Reward – Calculates stop-loss and take-profit dynamically for consistent results.
✅ Cooldown & Overtrade Protection – Limits frequency to maintain trade quality.
This version of Eliora is built for scalpers and intraday traders seeking high-probability entries with graceful exits.
Long/Short/Exit/Risk management Strategy # LongShortExit Strategy Documentation
## Overview
The LongShortExit strategy is a versatile trading system for TradingView that provides complete control over entry, exit, and risk management parameters. It features a sophisticated framework for managing long and short positions with customizable profit targets, stop-loss mechanisms, partial profit-taking, and trailing stops. The strategy can be enhanced with continuous position signals for visual feedback on the current trading state.
## Key Features
### General Settings
- **Trading Direction**: Choose to trade long positions only, short positions only, or both.
- **Max Trades Per Day**: Limit the number of trades per day to prevent overtrading.
- **Bars Between Trades**: Enforce a minimum number of bars between consecutive trades.
### Session Management
- **Session Control**: Restrict trading to specific times of the day.
- **Time Zone**: Specify the time zone for session calculations.
- **Expiration**: Optionally set a date when the strategy should stop executing.
### Contract Settings
- **Contract Type**: Select from common futures contracts (MNQ, MES, NQ, ES) or custom values.
- **Point Value**: Define the dollar value per point movement.
- **Tick Size**: Set the minimum price movement for accurate calculations.
### Visual Signals
- **Continuous Position Signals**: Implement 0 to 1 visual signals to track position states.
- **Signal Plotting**: Customize color and appearance of position signals.
- **Clear Visual Feedback**: Instantly see when entry conditions are triggered.
### Risk Management
#### Stop Loss and Take Profit
- **Risk Type**: Choose between percentage-based, ATR-based, or points-based risk management.
- **Percentage Mode**: Set SL/TP as a percentage of entry price.
- **ATR Mode**: Set SL/TP as a multiple of the Average True Range.
- **Points Mode**: Set SL/TP as a fixed number of points from entry.
#### Advanced Exit Features
- **Break-Even**: Automatically move stop-loss to break-even after reaching specified profit threshold.
- **Trailing Stop**: Implement a trailing stop-loss that follows price movement at a defined distance.
- **Partial Profit Taking**: Take partial profits at predetermined price levels:
- Set first partial exit point and percentage of position to close
- Set second partial exit point and percentage of position to close
- **Time-Based Exit**: Automatically exit a position after a specified number of bars.
#### Win/Loss Streak Management
- **Streak Cutoff**: Automatically pause trading after a series of consecutive wins or losses.
- **Daily Reset**: Option to reset streak counters at the start of each day.
### Entry Conditions
- **Source and Value**: Define the exact price source and value that triggers entries.
- **Equals Condition**: Entry signals occur when the source exactly matches the specified value.
### Performance Analytics
- **Real-Time Stats**: Track important performance metrics like win rate, P&L, and largest wins/losses.
- **Visual Feedback**: On-chart markers for entries, exits, and important events.
### External Integration
- **Webhook Support**: Compatible with TradingView's webhook alerts for automated trading.
- **Cross-Platform**: Connect to external trading systems and notification platforms.
- **Custom Order Execution**: Implement advanced order flows through external services.
## How to Use
### Setup Instructions
1. Add the script to your TradingView chart.
2. Configure the general settings based on your trading preferences.
3. Set session trading hours if you only want to trade specific times.
4. Select your contract specifications or customize for your instrument.
5. Configure risk parameters:
- Choose your preferred risk management approach
- Set appropriate stop-loss and take-profit levels
- Enable advanced features like break-even, trailing stops, or partial profit taking as needed
6. Define entry conditions:
- Select the price source (such as close, open, high, or an indicator)
- Set the specific value that should trigger entries
### Entry Condition Examples
- **Example 1**: To enter when price closes exactly at a whole number:
- Long Source: close
- Long Value: 4200 (for instance, to enter when price closes exactly at 4200)
- **Example 2**: To enter when an indicator reaches a specific value:
- Long Source: ta.rsi(close, 14)
- Long Value: 30 (triggers when RSI equals exactly 30)
### Best Practices
1. **Always backtest thoroughly** before using in live trading.
2. **Start with conservative risk settings**:
- Small position sizes
- Reasonable stop-loss distances
- Limited trades per day
3. **Monitor and adjust**:
- Use the performance table to track results
- Adjust parameters based on how the strategy performs
4. **Consider market volatility**:
- Use ATR-based stops during volatile periods
- Use fixed points during stable markets
## Continuous Position Signals Implementation
The LongShortExit strategy can be enhanced with continuous position signals to provide visual feedback about the current position state. These signals can help you track when the strategy is in a long or short position.
### Adding Continuous Position Signals
Add the following code to implement continuous position signals (0 to 1):
```pine
// Continuous position signals (0 to 1)
var float longSignal = 0.0
var float shortSignal = 0.0
// Update position signals based on your indicator's conditions
longSignal := longCondition ? 1.0 : 0.0
shortSignal := shortCondition ? 1.0 : 0.0
// Plot continuous signals
plot(longSignal, title="Long Signal", color=#00FF00, linewidth=2, transp=0, style=plot.style_line)
plot(shortSignal, title="Short Signal", color=#FF0000, linewidth=2, transp=0, style=plot.style_line)
```
### Benefits of Continuous Position Signals
- Provides clear visual feedback of current position state (long/short)
- Signal values stay consistent (0 or 1) until condition changes
- Can be used for additional calculations or alert conditions
- Makes it easier to track when entry conditions are triggered
### Using with Custom Indicators
You can adapt the continuous position signals to work with any custom indicator by replacing the condition with your indicator's logic:
```pine
// Example with moving average crossover
longSignal := fastMA > slowMA ? 1.0 : 0.0
shortSignal := fastMA < slowMA ? 1.0 : 0.0
```
## Webhook Integration
The LongShortExit strategy is fully compatible with TradingView's webhook alerts, allowing you to connect your strategy to external trading platforms, brokers, or custom applications for automated trading execution.
### Setting Up Webhooks
1. Create an alert on your chart with the LongShortExit strategy
2. Enable the "Webhook URL" option in the alert dialog
3. Enter your webhook endpoint URL (from your broker or custom trading system)
4. Customize the alert message with relevant information using TradingView variables
### Webhook Message Format Example
```json
{
"strategy": "LongShortExit",
"action": "{{strategy.order.action}}",
"price": "{{strategy.order.price}}",
"quantity": "{{strategy.position_size}}",
"time": "{{time}}",
"ticker": "{{ticker}}",
"position_size": "{{strategy.position_size}}",
"position_value": "{{strategy.position_value}}",
"order_id": "{{strategy.order.id}}",
"order_comment": "{{strategy.order.comment}}"
}
```
### TradingView Alert Condition Examples
For effective webhook automation, set up these alert conditions:
#### Entry Alert
```
{{strategy.position_size}} != {{strategy.position_size}}
```
#### Exit Alert
```
{{strategy.position_size}} < {{strategy.position_size}} or {{strategy.position_size}} > {{strategy.position_size}}
```
#### Partial Take Profit Alert
```
strategy.order.comment contains "Partial TP"
```
### Benefits of Webhook Integration
- **Automated Trading**: Execute trades automatically through supported brokers
- **Cross-Platform**: Connect to custom trading bots and applications
- **Real-Time Notifications**: Receive trade signals on external platforms
- **Data Collection**: Log trade data for further analysis
- **Custom Order Management**: Implement advanced order types not available in TradingView
### Compatible External Applications
- Trading bots and algorithmic trading software
- Custom order execution systems
- Discord, Telegram, or Slack notification systems
- Trade journaling applications
- Risk management platforms
### Implementation Recommendations
- Test webhook delivery using a free service like webhook.site before connecting to your actual trading system
- Include authentication tokens or API keys in your webhook URL or payload when required by your external service
- Consider implementing confirmation mechanisms to verify trade execution
- Log all webhook activities for troubleshooting and performance tracking
## Strategy Customization Tips
### For Scalping
- Set smaller profit targets (1-3 points)
- Use tighter stop-losses
- Enable break-even feature after small profit
- Set higher max trades per day
### For Day Trading
- Use moderate profit targets
- Implement partial profit taking
- Enable trailing stops
- Set reasonable session trading hours
### For Swing Trading
- Use longer-term charts
- Set wider stops (ATR-based often works well)
- Use higher profit targets
- Disable daily streak reset
## Common Troubleshooting
### Low Win Rate
- Consider widening stop-losses
- Verify that entry conditions aren't triggering too frequently
- Check if the equals condition is too restrictive; consider small tolerances
### Missing Obvious Trades
- The equals condition is extremely precise. Price must exactly match the specified value.
- Consider using floating-point precision for more reliable triggers
### Frequent Stop-Outs
- Try ATR-based stops instead of fixed points
- Increase the stop-loss distance
- Enable break-even feature to protect profits
## Important Notes
- The exact equals condition is strict and may result in fewer trade signals compared to other conditions.
- For instruments with decimal prices, exact equality might be rare. Consider the precision of your value.
- Break-even and trailing stop calculations are based on points, not percentage.
- Partial take-profit levels are defined in points distance from entry.
- The continuous position signals (0 to 1) provide valuable visual feedback but don't affect the strategy's trading logic directly.
- When implementing continuous signals, ensure they're aligned with the actual entry conditions used by the strategy.
---
*This strategy is for educational and informational purposes only. Always test thoroughly before using with real funds.*
Outside Bar Strategy with Multiple Entry ModelsOutside Bar Strategy with Multiple Entry Models
This Pine Script strategy implements a versatile trading system based on the Outside Bar pattern, offering three distinct entry models: Close Entry, High/Low Entry, and Midpoint Entry. Designed for traders seeking flexibility, the strategy includes customizable risk/reward ratios, an optional EMA trend filter, and enhanced visualization with line fills.
Key Features:
Entry Models:
Close Entry: Enters a long position when the current candle closes above the high of the previous outside bullish bar . For short, it enters when the candle closes below the low of the previous outside bearish bar.
High/Low Entry: Enters a long position when the price crosses above the high of the previous outside bullish bar . For short, it enters when the price crosses below the low of the previous outside bearish bar .
Midpoint Entry: Places a limit order at the midpoint of the previous outside bar, entering when the price reaches this level.
EMA Trend Filter: Optionally filters signals based on the alignment of EMAs (7 > 25 > 99 > 200 for long, 7 < 25 < 99 < 200 for short). Can be toggled via the Use EMA Filter input.
Risk/Reward Management: Configurable risk/reward ratio (default 2.0) with stop-loss set at the low/high of the outside bar and take-profit calculated based on the bar's range multiplied by the ratio.
Visualization:
Lines for entry, stop-loss, and take-profit levels (dashed for active trades, solid for pending Midpoint Entry orders).
Line fills: Red between entry and stop-loss, green between entry and take-profit.
Previous lines and fills persist on the chart for historical reference (line deletion disabled).
Pending limit orders for Midpoint Entry extend dynamically to the right until triggered or canceled.
Information Table: Displays real-time trade details (entry model, RR ratio, open trade status, entry/stop/take-profit levels, profit/loss percentage) and strategy statistics (success rate, total trades). For Midpoint Entry, pending order details are shown.
Inputs:
Entry Model: Choose between Close Entry, High/Low Entry, or Midpoint Entry (default: Close Entry).
Risk/Reward Ratio: Set the RR ratio (default: 2.0, step: 0.5).
Use EMA Filter: Enable/disable the EMA trend filter (default: true).
Line Colors and Style: Customize colors for entry, stop-loss, and take-profit lines, and select line style (solid or dashed).
Table Settings: Adjust table text color, size (small/normal/large), and position (right top/middle/bottom).
Disclaimer: This strategy is for educational purposes only. Backtest thoroughly and use at your own risk. Past performance is not indicative of future results.
Price Statistical Strategy-Z Score V 1.01
Price Statistical Strategy – Z Score V 1.01
Overview
A technical breakdown of the logic and components of the “Price Statistical Strategy – Z Score V 1.01”.
This script implements a smoothed Z-Score crossover mechanism applied to the closing price to detect potential statistical deviations from local price mean. The strategy operates solely on price data (close) and includes signal spacing control and momentum-based candle filters. No volume-based or trend-detection components are included.
Core Methodology
The strategy is built on the statistical concept of Z-Score, which quantifies how far a value (closing price) is from its recent average, normalized by standard deviation. Two moving averages of the raw Z-Score are calculated: a short-term and a long-term smoothed version. The crossover between them generates long entries and exits.
Signal Conditions
Entry Condition:
A long position is opened when the short-term smoothed Z-Score crosses above the long-term smoothed Z-Score, and additional entry conditions are met.
Exit Condition:
The position is closed when the short-term Z-Score crosses below the long-term Z-Score, provided the exit conditions allow.
Signal Gapping:
A minimum number of bars (Bars gap between identical signals) must pass between repeated entry or exit signals to reduce noise.
Momentum Filter:
Entries are prevented during sequences of three or more consecutively bullish candles, and exits are prevented during three or more consecutively bearish candles.
Z-Score Function
The Z-Score is calculated as:
Z = (Close - SMA(Close, N)) / STDEV(Close, N)
Where N is the base period selected by the user.
Input Parameters
Enable Smoothed Z-Score Strategy
Enables or disables the Z-Score strategy logic. When disabled, no trades are executed.
Z-Score Base Period
Defines the number of bars used to calculate the simple moving average and standard deviation for the Z-Score. This value affects how responsive the raw Z-Score is to price changes.
Short-Term Smoothing
Sets the smoothing window for the short-term Z-Score. Higher values produce smoother short-term signals, reducing sensitivity to short-term volatility.
Long-Term Smoothing
Sets the smoothing window for the long-term Z-Score, which acts as the reference line in the crossover logic.
Bars gap between identical signals
Minimum number of bars that must pass before another signal of the same type (entry or exit) is allowed. This helps reduce redundant or overly frequent signals.
Trade Visualization Table
A table positioned at the bottom-right displays live PnL for open trades:
Entry Price
Unrealized PnL %
Text colors adapt based on whether unrealized profit is positive, negative, or neutral.
Technical Notes
This strategy uses only close prices — no trend indicators or volume components are applied.
All calculations are based on simple moving averages and standard deviation over user-defined windows.
Designed as a minimal, isolated Z-Score engine without confirmation filters or multi-factor triggers.
LANZ Strategy 4.0 [Backtest]🔷 LANZ Strategy 4.0 — Strategy Execution Based on Confirmed Structure + Risk-Based SL/TP
LANZ Strategy 4.0 is the official backtesting engine for the LANZ Strategy 4.0 trading logic. It simulates real-time executions based on breakout of Strong/Weak Highs or Lows, using a consistent structural system with SL/TP dynamically calculated per trade. With integrated risk management and lot size logic, this script allows traders to validate LANZ Strategy 4.0 performance with real strategy metrics.
🧠 Core Components:
Confirmed Breakout Entries: Trades are executed only when price breaks the most recent structural level (Strong High or Strong Low), detected using swing pivots.
Dynamic SL and TP Logic: SL is placed below/above the breakout point with a customizable buffer. TP is defined using a fixed Risk-Reward (RR) ratio.
Capital-Based Risk Management: Lot size is calculated based on account equity, SL distance, and pip value (e.g. $10 per pip on XAUUSD).
Clean and Controlled Executions: Only one trade is active at a time. No new entries are allowed until the current position is closed.
📊 Visual Features:
Automatic plotting of Entry, SL, and TP levels.
Full control of swing sensitivity (swingLength) and SL buffer.
SL and TP lines extend visually for clarity of trade risk and reward zones.
⚙️ How It Works:
Detects pivots and classifies trend direction.
Waits for breakout above Strong High (BUY) or below Strong Low (SELL).
Calculates dynamic SL and TP based on buffer and RR.
Computes trade size automatically based on risk per trade %.
Executes entry and manages exits via strategy engine.
📝 Notes:
Ideal for evaluating the LANZ Strategy 4.0 logic over historical data.
Must be paired with the original indicator (LANZ Strategy 4.0) for live trading.
Best used on assets with clear structural behavior (gold, indices, FX).
📌 Credits:
Backtest engine developed by LANZ based on the official rules of LANZ Strategy 4.0. This script ensures visual and logical consistency between live charting and backtesting simulations.