TASC 2026.08 An Ag Selling Model█ OVERVIEW
This strategy implements the "Ag Selling Model" as presented by Perry J. Kaufman in the August 2026 edition of the TASC Traders' Tips "Identifying The Best Price Levels For Selling Commodity Futures". The article describes a long-hold selling strategy for agricultural commodity futures based around the seasonal harvest timing of crops, mainly US grains traded on the CBOT and KCBOT, both which have been acquired by CME.
█ CONCEPTS
This model was originally presented in 1978 by the author to a group of commodity producers as an attempt to identify the best price levels to sell their products.
The core idea is that if there is only one crop per year, crop prices will be lowest around harvest and highest around peak growing season. Based on this timing, the strategy spaces out its sell orders up to three times throughout the year, and covers its position at harvest.
The goal of this strategy is simply to beat the average price. Since selling at harvest should typically provide a lower-than-average price exit, success for this strategy means having the average of its entries above the average price.
The level to sell at can be determined by finding a moving average that reflects seasonal changes. Once found, we measure volatility using Average True Range (ATR).
With these two figures, the volatility is added to the average based on a multiplication factor.
This creates a reasonable extreme at which to position short entries.
█ THE RULES
Sell short at the selling level.
Delay these sells to ensure two sells are not in the same rally.
Avoid selling immediately after harvest, as a long period of low prices typically follows.
Exit positions (cover shorts) at harvest.
▌Properties
IMPORTANT NOTE: The strategy parameters have been adjusted specifically for Corn Futures (ZC1!). This ticker operates in Cents (USX) rather than Dollars (USD); all the strategy values have been translated to account for this. To apply this strategy to other markets it is important to properly adjust the strategy parameters to simulate realistic conditions.
Initial Capital : 15,000,000¢ == $150,000; see note above.
Position Sizing : This strategy sells in one-contract increments up to three times per year.
Commissions : Commission value is set to 300¢ ($3) per order, which is a generous estimate.
Slippage : Slippage is set to one tick to simulate reasonable execution conditions.
█ INPUTS
Source : Source for calculations.
MA length : Moving Average length (Simple Moving Average). A 20 to 60 day range is recommended; with 40 as a starting point.
ATR length : Average True Range length.
ATR factor : Factor by which to multiply ATR when calculating selling level. 2.5 to 3.5 is generally recommended but higher has been seen for more volatile grains.
Month of Harvest : Set the month of harvest for the crop being traded, which changes depending on the seasonality of the commodity.
Delay in months after harvest : Set this to the typical downtime after harvest where prices are typically lowest. This can vary per instrument but 2 months is the suggested point for tuning.
Days between trades : Days to wait between sales.
策略

策略

