Supertrend [TradingConToto]Supertrend — ADX/DI + EMA Gap + Breakout (with Mobile UI)
What makes it original
Supertrend combines trend strength (ADX/DI), multi-timeframe bias (EMA63 and EMA 200D equivalent), a structural filter based on the distance between EMA2400 and EMA4800 expressed in ATR units, and a momentum confirmation through a previous high breakout.
This is not a random mashup — it’s a sequence of filters designed to reduce trades in ranging markets and prioritize mature trends:
Direction: +DI > -DI (trend led by buyers).
Strength: ADX > mean(ADX) (avoids weak, choppy phases).
Short-term bias: Close > EMA63.
Long-term bias: Close > EMA4800 ≈ EMA200 daily on H1.
Momentum: Close > High (immediate breakout).
Structure: (EMA2400 − EMA4800) > k·ATR (ensures separation in ATR units, filters out flat phases).
Entries & exits
Entry: when all six conditions are met and no open position exists.
Exit: if +DI < -DI or Close < EMA63.
Visuals: EMA63 is painted green while in position and red otherwise, with a supertrend-style band; “BUY” labels appear below the green band and “SELL” labels above the red band.
UI: includes a compact table (mobile-friendly) showing the state of each condition.
Default parameters used in this publication
Initial capital: 10,000
Position size: 10% of equity (≤10% per trade is considered sustainable).
Commission: 0.01% per side (adjust to your broker/market).
Slippage: 1 tick
Pyramiding: 0 (only one position at a time)
Adjust commission/slippage to match your market. For US equities, commissions are often per share; for spot crypto, 0.10–0.20% total is common. I publish with 0.01% per side as a conservative example to avoid overestimating results.
Recommended backtest dataset
Timeframe: H1
Multi-cycle window (e.g. 2015–today)
Symbols with high liquidity (e.g. NASDAQ-100 large caps, or BTC/ETH spot) to generate 100+ trades. Avoid cherry-picked short windows.
Why each filter matters
+DI > -DI + ADX > mean: reduce counter-trend trades and weak signals.
Close > EMA63 + Close > EMA4800: enforce trend alignment in short and long horizons.
Breakout High : requires immediate momentum, avoids early entries.
EMA gap in ATR units: blocks flat or compressed structures where EMA200D aligns with price.
Limitations
The breakout filter may skip healthy pullbacks; the design prioritizes continuation over perfect entry price.
No fixed trailing stop/TP; exits depend on trend degradation via DI/EMA63.
Results vary with real costs (commissions, slippage, funding). Adjust defaults to your broker.
How to use
Apply it on a clean chart (no other indicators when publishing).
Keep in mind the default parameters above; if you change them, mention it in your notes and use the same values in the Strategy Tester.
Ensure your dataset produces 100+ trades for statistical validity.
Candlestick analysis
Consolidated 9-Indicator Buy/Sell Zones & TriggersALL important inductors combined for long term position holders and short term guys...use it to enter trade and exit ...backgroud colour will give you the indication of the market mood..
FxAST Lite Wave — Universal (Profiles: Intraday / Swing)FxAST-LW Universal (Profiles)
The FxAST Lite Wave – Universal strategy is designed for adaptability across markets and timeframes, with two ready-to-use profiles:
Intraday (5m–1H) → tuned for futures & FX scalps/day trades. Includes session filters, ATR volatility regimes, and impulse confirmation to reduce chop.
Swing (1D–3D) → tuned for swing positions. Uses relaxed impulse filters, slope + bias confirmation, and DI-spread to capture bigger moves.
Key features:
✅ Multi-EMA Lite Wave core (5/13/62/200)
✅ Regime filter via DI-spread (trend vs chop)
✅ EMA200 slope filter
✅ Optional HTF bias confirmation
✅ ATR-based stops, breakeven & trailing logic
✅ Time-stop exits to avoid capital stagnation
✅ Risk % position sizing
Usage:
Switch between Intraday and Swing modes via the Profile input. Adjust DI-spread, slope, and impulse thresholds per symbol. Sessions recommended ON for indices (NQ/ES/RTY) and OFF for FX.
⚠️ Disclaimer: This script is for research & educational purposes only. Not financial advice. Test extensively before applying live. Past performance does not guarantee future results.
© FxAST
swapstrategy-Reversal StrategyGenerate buy and sell signals and reverses position when chart turn buy or sell side
ORB FVG Strategy with telegram V6.1Summary
Intraday NY-session strategy with Opening-Range bias (09:30–10:00 NY), FVG entries (incl. optional HTF FVGs), momentum filters (LinReg slope & Williams %R), limit entries inside the zone, SL from FVG anchors, and TP via risk-reward. Includes session/trade caps, pending-order handling, auto-cancel at NY time, and optional Telegram webhook alerts.
Feature Overview
Opening Range & Bias: OR high/low built until 10:00 NY, then frozen. Bias from confirmed 5-minute candles (modes: Body Close, Complete Candle, Wick Only).
FVG Scanner: Bull/bear FVGs (choose wick or body gaps), min size, auto-extend, mitigation cleanup (touch or 50%).
HTF FVG (10 min): Optional – displayed after ≥ 2 consecutive FVGs; cleans up on touch/50%.
Entry/SL/TP: Entry at X% fill (+extra %) within the FVG; SL from FVG candle / FVG-1 / FVG-2 (smart) + buffer; TP via risk-reward.
Momentum Filters: LinReg slope (MLL) + Williams %R with threshold/slope filters (individually switchable).
Intrabar Mode (optional): Immediate Open/intrabar entry on touch (calc_on_every_tick=true) or classic bar-close confirmation (toggle).
Trade Management: Max trades/day, pending cap, auto-cancel at defined NY time, pause after first winner (optional).
Telegram: Programmatic alerts via alert() with Telegram-ready JSON payload.
Parameters (compact)
Group Parameter Purpose
Sessions Trading session, Opening range Trading/OR window (internal NY TZ)
Bias Body Close / Complete Candle / Wick Only Bias confirmation relative to OR
Liquidity LQ session, lookback days, cleanup points, show lines Intraday liquidity marks & cleanup
FVG Min size, wick/body, colors, extend, cleanup Detection/visualization & validity
HTF FVG (10 m) Toggle/Display/Colors Conservative HTF filter/POI
Entry Fill %, extra %, max pending, validity (bars), cancel time, intrabar switch Execution timing, order caps, auto-cancel
Stop Loss Source: Candle / -1 / -2 (smart), buffer (points) SL anchor from FVG history + safety offset
Take Profit Risk-Reward (R:R) Target calculation
Momentum LinReg length/min slope, W%R length/min slope, HUD Trend/momentum filters
Trade Mgmt Max trades/day, pause after win Daily cap / risk cooldown
Telegram Enabled, tester, interval, channel id Webhook output & test signals
Debug & Info Debug panel, rejection reasons On-chart status/diagnostics
Alerts / Telegram Webhook (Quick Setup)
Create an alert with Condition: “Any alert() function call”.
Webhook URL: api.telegram.org
Message: leave empty (the strategy provides JSON via alert() – includes chat_id, parse_mode, text).
Ensure your bot can post to the channel and the chat_id is valid.
Repainting & Backtesting
HTF series via lookahead_off on closed higher-TF candles; FVG detection on confirmed bars (barstate.isconfirmed).
Intrabar/Open entries allow earlier fills but typically cause differences between backtest and live (tick granularity/slippage, limit touch on bar OHLC).
For reproducibility, trade without intrabar (bar-close only).
Limitations
No full tick simulation; limit fills rely on bar OHLC.
Liquidity “cleanup” is rule-based (not an orderbook).
Telegram depends on correct webhook configuration.
Tips
Timeframes: M5 (intrabar)
Start with modest R:R (e.g., 1.5–2.0) and tune filters carefully.
Disclaimer
No financial advice. Past results do not guarantee future performance. Use responsibly and follow Public Library rules.
License / Credits
© 2025 Lean Trading (Lennart Pomreinke). License: MPL-2.0.
Changelog
V06.1: Intrabar switch (Open/intrabar vs bar-close), Telegram sanitizer & tester, HTF-FVG cleanup, refined pending/cancel logic, debug panel (status & rejections).
Trend Following S/R Fibonacci Strategy 2Trend Following S/R Fibonacci Strategy 2
Trend Following S/R Fibonacci Strategy 2
Hilly's Advanced Crypto Scalping Strategy - 5 Min ChartTo determine the "best" input parameters for the Advanced Crypto Scalping Strategy on a 5-minute chart, we need to consider the goals of optimizing for profitability, minimizing false signals, and adapting to the volatile nature of cryptocurrencies. The default parameters in the script are a starting point, but the optimal values depend on the specific cryptocurrency pair, market conditions, and your risk tolerance. Below, I'll provide recommended input values based on common practices in crypto scalping, along with reasoning for each parameter. I’ll also suggest how to fine-tune them using TradingView’s backtesting and optimization tools.
Recommended Input Parameters
These values are tailored for a 5-minute chart for liquid cryptocurrencies like BTC/USD or ETH/USD on exchanges like Binance or Coinbase. They aim to balance signal frequency and accuracy for day trading.
Fast EMA Length (emaFastLen): 9
Reasoning: A 9-period EMA is commonly used in scalping to capture short-term price movements while remaining sensitive to recent price action. It reacts faster than the default 10, aligning with the 5-minute timeframe.
Slow EMA Length (emaSlowLen): 21
Reasoning: A 21-period EMA provides a good balance for identifying the broader trend on a 5-minute chart. It’s slightly longer than the default 20 to reduce noise while confirming the trend direction.
RSI Length (rsiLen): 14
Reasoning: The default 14-period RSI is a standard choice for momentum analysis. It works well for detecting overbought/oversold conditions without being too sensitive on short timeframes.
RSI Overbought (rsiOverbought): 75
Reasoning: Raising the overbought threshold to 75 (from 70) reduces false sell signals in strong bullish trends, which are common in crypto markets.
RSI Oversold (rsiOversold): 25
Reasoning: Lowering the oversold threshold to 25 (from 30) filters out weaker buy signals, ensuring entries occur during stronger reversals.
MACD Fast Length (macdFast): 12
Reasoning: The default 12-period fast EMA for MACD is effective for capturing short-term momentum shifts in crypto, aligning with scalping goals.
MACD Slow Length (macdSlow): 26
Reasoning: The default 26-period slow EMA is a standard setting that works well for confirming momentum trends without lagging too much.
MACD Signal Smoothing (macdSignal): 9
Reasoning: The default 9-period signal line is widely used and provides a good balance for smoothing MACD crossovers on a 5-minute chart.
Bollinger Bands Length (bbLen): 20
Reasoning: The default 20-period Bollinger Bands are effective for identifying volatility breakouts, which are key for scalping in crypto markets.
Bollinger Bands Multiplier (bbMult): 2.0
Reasoning: A 2.0 multiplier is standard and captures most price action within the bands. Increasing it to 2.5 could reduce signals but improve accuracy in highly volatile markets.
Stop Loss % (slPerc): 0.8%
Reasoning: A tighter stop loss of 0.8% (from 1.0%) suits the high volatility of crypto, helping to limit losses on false breakouts while keeping risk manageable.
Take Profit % (tpPerc): 1.5%
Reasoning: A 1.5% take-profit target (from 2.0%) aligns with scalping’s goal of capturing small, frequent gains. Crypto markets often see quick reversals, so a smaller target increases the likelihood of hitting profits.
Use Candlestick Patterns (useCandlePatterns): True
Reasoning: Enabling candlestick patterns (e.g., engulfing, hammer) adds confirmation to signals, reducing false entries in choppy markets.
Use Volume Filter (useVolumeFilter): True
Reasoning: The volume filter ensures signals occur during high-volume breakouts, which are more likely to sustain in crypto markets.
Signal Arrow Size (signalSize): 2.0
Reasoning: Increasing the arrow size to 2.0 (from 1.5) makes buy/sell signals more visible on the chart, especially on smaller screens or volatile price action.
Background Highlight Transparency (bgTransparency): 85
Reasoning: A slightly higher transparency (85 from 80) keeps the background highlights subtle but visible, avoiding chart clutter.
How to Apply These Parameters
Copy the Script: Use the Pine Script provided in the previous response.
Paste in TradingView: Open TradingView, go to the Pine Editor, paste the code, and click "Add to Chart."
Set Parameters: In the strategy settings, manually input the recommended values above or adjust them via the input fields.
Test on a 5-Minute Chart: Apply the strategy to a liquid crypto pair (e.g., BTC/USDT, ETH/USDT) on a 5-minute chart.
Fine-Tuning for Optimal Performance
To find the absolute best parameters for your specific trading pair and market conditions, use TradingView’s Strategy Tester and optimization features:
Backtesting:
Run the strategy on historical data for your chosen pair (e.g., BTC/USDT on Binance).
Check metrics like Net Profit, Profit Factor, Win Rate, and Max Drawdown in the Strategy Tester.
Focus on a sample period of at least 1–3 months to capture various market conditions (bull, bear, sideways).
Parameter Optimization:
In the Strategy Tester, click the settings gear next to the strategy name.
Enable optimization for key inputs like emaFastLen (test range: 7–12), emaSlowLen (15–25), slPerc (0.5–1.5), and tpPerc (1.0–3.0).
Run the optimization to find the combination with the highest net profit or best Sharpe ratio, but avoid over-optimization (curve-fitting) by testing on out-of-sample data.
Market-Specific Adjustments:
Volatile Pairs (e.g., DOGE/USDT): Use tighter stop losses (e.g., 0.5–0.7%) and smaller take-profit targets (e.g., 1.0–1.2%) to account for rapid price swings.
Stable Pairs (e.g., BTC/USDT): Slightly wider stop losses (e.g., 1.0–1.2%) and take-profit targets (e.g., 1.8–2.5%) may work better.
Trending Markets: Increase emaSlowLen (e.g., to 25–30) to follow stronger trends.
Choppy Markets: Tighten bbMult (e.g., to 1.8) and lower rsiOverbought/rsiOversold (e.g., to 70/30) to filter noise.
Forward Testing:
After backtesting, run the strategy in real-time on a demo account for 1–2 weeks to validate performance under current market conditions.
Important Notes
No Universal "Best" Numbers: Optimal parameters vary by crypto pair, exchange, and market conditions (e.g., bull vs. bear market). The suggested values are a starting point based on common scalping practices.
Risk Management: Never risk more than 1–2% of your account per trade. Adjust position sizing in TradingView’s strategy settings to align with your risk tolerance.
Market Volatility: Crypto markets are highly volatile. Test the strategy on your specific pair and adjust parameters if signals are too frequent or too rare.
Not Financial Advice: This is an educational tool. Backtest thoroughly and use a demo account before trading with real funds.
If you want me to generate a chart showing backtest performance for specific parameters or to tweak the script further (e.g., adding more indicators or adjusting signal logic), let me know!can you add clear buy ans sell signs above the candles in this codeTo add clear buy and sell signals above the candles in the provided Pine Script, I'll modify the existing code to include prominent text labels directly above (for sell signals) and below (for buy signals) the candles. These labels will be larger, color-coded, and positioned to avoid clutter, ensuring they are easily visible on the chart. The core strategy logic (EMA, RSI, MACD, Bollinger Bands, candlestick patterns, and volume filter) will remain unchanged, and I'll reuse the same artifact_id since this is an update to the previous script.AdvancedCryptoScalpingStrategy.pinex-pine
Hilly 2.0 Advanced Crypto Scalping Strategy - 1 & 5 Min ChartsHow to Use
Copy the Code: Copy the script above.
Paste in TradingView: Open TradingView, go to the Pine Editor (bottom of the chart), paste the code, and click “Add to Chart.”
Check for Errors: Verify no errors appear in the Pine Editor console. The script uses Pine Script v5 (@version=5).
Select Timeframe:
1-Minute Chart: Use defaults (emaFastLen=7, emaSlowLen=14, rsiLen=10, rsiOverbought=80, rsiOversold=20, slPerc=0.5, tpPerc=1.0, useCandlePatterns=false).
5-Minute Chart: Adjust to emaFastLen=9, emaSlowLen=21, rsiLen=14, rsiOverbought=75, rsiOversold=25, slPerc=0.8, tpPerc=1.5, useCandlePatterns=true.
Apply to Chart: Use a liquid crypto pair (e.g., BTC/USDT, ETH/USDT on Binance or Coinbase).
Verify Signals:
Green “BUY” or “EMA BUY” labels and triangle-up arrows below candles.
Red “SELL” or “EMA SELL” labels and triangle-down arrows above candles.
Green/red background highlights for signal candles.
Arrows use size.normal for consistent visibility.
Backtest: Use TradingView’s Strategy Tester to evaluate performance over 1–3 months, checking Net Profit, Win Rate, and Drawdown.
Demo Test: Run on a demo account to confirm signal visibility and performance before trading with real funds.
ECG Sanbot IndicatorNot my best but my first strategy to pass prop firms. Strength based signals. Change the length and repainting settings before setting alerts up.
First strategy to pass my prop firm. Change the tf and length to see reliable signals. Option to remove repainting if you want to set alerts. Not the best compared to my other scripts but will always get you in the green.
Core Logic
Calculates a double-smoothed EMA source on a higher timeframe (tf input).
Builds two RSI streams:
Repainting RSI (lookahead on) → reacts quickly to market changes.
Non-repainting RSI (lookahead off) → provides stable, confirmed values.
Computes the ECG difference between the two RSI streams.
Generates a buy signal when the ECG difference crosses above the upper threshold.
Generates a sell signal when the ECG difference crosses below the lower threshold.
Risk Management
Each trade uses a fixed trade size (trade_size).
Built-in stop-loss and take-profit controls:
Stop Loss: default 0.1% from entry price.
Take Profit: default 0.2% from entry price.
Both long and short entries are supported (direction selectable).
Customization Options
Adjustable timeframe (tf) for RSI source.
Fully configurable thresholds, lengths, and EMA smoothing.
Toggle between repainting vs. non-repainting behavior.
Backtest period controls (start and end date).
Visualization
Plots the ECG difference line in red.
Displays horizontal threshold lines for signal reference.
Master Strategy Hub (30 Strategies)30 strategy setup for backtesting f s sf fffsfs ffs f fs fs fsf sfsfsfsfs
Chiến lược Lọc Tín hiệu (Cooldown & ATR)Chiến lược Lọc Tín hiệu (Cooldown & ATR)
Chiến lược Lọc Tín hiệu (Cooldown & ATR)
MTF FVG Confluence v6 — JSON Alerts via alert()This strategy combines multi-timeframe confluence with candlestick analysis and fair value gaps (FVGs) to generate structured long/short entries. It aligns Daily and 4H EMA trends with 1H MACD momentum, then confirms with engulfing candles and FVG zones for precision entries. Risk management is built-in, featuring stop-loss, 3R take-profit targets, and optional break-even logic, with dynamic JSON alerts for webhook automation.
Categories:
Candlestick analysis
Chart patterns
Cycles
emavelas StrategyThe "emavelas Strategy" is a TradingView Pine Script (v6) for trend-following trading, combining EMA crossovers (7 and 25 periods) with candlestick patterns, market structure (HH/HL, BOS/CHOCH), volume/RSI filters, and multi-timeframe alignment (5m to Daily). It generates confirmed buy/sell signals, visualizes trends with lines/labels/tables, and includes backtesting with risk management (RR 2:1, dynamic SL/TP based on swings). Ideal for stocks, forex, or crypto on lower timeframes. Customizable via inputs; test in Strategy Tester. Note: Trading involves risks; not financial advice.
NIFTY_2min_FVG_Buy_StrategySummary
This strategy is designed for scalping Nifty on a 2-minute chart, focusing exclusively on long entries. The script's purpose is to identify and act on specific bullish reversal patterns based on volume analysis and price action.
Concept & Core Logic
The strategy operates on a two-stage confirmation process:
Volume Absorption: The initial condition seeks to identify potential bullish reversals by detecting signs of selling pressure being absorbed by buyers. This suggests that a downward move may be losing momentum.
Fair Value Gap (FVG) Confirmation: After a volume absorption signal, the strategy waits for a Fair Value Gap (FVG) to appear. A long entry signal is generated only after a candle closes above the FVG zone, serving as confirmation of bullish intent.
Risk Management
The strategy employs a fixed take profit and stop loss for each trade, based on the Nifty underlying price:
Take Profit: The exit signal is triggered when a trade reaches a 25-point profit.
Stop Loss: The exit signal is triggered when a trade reaches a 30-point loss.
Intended Use
This tool is intended for traders who:
Utilize mechanical, rule-based systems for intraday trading and scalping.
Are interested in studying a structured approach that combines volume analysis with price action inefficiencies like Fair Value Gaps.
Two bullish candles buy and bearish candles sellA simple strategy for test.
Buy when two consecutive bullish candles.
Sell when two consecutive bearish candles.
Trend River Pullback (Avramis-style) v1//@version=5
strategy("Trend River Pullback (Avramis-style) v1",
overlay=true, initial_capital=10000, commission_type=strategy.commission.percent, commission_value=0.02,
pyramiding=0, calc_on_order_fills=true, calc_on_every_tick=true, margin_long=1, margin_short=1)
// ===== Inputs
// EMA "река"
emaFastLen = input.int(8, "EMA1 (быстрая)")
ema2Len = input.int(13, "EMA2")
emaMidLen = input.int(21, "EMA3 (средняя)")
ema4Len = input.int(34, "EMA4")
emaSlowLen = input.int(55, "EMA5 (медленная)")
// Откат и импульс
rsiLen = input.int(14, "RSI длина")
rsiOB = input.int(60, "RSI порог тренда (лонг)")
rsiOS = input.int(40, "RSI порог тренда (шорт)")
pullbackPct = input.float(40.0, "Глубина отката в % ширины реки", minval=0, maxval=100)
// Риск-менеджмент
riskPct = input.float(1.0, "Риск на сделку, % от капитала", step=0.1, minval=0.1)
atrLen = input.int(14, "ATR длина (стоп/трейлинг)")
atrMultSL = input.float(2.0, "ATR множитель для стопа", step=0.1)
tpRR = input.float(2.0, "Тейк-профит R-множитель", step=0.1)
// Трейлинг-стоп
useTrail = input.bool(true, "Включить трейлинг-стоп (Chandelier)")
trailMult = input.float(3.0, "ATR множитель трейлинга", step=0.1)
// Торговые часы (по времени биржи TradingView символа)
useSession = input.bool(false, "Ограничить торговые часы")
sessInput = input.session("0900-1800", "Сессия (локальная для биржи)")
// ===== Calculations
ema1 = ta.ema(close, emaFastLen)
ema2 = ta.ema(close, ema2Len)
ema3 = ta.ema(close, emaMidLen)
ema4 = ta.ema(close, ema4Len)
ema5 = ta.ema(close, emaSlowLen)
// "Река": верх/низ как конверт по средним
riverTop = math.max(math.max(ema1, ema2), math.max(ema3, math.max(ema4, ema5)))
riverBot = math.min(math.min(ema1, ema2), math.min(ema3, math.min(ema4, ema5)))
riverMid = (riverTop + riverBot) / 2.0
riverWidth = riverTop - riverBot
// Трендовые условия: выстроенность EMAs
bullAligned = ema1 > ema2 and ema2 > ema3 and ema3 > ema4 and ema4 > ema5
bearAligned = ema1 < ema2 and ema2 < ema3 and ema3 < ema4 and ema4 < ema5
// Импульс
rsi = ta.rsi(close, rsiLen)
// Откат внутрь "реки"
pullbackLevelBull = riverTop - riverWidth * (pullbackPct/100.0) // чем больше %, тем глубже внутрь
pullbackLevelBear = riverBot + riverWidth * (pullbackPct/100.0)
pullbackOkBull = bullAligned and rsi >= rsiOB and low <= pullbackLevelBull
pullbackOkBear = bearAligned and rsi <= rsiOS and high >= pullbackLevelBear
// Триггер входа: возврат в импульс (пересечение быстрой EMA)
longTrig = pullbackOkBull and ta.crossover(close, ema1)
shortTrig = pullbackOkBear and ta.crossunder(close, ema1)
// Сессия
inSession = useSession ? time(timeframe.period, sessInput) : true
// ATR для стопов
atr = ta.atr(atrLen)
// ===== Position sizing по риску
// Расчет размера позиции: риск% от капитала / (стоп в деньгах)
capital = strategy.equity
riskMoney = capital * (riskPct/100.0)
// Предварительные уровни стопов
longSL = close - atrMultSL * atr
shortSL = close + atrMultSL * atr
// Цена тика и размер — приблизительно через syminfo.pointvalue (может отличаться на разных рынках)
tickValue = syminfo.pointvalue
// Избежать деления на 0
slDistLong = math.max(close - longSL, syminfo.mintick)
slDistShort = math.max(shortSL - close, syminfo.mintick)
// Кол-во контрактов/лотов
qtyLong = riskMoney / (slDistLong * tickValue)
qtyShort = riskMoney / (slDistShort * tickValue)
// Ограничение: не меньше 0
qtyLong := math.max(qtyLong, 0)
qtyShort := math.max(qtyShort, 0)
// ===== Entries
if inSession and longTrig and strategy.position_size <= 0
strategy.entry("Long", strategy.long, qty=qtyLong)
if inSession and shortTrig and strategy.position_size >= 0
strategy.entry("Short", strategy.short, qty=qtyShort)
// ===== Exits: фиксированный TP по R и стоп
// Храним цену входа
var float entryPrice = na
if strategy.position_size != 0 and na(entryPrice)
entryPrice := strategy.position_avg_price
if strategy.position_size == 0
entryPrice := na
// Цели
longTP = na(entryPrice) ? na : entryPrice + tpRR * (entryPrice - longSL)
shortTP = na(entryPrice) ? na : entryPrice - tpRR * (shortSL - entryPrice)
// Трейлинг: Chandelier
trailLong = close - trailMult * atr
trailShort = close + trailMult * atr
// Итоговые уровни выхода
useTrailLong = useTrail and strategy.position_size > 0
useTrailShort = useTrail and strategy.position_size < 0
// Для лонга
if strategy.position_size > 0
stopL = math.max(longSL, na) // базовый стоп
tStop = useTrailLong ? trailLong : longSL
// Выход по стопу/трейлу и ТП
strategy.exit("L-Exit", from_entry="Long", stop=tStop, limit=longTP)
// Для шорта
if strategy.position_size < 0
stopS = math.min(shortSL, na)
tStopS = useTrailShort ? trailShort : shortSL
strategy.exit("S-Exit", from_entry="Short", stop=tStopS, limit=shortTP)
// ===== Visuals
plot(ema1, "EMA1", display=display.all, linewidth=1)
plot(ema2, "EMA2", display=display.all, linewidth=1)
plot(ema3, "EMA3", display=display.all, linewidth=2)
plot(ema4, "EMA4", display=display.all, linewidth=1)
plot(ema5, "EMA5", display=display.all, linewidth=1)
plot(riverTop, "River Top", style=plot.style_linebr, linewidth=1)
plot(riverBot, "River Bot", style=plot.style_linebr, linewidth=1)
fill(plot1=plot(riverTop, display=display.none), plot2=plot(riverBot, display=display.none), title="River Fill", transp=80)
plot(longTP, "Long TP", style=plot.style_linebr)
plot(shortTP, "Short TP", style=plot.style_linebr)
plot(useTrailLong ? trailLong : na, "Trail Long", style=plot.style_linebr)
plot(useTrailShort ? trailShort : na, "Trail Short", style=plot.style_linebr)
// Маркеры сигналов
plotshape(longTrig, title="Long Trigger", style=shape.triangleup, location=location.belowbar, size=size.tiny, text="L")
plotshape(shortTrig, title="Short Trigger", style=shape.triangledown, location=location.abovebar, size=size.tiny, text="S")
// ===== Alerts
alertcondition(longTrig, title="Long Signal", message="Long signal: trend aligned + pullback + momentum")
alertcondition(shortTrig, title="Short Signal", message="Short signal: trend aligned + pullback + momentum")
Rev Smart Pivot V5.0 by SJKimRev Smart Pivot V5.0 by SJKim
Rev Smart Pivot V5.0 by SJKim
Rev Smart Pivot V5.0 by SJKim
MuLegend's Break & Retest StrategyThis strategy was produced to help traders who trade NQ: win! try it out on a demo, see how you like and happy trading!! Works well if you are a break & retest trader!!!
MuMu
@atltime2shine on IG
The DTC fix7 Best Combined (New York Time Sessions)The DTC Bot – Weekly Results Recap 🚀
This week the bot came back with serious momentum! Here’s the breakdown of performance across pairs:
✅ AUDCHF: +$6,018.14
✅ NZDCHF: +$4,965.29
✅ AUDUSD: +$2,867.04
✅ NZDJPY: +$1,063.22
❌ NZDCAD: -$5,138.61
📊 Net Result: + $9,775.08
💡 Key Insight: Trading isn’t about one single trade or even one single week — it’s about probabilities over time. After a tough performance last week, this bounce shows how quickly the tide can turn in our favor.
The DTC Bot is designed to adapt across pairs, balance outcomes, and keep probabilities working for you.
⚡ Ready to get access?
The DTC Bot is now available as an invite-only strategy on TradingView:
$59/month subscription
$499/year (save big with the yearly plan!)
J12Matic Builder by galgoomA flexible Renko/tick strategy that lets you choose between two entry engines (Multi-Source 3-way or QBand+Moneyball), with a unified trailing/TP exit engine, NY-time trading windows with auto-flatten, daily profit/loss and trade-count limits (HALT mode), and clean webhook routing using {{strategy.order.alert_message}}.
Highlights
Two entry engines
Multi-Source (3): up to three long/short sources with Single / Dual / Triple logic and optional lookback.
QBand + Moneyball: Gate → Trigger workflow with timing windows, OR/AND trigger modes, per-window caps, optional same-bar fire.
Unified exit engine: Trailing by Bricks or Ticks, plus optional static TP/SL.
Session control (NY time): Evening / Overnight / NY Session windows; auto-flatten at end of any enabled window.
Day controls: Profit/Loss (USD) and Trade-count limits. When hit, strategy HALTS new entries, shows an on-chart label/background.
Alert routing designed for webhooks: Every order sets alert_message= so you can run alerts with:
Condition: this strategy
Notify on: Order fills only
Message: {{strategy.order.alert_message}}
Default JSONs or Custom payloads: If a Custom field is blank, a sensible default JSON is sent. Fill a field to override.
How to set up alerts (the 15-second version)
Create a TradingView alert with this strategy as Condition.
Notify on: Order fills only.
Message: {{strategy.order.alert_message}} (exactly).
If you want your own payloads, paste them into Inputs → 08) Custom Alert Payloads.
Leave blank → the strategy sends a default JSON.
Fill in → your text is sent as-is.
Note: Anything you type into the alert dialog’s Message box is ignored except the {{strategy.order.alert_message}} token, which forwards the payload supplied by the strategy at order time.
Publishing notes / best practices
Renko users: Make sure “Renko Brick Size” in Inputs matches your chart’s brick size exactly.
Ticks vs Bricks: Exit distances switch instantly when you toggle Exit Units.
Same-bar flips: If enabled, a new opposite signal will first close the open trade (with its exit payload), then enter the new side.
HALT mode: When day profit/loss limit or trade-count limit triggers, new entries are blocked for the rest of the session day. You’ll see a label and a soft background tint.
Session end flatten: Auto-closes positions at window ends; these exits use the “End of Session Window Exit” payload.
Bar magnifier: Strategy is configured for on-close execution; you can enable Bar Magnifier in Properties if needed.
Default JSONs (used when a Custom field is empty)
Open: {"event":"open","side":"long|short","symbol":""}
Close: {"event":"close","side":"long|short|flat","reason":"tp|sl|flip|session|limit_profit|limit_loss","symbol":""}
You can paste any text/JSON into the Custom fields; it will be forwarded as-is when that event occurs.
Input sections — user guide
01) Entries & Signals
Entry Logic: Choose Multi-Source (3) or QBand + Moneyball (pick one).
Enable Long/Short Signals: Master on/off switches for entering long/short.
Flip on opposite signal: If enabled, a new opposite signal will close the current position first, then open the other side.
Signal Logic (Multi-Source):
Single: any 1 of the 3 sources > 0
Dual: Source1 AND Source2 > 0
Triple (default): 1 AND 2 AND 3 > 0
Long/Short Signal Sources 1–3: Provide up to three series (often indicators). A positive value (> 0) is treated as a “pulse”.
Use Lookback: Keeps a source “true” for N bars after it pulses (helps catch late triggers).
Long/Short Lookback (bars): How many bars to remember that pulse.
01b) QBands + Moneyball (Gate -> Trigger)
Allow same-bar Gate->Trigger: If ON, a trigger can fire on the same bar as the gate pulse.
Trigger must fire within N bars after Gate: Size of the gate window (in bars).
Max signals per window (0 = unlimited): Cap the number of entries allowed while a gate window is open.
Buy/Sell Source 1 – Gate: Gate pulse sources that open the buy/sell window (often a regime/zone, e.g., QBands bull/bear).
Trigger Pulse Mode (Buy/Sell): How to detect a trigger pulse from the trigger sources (Change / Appear / Rise>0 / Fall<0).
Trigger A/B sources + Extend Bars: Primary/secondary triggers plus optional extension to persist their pulse for N bars.
Trigger Mode: Pick S2 only, S3 only, S2 OR S3, or S2 AND S3. AND mode remembers both pulses inside the window before firing.
02) Exit Units (Trailing/TP)
Exit Units: Choose Bricks (Renko) or Ticks. All distances below switch accordingly.
03) Tick-based Trailing / Stops (active when Exit Units = Ticks)
Initial SL (ticks): Starting stop distance from entry.
Start Trailing After (ticks): Start trailing once price moves this far in your favor.
Trailing Distance (ticks): Offset of the trailing stop from peak/trough once trailing begins.
Take Profit (ticks): Optional static TP distance.
Stop Loss (ticks): Optional static SL distance (overrides trailing if enabled).
04) Brick-based Trailing / Stops (active when Exit Units = Bricks)
Renko Brick Size: Must match your chart’s brick size.
Initial SL / Start Trailing After / Trailing Distance (bricks): Same definitions as tick mode, measured in bricks.
Take Profit / Stop Loss (bricks): Optional static distances.
05) TP / SL Switch
Enable Static Take Profit: If ON, closes the trade at the fixed TP distance.
Enable Static Stop Loss (Overrides Trailing): If ON, trailing is disabled and a fixed SL is used.
06) Trading Windows (NY time)
Use Trading Windows: Master toggle for all windows.
Evening / Overnight / NY Session: Define each session in NY time.
Flatten at End of : Auto-close any open position when a window ends (sends the Session Exit payload).
07) Day Controls & Limits
Enable Profit Limits / Profit Limit (Dollars): When daily net PnL ≥ limit → auto-flatten and HALT.
Enable Loss Limits / Loss Limit (Dollars): When daily net PnL ≤ −limit → auto-flatten and HALT.
Enable Trade Count Limits / Number of Trades Allowed: After N entries, HALT new entries (does not auto-flatten).
On-chart HUD: A label and soft background tint appear when HALTED; a compact status table shows Day PnL, trade count, and mode.
08) Custom Alert Payloads (used as strategy.order.alert_message)
Long/Short Entry: Payload sent on entries (if blank, a default open JSON is sent).
Regular Long/Short Exit: Payload sent on closes from SL/TP/flip (if blank, a default close JSON is sent).
End of Session Window Exit: Payload sent when any enabled window ends and positions are flattened.
Profit/Loss/Trade Limit Close: Payload sent when daily profit/loss limit causes auto-flatten.
Tip: Any tokens you include here are forwarded “as is”. If your downstream expects variables, do the substitution on the receiver side.
Known limitations
No bracket orders from Pine: This strategy doesn’t create OCO/attached brackets on the broker; it simulates exits with strategy logic and forwards your payloads for external automation.
alert_message is per order only: Alerts fire on order events. General status pings aren’t sent unless you wire a separate indicator/alert.
Renko specifics: Backtests on synthetic Renko can differ from live execution. Always forward-test on your instrument and settings.
Quick checklist before you publish
✅ Brick size in Inputs matches your Renko chart
✅ Exit Units set to Bricks or Ticks as you intend
✅ Day limits/Windows toggled as you want
✅ Custom payloads filled (or leave blank to use defaults)
✅ Your alert uses Order fills only + {{strategy.order.alert_message}}
fero.Laplace + MA TP/SL Strategy (10m)//@version=5Labne is a good technique for generating logic or theory.
fero.karma algoUnderstand what stocks, currencies (forex), and cryptocurrencies are. Learn common terms like bull market, bear market, volatility, and liquidity.
Study Analysis: There are two main types of analysis:
GMMA ABC Strategy Overview
The strategy is built on the Guppy Multiple Moving Average (GMMA) framework with three different entry types (A, B, C).
It adds multiple anti-chop filters (ATR, ADX, RSI, box filter, candle filters) to reduce false signals in sideways markets.
🟢 Type A – Structure Breakout
Looks for tight EMA compression (spread below threshold).
Confirms trend sequence alignment (short > mid > long EMAs for bullish, inverse for bearish).
Requires a swing high/low breakout (close above recent high or below recent low).
Entry represents a trend reversal breakout after consolidation.
Tuning parameters:
spreadThresh → how tight EMAs must compress.
structLookback → lookback window for swing highs/lows.
strictSeq → whether EMA stacking must be strictly ordered or loosely aligned.
🟡 Type B – Trend Continuation
Detects strong price bars crossing multiple EMAs (body cross count ≥ threshold).
Requires short-term EMAs above mid-term and price above long-term EMAs (for long, opposite for short).
Includes anti-chop filters:
Minimum GMMA spread (ensures trend is already strong).
ADX filter (trend strength).
RSI filter (avoid overbought/oversold traps).
ADX and RSI can be combined using AND or OR logic.
Tuning parameters:
bodyThresh → how many EMAs the candle body must cross.
minSpreadB → minimum GMMA expansion required.
adxMin_B / rsiMinLong_B / rsiMaxShort_B → sensitivity of trend filters.
bLogic → whether both ADX and RSI are required (AND) or just one (OR).
🔴 Type C – Momentum Breakout
Identifies strong momentum candles crossing multiple EMAs (≥ cross threshold).
Candle body must be large relative to ATR (default ≥ 0.8 * ATR).
Typically captures impulsive breakout moves.
Tuning parameters:
crossThresh → number of EMAs crossed in a single bar.
atrMultC → required body size relative to ATR.
⚪ Global Filters
ATR filter: ensures the candle has enough body size relative to volatility.
Candle patterns: Pin bar, Engulfing, Marubozu can override ATR filter.
Box filter: suppresses signals when price is trapped inside a small consolidation range.
Weekend filter: disables trading on Saturday/Sunday.
📊 Trade Management
Stop loss (SL): last swing low (for long) or swing high (for short).
Take profits (TP):
TP1 = 1R, TP2 = 2R, TP3 = 3R (visual only, not automated exits).
Strategy only executes with SL, TP levels are drawn for reference.
🎯 Key Idea
Type A = breakout after consolidation (structure break).
Type B = continuation of established trend (trend reinforcement).
Type C = momentum impulse breakout.
Multiple filters (ATR, ADX, RSI, box filter) are combined to reduce false signals in choppy markets.
👉 In short:
This is a multi-logic GMMA strategy that adapts to different market phases:
Type A for early breakout,
Type B for trend continuation,
Type C for explosive momentum.
And it has strong noise filters to avoid being chopped up in sideways conditions.