TIS - BTC ESTRATEGIA Momentum + Confluencia¿Que hace este sistema?
Compra la fuerza a favor de la tendencia; pero solo cuando el diario confirma
La mayoría de los sistemas de momentum fallan por lo mismo: entran en cada impulso que ven. Este no. Opera en 4 horas, pero exige que el gráfico diario tenga momentum al mismo tiempo. Si las dos escalas no coinciden, no hay trade.
Ese único filtro es lo que separa este sistema de un generador de señales cualquiera. En la investigación, exigir la confluencia llevó el Recovery Factor fuera de muestra de 0,96 a 14,7. No porque gane más por operación, sino porque descarta la mayoría de las señales y deja solo las que tienen las dos escalas empujando en la misma dirección.
Resultado: 81 operaciones en 9 años. Es un sistema deliberadamente selectivo.
Las reglas, completas
1 · Solo a favor de la tendencia Long únicamente si el precio está por encima de su SMA de 50.
2 · Entrada por momentum 3 velas verdes consecutivas (cierre > apertura) en 4 horas.
3 · Confluencia: el filtro clave El gráfico diario tiene que tener su propia racha de 3 velas verdes. Si el diario no ha disparado, la señal de 4h se ignora por completo. Es un hecho binario: disparó o no disparó. No es una media que haya que elegir ni un umbral que haya que optimizar — por eso tiene menos perillas que romper.
4 · Tamaño por riesgo (ATR) Cada posición arriesga ~1% del capital, medido contra una distancia de 3 × ATR(14). Cuando hay confluencia el tamaño se multiplica por 1,5. Tope duro de exposición: 40% de la cuenta.
5 · Salidas
Giro de media: cierra en cuanto el precio cierra por debajo de la SMA de 50.
Corte de cola: sale al instante si una vela va en contra más de 2 × ATR.
Sin stop fijo, sin take profit, sin trailing. Se probaron todos: ninguno mejoró el resultado.
Resultados del backtest
BINANCE:BTCUSDT · 4 horas · 17-ago-2017 → 20-jul-2026
Capital inicial $100.000
Beneficio neto +$201.117 (+201%)
Rentabilidad anual (CAGR) 13,1%
Máxima caída 6,2% (intradía, sobre el pico de capital)
Profit Factor 4,42
Operaciones 81
Aciertos 53,1%
Ganancia media / pérdida media 3,9 : 1
Duración media 7,2 días
Sharpe / Sortino 0,26 / 1,47
Construcción 2017-2020. Validación 2021-2026 con datos que el sistema nunca vio. La curva se comporta igual a un lado y al otro de esa línea; eso es lo que se estaba buscando, no el retorno.
El dato que importa:
En ese mismo periodo, BTC cayó un 83% (mínimo de diciembre de 2018). El sistema cayó un 6,2%.
Y la otra cara, porque sin ella la comparación es tramposa: comprar y aguantar rindió +1.389%, muy por encima del +201% del sistema. En retorno bruto, BTC gana de calle. Lo que cambia es el precio emocional: por cada punto de caída, el sistema devolvió 32 puntos de retorno; comprar y aguantar, 16,7. Aguantar un -83% es fácil en un gráfico y casi nadie lo hace en vivo.
Ajustes del backtest (transparencia)
Capital inicial $100.000 · sin apalancamiento · una posición a la vez
Órdenes ejecutadas al cierre de la vela (process_orders_on_close)
Slippage: 5 ticks
Comisión: 0 — hay que decirlo claro. Con la comisión spot de Binance (0,10%) sobre los $11,03 M de volumen negociado, el neto baja de $201.117 a ~$190.000 (+190% en vez de +201%). El sistema opera poco, así que el impacto existe pero no cambia la conclusión.
No repinta: la confluencia diaria se lee con lookahead_off y las señales se evalúan en cierre de vela.
Lo que este sistema NO hace
Es un sistema long-only. Gana en los mercados alcistas (2021, 2023, 2024) y en los bajistas queda casi plano: no gana, pero protege el capital; nunca tuvo un año de pérdida seria. Necesita que BTC no colapse.
No es all-weather. Para ganar en bajista hace falta el lado corto, que es otro problema y no está resuelto aquí. ¡Pero pronto puedo publicarlo, así que sígueme!
Si buscas algo que gane todos los años, construye un portafolio y vuelvelo una probabilidad!
Tampoco es un sistema de alta frecuencia: 9 operaciones al año de media. Habrá meses enteros sin hacer nada. Esa es la característica, no el defecto.
Cómo usarlo:
Pensado para BTC/USDT en 4 horas. Todos los parámetros son configurables, pero se dejaron en valores redondos a propósito (50, 3, 14, 3,0, 1%), el sistema aguanta al moverlos, y esa robustez es más valiosa que el punto óptimo del backtest.
El fondo verde marca cuándo el diario tiene momentum: si no está verde, no puede haber entrada.
Contenido educativo. Los resultados pasados no garantizan resultados futuros. Esto no es asesoría financiera; es un sistema documentado para que puedas estudiarlo, cuestionarlo y decidir por ti mismo.
Trade It Simple — trading sistemático, explicado simple. @mariellangsaez
ENGLISH DESCRIPTION:
Buy strength with the trend — but only when the daily confirms
Most momentum systems fail for the same reason: they take every impulse they see. This one doesn't. It trades the 4-hour chart, but it requires the daily chart to have momentum at the same time. If the two timeframes don't agree, there is no trade.
That single filter is what separates this from a generic signal generator. In testing, requiring confluence moved the out-of-sample Recovery Factor from 0.96 to 14.7. Not because it wins more per trade, but because it throws away most of the signals and keeps only the ones with both timeframes pushing the same way.
The result: 81 trades in 9 years. This system is deliberately selective.
The complete rules
1 · Trend only Long only when price is above its 50-period SMA.
2 · Momentum entry 3 consecutive green candles (close > open) on the 4-hour chart.
3 · Confluence — the key filter The daily chart must have its own run of 3 green candles. If the daily hasn't fired, the 4-hour signal is ignored entirely. It's a binary fact: it fired or it didn't. It isn't a moving average you have to pick or a threshold you have to optimize — which is exactly why it has fewer knobs to break.
4 · Risk-based position sizing (ATR) Each position risks ~1% of equity, measured against a distance of 3 × ATR(14). When confluence is present, size is multiplied by 1.5. Hard exposure cap: 40% of the account.
5 · Exits
Mean reversal: closes as soon as price closes below the 50 SMA.
Tail cut: exits immediately if a single candle moves against the position by more than 2 × ATR.
No fixed stop, no take profit, no trailing stop. All three were tested. None of them improved the result.
Backtest results
BINANCE:BTCUSDT · 4H · Aug 17, 2017 → Jul 20, 2026
Initial capital $100,000
Net profit +$201,117 (+201%)
Annualized return (CAGR) 13.1%
Max drawdown 6.2% (intrabar, against peak equity)
Profit factor 4.42
Total trades 81
Percent profitable 53.1%
Average win / average loss 3.9 : 1
Average duration 7.2 days
Sharpe / Sortino 0.26 / 1.47
Built on 2017-2020. Validated on 2021-2026 — data the system had never seen. The curve behaves the same on both sides of that line. That, not the return, was the goal.
The number that actually matters
Over that same period, BTC drew down 83% (December 2018 low). This system drew down 6.2%.
And the other side of it, because without this the comparison is dishonest: buy and hold returned +1,389%, far above the system's +201%. On raw return, BTC wins by a mile. What changes is the emotional price. For every point of drawdown, the system returned 32 points of profit; buy and hold returned 16.7. Sitting through an 83% drawdown looks easy on a chart, and almost nobody does it live.
Backtest settings (full transparency)
$100,000 initial capital · no leverage · one position at a time
Orders filled on bar close (process_orders_on_close)
Slippage: 5 ticks
Commission: 0 — and this needs saying plainly. Applying Binance spot taker fees (0.10%) to the $11.03M of volume traded, net profit drops from $201,117 to roughly $190,000 (+190% instead of +201%). The system trades rarely, so the impact is real but doesn't change the conclusion.
No repainting: daily confluence is read with lookahead_off, and all signals are evaluated on bar close.
What this system does NOT do
This is a long-only system. It makes money in bull markets (2021, 2023, 2024) and goes nearly flat in bear markets: it doesn't profit, but it protects capital — it has never had a seriously losing year. It needs BTC not to collapse.
It is not all-weather. Profiting in a bear market requires the short side, which is a different problem and is not solved here. If you want something that makes money every year, this isn't it.
It's also not a high-frequency system: 9 trades per year on average. There will be entire months with no activity. That's the feature, not the flaw.
How to use it
Built for BTC/USDT on the 4-hour chart. Every parameter is configurable, but they were deliberately left on round numbers (50, 3, 14, 3.0, 1%) — the system holds up when you move them, and that robustness is worth more than the backtest's optimal point.
The green background marks when the daily has momentum. If it isn't green, no entry is possible.
Educational content. Past results do not guarantee future results. This is not financial advice — it's a documented system, published so you can study it, challenge it, and decide for yourself.
Trade It Simple — systematic trading, explained simply. 策略

策略

策略

Strategia Bystrego - Swing Break + FVG + EMA 200 + Entry AlertsBYSTRY STRATEGY — SWING BREAKOUT, FAIR VALUE GAP AND EMA 200 FILTER
Overview
This strategy is designed specifically for the 2-minute chart and is intended for short-term trading on Nasdaq and Gold.
The system combines:
• Confirmed Swing High and Swing Low levels
• Break of Structure confirmation
• The first Fair Value Gap formed after the breakout
• A 50% Fair Value Gap retracement entry
• EMA 200 trend confirmation
• Previous Day, Previous Week and Asian Session liquidity filters
• Fixed Take Profit and Stop Loss levels
• Entry alerts generated only after the position is actually filled
The strategy does not open a position immediately after a structure breakout. It waits for the first valid Fair Value Gap and places a limit order at the midpoint of that imbalance.
TIMEFRAME
The strategy is designed exclusively for the 2-minute timeframe.
If the script is added to a different timeframe, it will generate an error and will not operate.
SUPPORTED MARKETS
The strategy contains two predefined market configurations:
NASDAQ
• Take Profit: 50 points
• Stop Loss: 50 points
GOLD
• Take Profit: 10 points
• Stop Loss: 10 points
The strategy uses a fixed 1:1 reward-to-risk ratio.
MARKET STRUCTURE
The strategy detects confirmed Swing High and Swing Low levels using pivot calculations.
Default pivot settings:
• Two candles on the left side
• Two candles on the right side
A Swing High or Swing Low becomes valid only after the required number of candles on the right side has closed.
LONG BREAK OF STRUCTURE
A bullish Break of Structure occurs when:
1. A confirmed Swing High exists.
2. The current candle closes above the Swing High.
3. The previous candle closed at or below that Swing High.
4. The strategy is not already in a trade.
5. There is no active pending order.
6. Long positions are enabled.
7. The price is above the EMA 200.
SHORT BREAK OF STRUCTURE
A bearish Break of Structure occurs when:
1. A confirmed Swing Low exists.
2. The current candle closes below the Swing Low.
3. The previous candle closed at or above that Swing Low.
4. The strategy is not already in a trade.
5. There is no active pending order.
6. Short positions are enabled.
7. The price is below the EMA 200.
FAIR VALUE GAP
After a valid Break of Structure, the strategy searches for the first Fair Value Gap.
By default, the Fair Value Gap must appear within three candles after the breakout. This value can be changed in the strategy settings.
Bullish Fair Value Gap:
A bullish Fair Value Gap is detected when the current candle’s low is above the high from two candles earlier.
Bullish FVG condition:
Current Low > High two candles earlier
Bearish Fair Value Gap:
A bearish Fair Value Gap is detected when the current candle’s high is below the low from two candles earlier.
Bearish FVG condition:
Current High < Low two candles earlier
ENTRY PRICE
The entry is placed at the 50% midpoint of the first valid Fair Value Gap.
Bullish entry:
Entry = Bullish FVG midpoint
Bearish entry:
Entry = Bearish FVG midpoint
The strategy uses a limit order. Therefore, the position is opened only when the market retraces back to the calculated entry price.
EMA 200 TREND FILTER
The EMA 200 is used as the main trend filter.
Long positions are allowed only when:
• The breakout candle closes above the EMA 200.
• The Fair Value Gap is formed while the price remains above the EMA 200.
• The planned limit entry is above the EMA 200.
• The market does not lose the EMA 200 while the limit order is pending.
Short positions are allowed only when:
• The breakout candle closes below the EMA 200.
• The Fair Value Gap is formed while the price remains below the EMA 200.
• The planned limit entry is below the EMA 200.
• The market does not move back above the EMA 200 while the limit order is pending.
The purpose of this filter is to prevent positions from being opened against the dominant 2-minute trend.
LIQUIDITY FILTER
Before placing a limit order, the strategy checks whether an important liquidity level is located between the planned entry and the Take Profit.
The following levels are monitored:
• Previous Day High
• Previous Day Low
• Previous Week High
• Previous Week Low
• Asian Session High
• Asian Session Low
A long setup is rejected when one of the following levels is located between the entry and Take Profit:
• Previous Day High
• Previous Week High
• Asian Session High
A short setup is rejected when one of the following levels is located between the entry and Take Profit:
• Previous Day Low
• Previous Week Low
• Asian Session Low
The purpose of this filter is to avoid entering directly into a nearby liquidity level that could stop or reverse the price before the target is reached.
PENDING ORDER CANCELLATION
A pending limit order can be cancelled when:
• The order has not been filled within the selected number of candles.
• The EMA 200 trend condition is no longer valid.
• A new liquidity level blocks the path to the target.
• The price reaches the theoretical Take Profit before retracing to the entry.
• The planned entry moves to the wrong side of the EMA 200.
The default pending order lifetime is 30 candles.
POSITION MANAGEMENT
The strategy allows only one active position at a time.
Pyramiding is disabled.
After the entry is filled, the strategy automatically places:
• A fixed Take Profit order
• A fixed Stop Loss order
The Take Profit and Stop Loss are calculated from the actual average position entry price.
ENTRY ALERTS
Alerts are generated only after the position is actually opened.
The strategy does not send an entry alert when:
• A Swing High or Swing Low appears.
• A Break of Structure appears.
• A Fair Value Gap appears.
• A pending limit order is created.
The alert is sent only when the limit order is filled and the strategy position changes from zero to either long or short.
The alert message includes:
• Direction
• Symbol
• Timeframe
• Entry price
• Take Profit
• Stop Loss
• EMA 200 filter confirmation
VISUAL ELEMENTS
The strategy can display:
• Confirmed Swing High levels
• Confirmed Swing Low levels
• EMA 200
• Previous Day High and Low
• Previous Week High and Low
• Asian Session High and Low
• Fair Value Gap area
• Profit area
• Risk area
• Entry level
• Take Profit level
• Stop Loss level
• Break of Structure markers
• Diagnostic rejection markers
IMPORTANT LIMITATIONS
This strategy does not predict future market direction.
The EMA 200 is a trend filter, but it does not eliminate false breakouts or losing positions.
The system may perform poorly during:
• Low-volume consolidation
• Rapidly changing market conditions
• Major economic announcements
• Whipsaw conditions around the EMA 200
• Sessions with limited liquidity
• Markets with unusually high volatility
Historical results do not guarantee future performance.
Real trading results may differ from backtest results because of commissions, spread, slippage, latency and differences between simulated and real order execution.
This strategy is provided for educational and research purposes only. It does not constitute financial or investment advice. 策略

策略

Bot Auto Trading Test Strategy# Bot Auto Trading Test Strategy
## 🇹🇼 繁體中文
### 用途
本策略**僅供測試交易機器人(Bot)是否能正常接收 TradingView 訊號並執行下單流程**,**不適合作為任何實際交易策略**。
此策略的目的不是追求獲利,而是驗證整個自動交易流程是否正常運作,包括:
* TradingView Strategy 是否正常產生交易訊號
* TradingView Alert 是否成功發送 Webhook
* Bot 是否正確接收訊號
* 交易所 API 是否成功建立訂單
* Bot 是否能正常執行平倉流程
### 策略邏輯
策略非常簡單,方便快速驗證 Bot:
1. 每根 K 棒收盤時建立一筆多單。
2. 下一根 K 棒收盤時立即全部平倉。
3. 重複上述流程,不斷產生開倉與平倉訊號。
此設計可以在短時間內產生大量交易事件,方便測試:
* 開倉訊號
* 平倉訊號
* Webhook 穩定性
* API 執行狀況
* Bot 是否有漏單、重複下單或延遲等問題
### 注意事項
* 本策略**不具任何交易優勢**。
* 不建議直接用於實盤交易。
* 所有交易結果皆不具參考價值。
* 本策略僅用於開發、測試及驗證自動交易系統。
若需要測試分批止盈、分批平倉、停損、不同訂單類型或其他交易流程,請使用對應的測試策略版本。
---
# 🇺🇸 English
## Purpose
This strategy is **designed solely for testing automated trading bots** and verifying that the complete TradingView-to-exchange workflow functions correctly. **It is NOT intended for live trading or profitability.**
The goal is to validate the entire automation pipeline, including:
* TradingView strategy signal generation
* TradingView webhook delivery
* Bot signal processing
* Exchange API order execution
* Position closing workflow
## Strategy Logic
The strategy intentionally uses a very simple trading logic:
1. Open a long position at every confirmed bar close.
2. Close the entire position on the next bar.
3. Repeat continuously to generate frequent entry and exit signals.
This allows developers to quickly verify:
* Entry order execution
* Exit order execution
* Webhook reliability
* Exchange API connectivity
* Bot stability, including missed orders, duplicate orders, and execution delays
## Disclaimer
* This strategy **has no trading edge**.
* It is **not designed to be profitable**.
* Backtest results are **not meaningful for performance evaluation**.
* It should be used **only for development, debugging, and testing automated trading systems**.
If you need to test partial take-profit, partial close, stop-loss, or other order management features, please use the corresponding dedicated test strategy.
策略

策略

策略

DOUBLE SUPERTREND PYRAMID STRATEGYDouble Supertrend Pyramid Strategy
This strategy trades off two Supertrend indicators calculated on independent, user-selected timeframes (defaults: 1-minute and 2-minute). A trade is only taken when both Supertrends agree on direction — when they align upward, the strategy goes long; when they align downward, it goes short. Each new alignment is treated as a new "plotted course," and the strategy tracks that course's direction so it doesn't re-enter on every bar, only on an actual flip.
Core Entry Logic
Long/Short/Both direction control, so you can restrict the strategy to one side of the market if desired.
A session time-window filter (with a timezone dropdown covering major global zones) lets you restrict trading to specific hours, with an option to auto-close everything when the window ends.
On a Supertrend flip, the strategy normally waits until the position is completely flat before entering the new direction — it does not force-close open tiered or pyramid contracts just because the trend flipped. (See "Exit At Next Supertrend Plotted Course" below for the opt-in alternative.)
Tiered Exit System
Three independent, fully self-contained profit-scaling tiers (Tier 1/2/3), each with:
A profit target (ticks) and contract quantity to scale out at that target
An optional Stop Loss, and an optional Trailing Stop with a separate activation threshold (ticks, own enable checkbox)
An "Exit At Next Supertrend Plotted Course" checkbox — when checked, that tier's contracts are force-closed the moment the trend flips; when unchecked (default), the tier runs entirely on its own Target/Stop/Trailing settings regardless of what the trend does next.
Pyramid Add-On System
Eight independent pyramid types can each be enabled separately to add contracts in the direction of an existing position when their own specific condition fires:
Turtle ATR Unit — adds every time price moves a set fraction of ATR in your favor from the last fill.
Swing Structure — adds on a new confirmed swing high/low in the trend direction.
Momentum Re-confirmation — adds when ADX is rising with DI+/DI- agreement and RSI holds past a threshold.
Breakout / Consolidation — adds on a fresh Donchian channel breakout.
Multi-Timeframe Alignment — adds only when a higher-timeframe EMA filter agrees with the trade direction.
Error-Function One-Tailed Test — adds when the current bar's move is statistically significant versus its recent return distribution (Normal or Student-T approximation).
KDE Percentile — adds when the current move ranks in the top percentile of a non-parametric kernel-density estimate of recent returns.
Viterbi Regime Detection — adds only while a 2-state Hidden Markov Model infers the market is in a "trending" (versus "ranging") regime.
Each pyramid type is fully self-contained: its own contracts-per-signal size, its own optional TP/SL/Trailing Stop, its own per-course contract and signal caps, a delay-between-signals timer, a minimum-distance-before-next-add gate (selectable as ATR multiple, percent, ticks, points, or dollars), and its own "Exit At Next Supertrend Plotted Course" checkbox. All types default to fully disabled.
Global Risk Controls (always active, override everything)
Max contracts per trade (position size cap across core + pyramid adds)
Master daily $ take-profit and $ max-loss halts
Volatility Exit — flattens everything if ATR expands beyond a multiple of its recent average
ATR Protective Stop — a catastrophic-loss stop measured off the position's average entry price
Reverse-At-Stop-Loss — an optional system that flips the core position to the opposite side when the per-course Stop Loss is hit, capped at a configurable number of reversals per course 策略

策略

VWAP Mean Reversion Strategy with Session and Volume FilterDescription:
Volume Weighted Average Price, is one of the most referenced levels on any intraday chart. It appears on almost every institutional trading desk as a benchmark for execution quality: did you buy below VWAP or above it? Did you sell above it or below it? That institutional significance is what makes it useful as a trading level, not because it is a magical support and resistance line, but because enough participants are watching it and acting around it that it creates real, observable price behavior.
This strategy is built around one of the most consistent behaviors VWAP produces: mean reversion. In sessions with no strong directional trend, price tends to oscillate around VWAP rather than trending away from it indefinitely. When price moves significantly above VWAP in a non-trending session, institutional sellers often step in, bringing price back toward the average. When price moves significantly below VWAP, buyers who missed the open use VWAP as a reference level for value. The result is a gravitational pull back toward VWAP that is observable, repeatable, and, with the right filters, tradable.
What VWAP Actually Measures
VWAP is calculated by summing the product of price and volume for every transaction during a session, then dividing by total volume. The result is the average price at which the instrument has traded during the day, weighted by how much traded at each price. A stock trading at $102 when VWAP is $100 means that, on average, every share transacted during the session changed hands at $100, and the current price is 2% above that average. Whether that premium is justified depends on whether volume is expanding in the direction of the move or shrinking, which is exactly what this strategy checks.
VWAP resets every session. This is important: VWAP is an intraday concept. Using it on daily charts or holding positions across sessions removes the institutional context that makes it meaningful. This strategy trades only within the active session for that reason.
The Mean Reversion Logic
Entries fire when two conditions are met simultaneously. First, price must have moved a defined distance away from VWAP, measured in ATR multiples to scale the threshold to the instrument's actual volatility rather than a fixed percentage. Second, volume on the move away from VWAP must be declining relative to its recent average. This second condition is the critical filter. A price move away from VWAP accompanied by expanding volume suggests a real directional move with genuine participation, shorting into that is dangerous. A move away from VWAP on declining volume suggests the move is losing conviction and the pull back to VWAP is more likely.
When price is above VWAP by more than the ATR threshold and volume is declining, a short entry fires. When price is below VWAP by more than the ATR threshold and volume is declining, a long entry fires. The target for both is VWAP itself — not a fixed ATR level, but the actual VWAP value at the time the target would be hit. Stop-loss is placed at an ATR multiple beyond the entry in the opposite direction from VWAP.
Session Filter
The strategy only trades between 9:45 AM and 3:15 PM ET. The first 15 minutes after the NYSE open are excluded deliberately. The opening session is when the largest institutional orders are being executed, VWAP has barely formed, and the spread between price and VWAP frequently reflects genuine price discovery rather than mean reversion opportunity. Trading into the first 15 minutes with a mean reversion approach is trading against the most aggressive order flow of the day. The final 45 minutes are excluded because end-of-day institutional rebalancing often moves price away from VWAP and keeps it there through the close, a mean reversion entry in that window frequently doesn't have time to play out before the session ends and the position needs to be closed.
What This Strategy Works Best With
VWAP mean reversion is most effective on highly liquid instruments where institutional participation is consistently high, major equity indices, large-cap individual stocks, and equity index futures. On thinly traded instruments, VWAP is less meaningful as a reference level because the institutional volume that creates the gravitational pull isn't present. On crypto markets, VWAP mean reversion can work but requires adjusting the session definition since crypto trades continuously, not in defined daily sessions.
What to Watch in Backtesting
Performance will vary significantly by market regime. In strongly trending sessions, where a catalyst like an earnings surprise, a Fed announcement, or a macro data release drives sustained directional movement, mean reversion against the trend produces losing trades. This is expected and not a flaw. Check the strategy's performance separately on trending days versus range-bound days if you can identify them. The most useful insight from backtesting this strategy is often not the aggregate win rate but the distribution of trade outcomes across different session types.
Shared for educational purposes and community discussion. This is not investment advice. Always backtest on your own instruments and timeframes using realistic commission assumptions before drawing any conclusions. 策略

NOVA EMA/MACD V2## NOVA EMA/MACD V2
NOVA EMA/MACD V2 is a multi-timeframe retracement strategy designed to identify structured continuation opportunities using EMA touches, MACD confirmation, and higher-timeframe momentum filtering.
The strategy first waits for price to retrace to the selected EMA after a defined number of candles have remained clear of it. Once a valid touch is detected, the setup becomes armed and waits for confirmation from the entry-timeframe MACD.
A trade can be triggered in two ways:
* The entry-timeframe MACD crosses in the direction of the setup while the higher-timeframe MACD agrees.
* The higher-timeframe MACD flips into the setup direction while the entry MACD is already aligned.
An optional EMA-side filter requires buy entries to close above the EMA and sell entries to close below it.
### Trade management
The strategy opens three separate positions using risk-based position sizing.
Default targets:
* Position 1: **1.5R**
* Position 2: **2R**
* Position 3: **2.5R**
Stop-loss distance is calculated using the width of a configurable Keltner Channel. Break-even activates at **0.9R** by default.
An additional EMA early-exit system activates after price reaches 1R. The remaining position can then be closed after four consecutive candles close on the wrong side of the EMA.
### Main features
* Multi-timeframe EMA and MACD analysis
* Higher-timeframe MACD direction filter
* Immediate entry when HTF MACD flips and entry MACD is already aligned
* Keltner Channel-based stop loss
* USD risk-based position sizing
* Three configurable profit targets
* Automatic break-even management
* EMA-based early exit
* Setup, entry, exit, and management alerts
* Clean status dashboard displaying trend, risk, quantity, stop distance, break-even, and early-exit status
### Recommended use
The default configuration is optimized for lower-timeframe chart analysis, particularly the 1-minute timeframe. Users should test the strategy on their chosen symbol, broker feed, session, spread, commission, and execution conditions before using it for live trading.
**Disclaimer:** This strategy is provided for educational and analytical purposes only. Historical performance does not guarantee future results. Trading involves substantial risk, and users are responsible for their own trading decisions.
策略

SOL RSI DCA Strategy [3Commas & QuantPilot]SOL RSI DCA Strategy
🔷 What it does:
This is a long-only DCA (Dollar-Cost Averaging) strategy for SOL / USDT that opens a position only in oversold conditions and then averages down on a fixed safety-order ladder. A base order fires when 4h RSI(14) drops below the entry threshold; if price keeps falling, five averaging orders add to the position at fixed deviations from the base entry, each larger than the last. The full position is closed at a fixed take-profit above the blended average entry. There is no trailing exit and no stop loss — the position is structurally bounded by the five-order ladder.
- Single entry filter: 4h RSI(14) below 33 (oversold).
- Five averaging orders at fixed deviations (−2%, −5%, −9.5%, −16%, −25%) with 1.8× size scaling per rung.
- Fixed take-profit (4%) on the blended average entry; no trailing, no stop loss.
- Every fill and close emits a webhook-ready JSON alert payload for a DCA Bot.
🔷 What changed — two parameters, tuned with QuantPilot:
This strategy started from a baseline configuration (RSI entry below 28, 3% take-profit). Running the same script, on the same market, over the same period through the QuantPilot Pine Script optimizer, two parameters were swept and re-selected: the RSI entry threshold moved from 28 to 33, and the take-profit moved from 3% to 4%. Everything else was left untouched — same five-order ladder, same deviations, same 1.8× sizing, same fees.
- Baseline (RSI < 28, TP 3%): Net +5,178.77 USDT (+5.18%), Max Drawdown 5.53%, 77 closed trades, 67.53% profitable, Profit Factor 4.582.
- Optimized (RSI < 33, TP 4%): Net +10,399.80 USDT (+10.40%), Max Drawdown 5.32%, , , .
The result: net profit roughly 2× higher (+5.18% → +10.40%), while maximum drawdown actually eased slightly (5.53% → 5.32%). The looser RSI entry (33) lets the strategy engage the dip earlier and more often, while the wider 4% target lets each recovery run a little further before the position is banked. The published defaults use the optimized values; the baseline metrics are shown here purely so the effect of the two parameter changes is transparent.
🔷 Who is it for:
- Swing traders accumulating SOL on RSI pullbacks rather than chasing momentum.
- Bot operators who want a chart-driven signal source with base / safety-order / close webhook JSON ready to drive a DCA Bot.
- Traders comfortable with martingale-style averaging who size their capital to the worst-case ladder fill.
- Range / mean-reversion traders who prefer mechanical oversold entries over discretionary timing.
🔷 How does it work:
Entry (Base Order): On each closed 4h bar the strategy reads RSI(14). When RSI falls below 33 and there is no open position, it opens the base order at market (or limit, optionally) and dispatches the entry webhook.
Averaging Orders: Once in a position, the strategy watches price relative to the original base entry. The five safety orders are armed at fixed deviations from that base entry — not cumulatively — at −2%, −5%, −9.5%, −16%, and −25%. As each threshold is crossed on bar close, the corresponding averaging order fires. Order sizes scale 1.8× per rung ($900 → $1,620 → $2,916 → $5,249 → $9,448 from a $500 base), pulling the blended average entry down toward the latest fill.
Exit (Take Profit): While in a position, the strategy computes a take-profit price 4% above the current average entry. When price closes at or above that level, the entire position is closed at market and the close webhook fires. There is no trailing and no stop loss.
Capital Bounds: Total deployed capital cannot exceed the base order plus the five safety orders. Once all five averaging orders are filled, no further adds occur — the position simply waits for the take-profit. This ladder cap is the strategy's primary risk control.
🔷 Why it's unique:
- Optimizer-Tuned Parameters: The RSI threshold (33) and take-profit (4%) are not arbitrary — they are the values the QuantPilot Pine Script optimizer selected as best-performing on the historical sample, with every other parameter held constant.
- Fixed-Deviation Martingale Ladder: Safety orders are placed at fixed percentages from the base entry with deliberate 1.8× size scaling, so each rung has progressively more influence on the average — a transparent, fully-specified averaging schedule rather than an opaque adaptive grid.
- Full Webhook Chain: Base order, each safety order, and the close all emit dedicated JSON payloads, driving a DCA Bot end-to-end with no glue layer.
- On-Chart Transparency: The AO ladder, average entry, and take-profit target are plotted live, and the status table reports RSI, AOs filled, base/average entry, TP target, and max deployable capital.
🔷 Considerations Before Using the Strategy:
Optimization / Overfitting Risk: The RSI threshold and take-profit were selected by sweeping those parameters over the same historical window shown in the results. Values that were best in-sample are not guaranteed to be best out-of-sample — this is the standard caveat for any optimized parameter. Treat the optimized metrics as the ceiling of what this configuration achieved historically, not as a forward expectation, and re-validate on fresh data before committing capital.
Trade Volume — Below the Statistical Floor: The baseline produced 77 closed trades over ~30 months; the optimized configuration is in the same range. This is below the ~100-trade threshold often used as a floor for statistical relevance, so treat the win rate and profit factor as indicative rather than conclusive.
Martingale Tail Risk: Order sizes scale 1.8× per rung, so the deepest fills are by far the largest. If SOL trends hard below the −25% AO5 level without recovering to take-profit, the position sits fully loaded with no further adds and no stop — unrealized loss can grow until price reverts.
No Stop Loss Justification: There is no exit on adverse moves. Per-order risk is bounded by the fixed ladder allocation; aggregate exposure is capped at base + five AOs (≈ $20,633 on the default $100k account, ~20.6% of equity). Size the base/AO inputs down to match the worst-case exposure you are willing to hold.
Fees: The default commission (0.06% per trade) should be matched to your exchange's actual taker fees.
Demo Testing: Always demo-test before going live. Past results do not guarantee future performance, particularly for martingale-style averaging strategies whose risk profile is dominated by rare deep drawdowns.
🔷 STRATEGY PROPERTIES
Symbol: BYBIT:SOLUSDT.P (Perpetual) — strategy is portable to any SOL / USDT pair.
Timeframe: 4H (RSI sampled on 4h).
Test Period: January 1, 2024 — July 2026 (~30 months).
Initial Capital: 100,000 USDT.
Base Order Size: 500 USDT.
Averaging Orders: 5, at −2% / −5% / −9.5% / −16% / −25% from base entry.
AO Sizing: 1.8× per rung — 900 / 1,620 / 2,916 / 5,249 / 9,448 USDT.
Max Deployed Capital: ≈ 20,633 USDT (~20.6% of equity, all AOs filled).
Commission: 0.06% per trade.
Slippage: 3 ticks.
Entry Filter: 4h RSI(14) below 33 (optimizer-tuned from 28).
Take Profit: 4% above average entry (optimizer-tuned from 3%).
Stop Loss: None — ladder allocation is the structural risk cap.
Trailing: None.
Strategy: Long Only.
🔷 STRATEGY RESULTS (Optimized — RSI < 33, TP 4%)
⚠️ Remember, past results do not guarantee future performance.
Net Profit: +10,399.80 USDT (+10.40%)
Max Equity Drawdown: 5,751.73 USDT (5.32%)
Total Closed Trades:
Percent Profitable:
Profit Factor:
🔷 STRATEGY RESULTS (Baseline — RSI < 28, TP 3%, for comparison)
Net Profit: +5,178.77 USDT (+5.18%)
Max Equity Drawdown: 5,748.16 USDT (5.53%)
Total Closed Trades: 77
Percent Profitable: 67.53% (52 / 77)
Profit Factor: 4.582
🔷 How to Use It:
🔸 Adjust Settings: Open the strategy inputs and confirm the RSI level (default 33), the five AO deviations and sizes, and the Take Profit (default 4%) match your risk profile. Scale the base/AO sizes down for lower exposure.
🔸 Results Review: Run a full-period backtest and confirm Max Drawdown stays within your personal risk band — note the optimized configuration reached 5.32%. Keep in mind the trade sample is below the ~100-trade floor for statistical confidence, and the profit factor reflects that small, optimized sample.
🔸 Create alerts to trigger the DCA Bot: Add one alert on the strategy using "Any alert() function call". Paste your DCA Bot's webhook URL into the alert's Webhook field, and fill the Bot ID, Email Token, and Pair inputs on the script. The base order, each safety order, and the close will each emit a dedicated JSON payload.
🔷 INDICATOR SETTINGS
Base Order Size: Capital committed on the first (base) entry.
AO Deviations: Fixed percentage distances from the base entry where each safety order fires.
AO Sizes: Capital per safety order (1.8× scaling by default).
RSI Timeframe / Length / Level: Oversold filter for the base entry (default 4h, 14, below 33 — optimizer-tuned).
Take Profit (%): Distance above average entry where the full position closes (default 4%, optimizer-tuned).
Bot ID / Email Token / Pair: Webhook fields injected into every alert payload.
Visualization: Toggle the AO ladder, fill labels, avg/TP lines, and status table.
Brand Watermark: Configurable text, position, size, and transparency.
👨🏻💻💭 We hope this tool helps enhance your trading. Your feedback is invaluable, so feel free to share any suggestions for improvements or new features you'd like to see implemented.
__
The information and publications within the 3Commas TradingView account are not meant to be and do not constitute financial, investment, trading, or other types of advice or recommendations supplied or endorsed by 3Commas and any of the parties acting on behalf of 3Commas, including its employees, contractors, ambassadors, etc. 策略

策略

策略

Improved Options Confluence RSI Filter Backtest StrategyBest Settings
EMA -9
Chandlier Exit -10
Multiplier -3
Bos look back 1
For call entries RSI must be above -47
For put entries RSI must be below - 35
RSI Mid zone low 35
RSI Mid Zone High 47
Options Confluence + RSI Filter — Backtest Strategy
A multi-factor confluence strategy designed for intraday options trading (CALL/PUT), combining trend, momentum, and volatility-exhaustion filters to reduce false signals during sideways/choppy price action.
Core Logic
The strategy only enters a trade when all of the following align:
EMA (13) — price must be trading above/below the EMA in the direction of the trade
VWAP — price must also be above/below VWAP, confirming intraday value-area bias
Chandelier Exit — an ATR-based trend/volatility filter must confirm the same directional bias
Break of Structure (BOS) — price must break the recent swing high/low over a configurable lookback, confirming momentum
RSI Filter (added to reduce sideways whipsaws)
Three additional RSI-based conditions are layered on top of the core confluence:
Mid-zone block — entries are disabled entirely when RSI sits between 45-55, since this range is typically a sign of indecisive, range-bound price action with no real momentum.
Directional confirmation — CALL entries require RSI above 55; PUT entries require RSI below 45, ensuring momentum genuinely supports the trade direction.
Overbought/Oversold block — CALL entries are disabled when RSI is above 70 (overbought), and PUT entries are disabled when RSI is below 30 (oversold), avoiding entries into an already-extended move that's prone to mean-reversion.
Effectively, this narrows valid entries to two RSI bands: CALLs only between RSI 55-70, and PUTs only between RSI 30-45.
Exit Logic
Positions are closed when price crosses back below/above the EMA, or when the Chandelier Exit flips direction — whichever comes first.
Visual Aids
EMA and VWAP plotted on the price chart
Background highlighting for RSI mid-zone (sideways), overbought, and oversold conditions, so you can visually see why a trade was or wasn't taken
CALL/PUT/EXIT labels marked directly on the chart
Inputs (fully adjustable)
EMA length, Chandelier ATR period & multiplier, BOS lookback, RSI length, RSI bull/bear confirmation levels, RSI mid-zone bounds, RSI overbought/oversold levels — every filter can be toggled or tuned to fit different instruments and timeframes.
Intended Use
Built and tested on 5-minute index charts (e.g. Bank Nifty) for options directional trading. Best used as a decision-support tool alongside price action and option-chain context, not as a fully automated signal generator. As with any strategy, backtest thoroughly on your instrument and timeframe before live use, and note that past performance does not guarantee future results. 策略

策略

DNSE VN301!, Donchian Break Out Strategy"Donchian Channel Breakout with SMA Trend Filter" is a trend-following breakout strategy designed to capture sustained price movements while filtering out low-probability signals. The Donchian Channel identifies breakouts by tracking the highest high and lowest low over a specified lookback period, generating potential entry signals when price closes outside the recent trading range. Because breakouts during sideways or low-volatility markets often fail, the strategy incorporates a Simple Moving Average (SMA) as a trend filter.
Long signals are prioritized when the SMA is rising, while Short signals are prioritized when the SMA is falling, ensuring trades align with the prevailing market trend. By combining breakout detection with trend confirmation, the strategy aims to reduce false breakouts and improve overall signal quality.
*By default: each VN Futures contract requires VND 30,000,000 of initial margin. The strategy assumes an initial capital of VND 100,000,000, resulting in a fixed position size of 3 contracts for each trading signal.
To better reflect real-market trading conditions, the backtest incorporates a commission of VND 10,000 per contract and a minimum slippage assumption of 3 ticks on every executed trade.
Settings & Strategy Configuration:
Chart: recommended 15-minute timeframe
Donchian Channel Period: 20
SMA Period: 200
Stop Loss: 10 points
Take Profit: 20 points
SMA Trend Filter: On / Off
Use Take Profit: On / Off
Time Filter: On / Off
Trading Session: 09:00 – 14:30
Trade Direction: Long / Short / Both
Default Script Settings:
The strategy calculates the upper and lower bands of the Donchian Channel using the selected lookback period. A breakout above the upper band may indicate buying pressure, while a breakout below the lower band may indicate selling pressure.
When the SMA(200) trend filter is enabled, the script only allows Long entries when SMA(200) is rising and only allows Short entries when SMA(200) is falling. When the SMA filter is disabled, the strategy can trade both directions based only on Donchian Channel breakout signals.
Entry & Exit Conditions:
Entry Long:
Close Price > Upper Donchian Channel
AND SMA(200) is rising, if the SMA filter is enabled
AND the signal appears within the selected trading session
AND Long trading is allowed by the trade direction setting
Exit Long:
Stop Loss: 10 points from entry price
Take Profit: 20 points from entry price, if enabled
Opposite Donchian breakout signal
Position reversal when a valid Short signal appears
Automatic close at the end of the trading session
Entry Short:
Close Price < Lower Donchian Channel
AND SMA(200) is falling, if the SMA filter is enabled
AND the signal appears within the selected trading session
AND Short trading is allowed by the trade direction setting
Exit Short:
Stop Loss: 10 points from entry price
Take Profit: 20 points from entry price, if enabled
Opposite Donchian breakout signal
Position reversal when a valid Long signal appears
Automatic close at the end of the trading session
Disclaimers:
Trading futures contracts carries a high degree of risk, and price movements can be highly volatile. This script is intended as a reference and research tool only. It should be used by individuals who understand futures trading, have assessed their own risk tolerance, and are knowledgeable about the strategy’s logic.
All investment decisions are the sole responsibility of the user. DNSE bears no liability for any potential losses incurred from applying this strategy in real trading. Past performance does not guarantee future results.
______________________________________________________________________
"Chiến lược Breakout Donchian Channel kết hợp bộ lọc xu hướng SMA" là một chiến lược giao dịch theo xu hướng, được thiết kế nhằm tận dụng các đợt bứt phá giá mạnh đồng thời giảm thiểu các tín hiệu nhiễu. Donchian Channel xác định các điểm breakout bằng cách theo dõi mức giá cao nhất và thấp nhất trong một khoảng thời gian xác định, từ đó tạo tín hiệu khi giá đóng cửa vượt ra khỏi vùng dao động gần nhất. Do các tín hiệu breakout trong giai đoạn thị trường đi ngang hoặc biến động thấp thường có xác suất thất bại cao, chiến lược sử dụng thêm đường trung bình động đơn giản (SMA) làm bộ lọc xu hướng.
Khi đường SMA đang dốc lên, chiến lược ưu tiên các tín hiệu Long; ngược lại, khi SMA dốc xuống, chiến lược ưu tiên các tín hiệu Short, giúp các lệnh giao dịch đi cùng xu hướng chính của thị trường. Bằng cách kết hợp tín hiệu breakout với xác nhận xu hướng, chiến lược hướng tới việc giảm các tín hiệu phá vỡ giả và nâng cao chất lượng giao dịch.
*Theo mặc định, mỗi hợp đồng VN Futures yêu cầu ký quỹ ban đầu là 30.000.000 VNĐ. Chiến lược giả định vốn ban đầu là 100.000.000 VNĐ, tương ứng với quy mô vị thế cố định là 3 hợp đồng cho mỗi tín hiệu giao dịch được tạo ra.
Để phản ánh sát hơn điều kiện giao dịch thực tế, kết quả kiểm định (backtest) được giả định với phí giao dịch là 10.000 VNĐ cho mỗi hợp đồng và độ trượt giá (slippage) tối thiểu là 3 bước giá (ticks) đối với mỗi lệnh được khớp.
Cài đặt & cấu hình chiến lược:
Biểu đồ: khuyến nghị khung 15 phút
Chu kỳ Donchian Channel: 20
Chu kỳ SMA: 200
Cắt lỗ: 10 điểm
Chốt lời: 20 điểm
Bộ lọc xu hướng SMA: Bật / Tắt
Dùng chốt lời: Bật / Tắt
Bộ lọc giờ: Bật / Tắt
Khung giờ giao dịch: 09:00 – 14:30
Chiều giao dịch: Mua / Bán / Cả hai
Cài đặt mặc định của script:
Chiến lược tính toán biên trên và biên dưới của Donchian Channel dựa trên chu kỳ được chọn. Khi giá phá lên biên trên, lực mua có thể đang chiếm ưu thế. Khi giá phá xuống biên dưới, lực bán có thể đang chiếm ưu thế.
Khi bật bộ lọc xu hướng SMA(200), script chỉ cho phép lệnh Mua khi SMA(200) dốc lên và chỉ cho phép lệnh Bán khi SMA(200) dốc xuống. Khi tắt bộ lọc SMA, chiến lược có thể giao dịch cả hai chiều chỉ dựa trên tín hiệu breakout của Donchian Channel.
Điều kiện vào và thoát lệnh:
Vào lệnh Mua:
Giá đóng cửa > Biên trên Donchian Channel
VÀ SMA(200) dốc lên, nếu bật bộ lọc SMA
VÀ tín hiệu xuất hiện trong khung giờ giao dịch
VÀ chiều giao dịch cho phép lệnh Mua
Thoát lệnh Mua:
Cắt lỗ: 10 điểm từ giá vào lệnh
Chốt lời: 20 điểm từ giá vào lệnh, nếu bật
Có tín hiệu breakout ngược chiều
Đảo chiều khi xuất hiện tín hiệu Bán hợp lệ
Tự động đóng lệnh khi hết khung giờ giao dịch
Vào lệnh Bán:
Giá đóng cửa < Biên dưới Donchian Channel
VÀ SMA(200) dốc xuống, nếu bật bộ lọc SMA
VÀ tín hiệu xuất hiện trong khung giờ giao dịch
VÀ chiều giao dịch cho phép lệnh Bán
Thoát lệnh Bán:
Cắt lỗ: 10 điểm từ giá vào lệnh
Chốt lời: 20 điểm từ giá vào lệnh, nếu bật
Có tín hiệu breakout ngược chiều
Đảo chiều khi xuất hiện tín hiệu Mua hợp lệ
Tự động đóng lệnh khi hết khung giờ giao dịch
Tuyên bố rủi ro:
Giao dịch hợp đồng tương lai có mức độ rủi ro cao và giá có thể biến động mạnh. Script này chỉ phục vụ mục đích tham khảo, nghiên cứu và kiểm thử. Người dùng cần hiểu rõ giao dịch phái sinh, khẩu vị rủi ro cá nhân và logic của chiến lược trước khi áp dụng vào giao dịch thực tế.
Mọi quyết định đầu tư thuộc trách nhiệm của người dùng. DNSE không chịu trách nhiệm cho bất kỳ khoản lỗ nào phát sinh từ việc sử dụng chiến lược này trong giao dịch thực tế. Hiệu quả trong quá khứ không đảm bảo kết quả trong tương lai.
策略

策略

策略

Webhook Alert Strategy TemplateEducational strategy shell that builds webhook-ready alert messages from strategy order fills.
Why this exists
Most traders can write an entry condition. The hard part is packaging a clean, risk-defined exit and a stable alert string that an external webhook receiver can parse. This template is a starting shell for that workflow.
What it does
- Demo entry: MA crossover (EMA/SMA/WMA/RMA selectable). Replace this with your own logic.
- Risk exits: ATR-based stop distance (or fixed pip distance), take-profit from risk:reward.
- Alert messages: attaches comma-separated command strings to strategy entries and exits using alert_message.
Message format examples
BUY,XAUUSD,VOL=0.01,SL=120.5,TP=241,TPSLTYPE=PIPS
SELL,XAUUSD,VOL=0.01,SL=120.5,TP=241,TPSLTYPE=PIPS
CLOSE,XAUUSD
How to use
1. Add the strategy to a standard chart (gold/forex/indices work well).
2. Set VOL, ATR stop, and RR in inputs.
3. Create one alert on this strategy.
4. Choose order fills and alert() function calls.
5. Set the alert message field to exactly: {{strategy.order.alert_message}}
6. Enable webhook URL notifications and paste your own webhook endpoint.
What this is not
This is not a signal service and not financial advice. Default MA entry is only a placeholder so the shell compiles and can be tested. Backtest results with the demo entry are not a performance claim.
Originality
The useful part is the combination of risk-defined strategy exits plus explicit webhook command string generation on fills, so users can learn alert_message plumbing without rebuilding exits from scratch.
Defaults used for this publication
- Symbol: XAUUSD (OANDA)
- Timeframe: 1D
- Initial capital: 10000
- Position size: 2% of equity
- Commission: 0.02%
- Slippage: 2 ticks
策略
