How to automate Wunder DCA TradingView Strategy on WunderTrading
Go to the Signal Bot tab and press Create Bot.
Fill in all fields in General section and choose TradingView Strategy as a Bot start condition.
Decide whether you want to insert Max Capital limit and press Create Bot. You will see the following window with Webhook URL and placeholders:
Leave the window opened and go to the TradingView's Supercharts. Click Indicators and select your strategy.
Once the strategy is applied to the chart, choose a Trading pair and the Timeframe.
Adjust your strategy Inputs and Properties, then press Ok.
Open Alert and select your strategy in the Condition field.
Open the Message tab, enter an Alert name, then copy the TradingView Strategy JSON from the Signal Bot window and paste it into the TradingView alert Message field.
Go to the Notifications tab and insert Webhook URL from the Signal bot:
https://wtalerts.com/bot/trading_view_strategy
Click Create to finish the process.
Your bot is now fully connected to TradingView and ready to execute trades automatically based on your strategy signals. Whenever the strategy triggers an alert, TradingView will send the webhook with the configured placeholders, allowing the bot to receive accurate, real-time order data.Before running the bot in live conditions, we strongly recommend testing the setup on a demo account or with minimal capital to ensure everything works as expected. Double-check your strategy settings, alert configuration, and placeholder values to avoid execution errors.
Once verified, your automated workflow will run continuously, requiring no manual intervention.
You can always check and research your signals in the TV Logs and the Signal Bot logs:
1. Strategy Overview
The Wunder DCA Bot is an advanced TradingView strategy that combines a primary entry signal with a Dollar‑Cost Averaging (DCA) order grid. It allows you to scale into a position at progressively better (or worse) prices, while managing risk with stop‑loss, take‑profit, trailing stop, and move‑to‑breakeven. A sophisticated trend filter can be applied to ensure entries align with the broader market direction. The strategy also offers multiple exit methods based on various indicators.
Key features:
Entry Conditions: Choose from Breakout, MACD, Bollinger Bands, VWRSI, Price Change, or ASAP (immediate entry).
DCA Grid: Define up to 30 additional orders with configurable price deviation, volume multiplier, and deviation multiplier.
Trend Filter: Optional filter using SuperTrend, SMA, EMA, TEMA, ATR, or standard deviation of returns with percentile analysis.
Exit Management: Exit via TP only, indicator only, or first‑come. Indicator exits include RSI, SMA, CRSI, MACD, and SuperTrend with various sub‑methods.
Risk Management: Fixed TP/SL percentages or Risk/Reward derived SL. Trailing stop and move‑to‑breakeven can be enabled.
Stop‑Loss Safety Check: Ensures the stop‑loss is placed outside the DCA grid to avoid premature liquidation.
2. Quick Start
Add the script to your TradingView chart.
Set the backtest period (optional).
Configure Risk & Money Management – define your capital.
Choose your entry condition under Core Settings → Entry condition type.
Adjust the DCA parameters – number of orders, price deviation, volume multiplier, etc.
Enable/disable the trend filter and select the desired method with its parameters.
Set TP and SL – either fixed percentages or use Risk/Reward.
Configure trailing stop and move‑to‑breakeven if desired.
Select the exit method and the corresponding indicator.
Run a backtest and optimise parameters.
3. Input Parameters Reference
All inputs are grouped in the script’s settings panel. Below is a detailed breakdown.
3.1 Backtest Date Range
Input | Type | Limits | Default | Description |
Start |
| true/false | false | Enable start date restriction. |
Start Period |
| any valid timestamp |
| Beginning of backtest period. |
Finish |
| true/false | false | Enable end date restriction. |
End Period |
| any valid timestamp |
| End of backtest period. |
Note: Both toggles must be enabled to activate the date filter.
3.2 Risk and Money Management
Input | Type | Limits | Default | Description |
Capital $ |
| min=1, max=1,000,000 | 1000 | The amount of capital used for position sizing. |
Note: This version does not include a risk‑per‑trade percentage; position size is simply capital divided by entry price. The Volume in contract and Risk Per Trade % inputs from earlier versions are present but not used in the logic (they are remnants).
3.3 Strategy Settings
3.3.1 Take Profit & Stop Loss
Input | Type | Limits | Default | Description / Activation |
Use TP |
| true/false | true | Enable take‑profit. |
Use SL |
| true/false | true | Enable stop‑loss. |
Take Profit (%) |
| min=0.1 | 3.5 | Fixed percentage TP (used when RR is disabled or when TP only is used). |
Stop Loss (%) |
| min=0.1, max=100 | 3.5 | Fixed percentage SL (used when SL is enabled). |
3.3.2 Risk / Reward
Visible only when both TP and SL are enabled.
Input | Type | Limits / Options | Default | Description / Activation |
Condition RR |
| true/false | true | Master switch for Risk/Reward. When disabled, TP is set using fixed |
Simple fraction / Decimal |
| Simple fr, Decimal | Simple fraction | Choose RR representation. |
Risk (simple fraction) |
| min=1, max=100 | 4 | Numerator of RR fraction. (Active only when |
Reward (simple fraction) |
| min=1, max=100 | 5 | Denominator of RR fraction. (Active only when |
Decimal RR |
| min=0.01, max=99.99 | 0.50 | Decimal RR value (e.g., 0.5 means risk:reward = 1:2). (Active only when |
Note: RR is calculated as Risk / Reward. If RR = 0.5, TP is placed at a distance twice the SL distance.*
3.3.3 Trailing Stop
Input | Type | Limits | Default | Description |
Use TS |
| true/false | true | Enable trailing stop. |
Trailing Stop Activation (%) |
| min=0.01, step=0.1 | 0.4 | Price movement (in percent from entry) that triggers the trailing stop. |
Trailing Stop Execution (%) |
| min=0.01, step=0.1 | 0.6 | The distance (in percent) behind the highest price (long) or lowest price (short) where the stop is placed after activation. |
3.3.4 Move Stop Loss to Breakeven
Input | Type | Limits | Default | Description |
Use MSL |
| true/false | true | Enable move to breakeven. |
MSL activation (%) |
| min=0.01, step=0.1 | 0.5 | Price movement (in percent from entry) that triggers moving the stop‑loss to breakeven. |
3.4 DCA Settings
These parameters define the DCA order grid.
Input | Type | Limits | Default | Description |
Max DCA orders |
| min=1, max=30 | 5 | Total number of orders including the base order. Example: 5 means 1 base + 4 DCA orders. |
Price deviation |
| min=0.1, max=20.0 | 1.00 | Initial price deviation (in percent) for the first DCA order. |
Order size multiplier |
| min=1.0, max=10.0 | 2.01 | Multiplier for the volume of each subsequent DCA order. |
Price dev. multiplier |
| min=1.0, max=10.0 | 1.0 | Multiplier applied to the price deviation for each subsequent order. |
DCA Take-profit anchor point |
| average_price, entry_order | average_price | Determines the reference price for TP calculation: |
DCA Stop-loss anchor point |
| entry_order, average_price | entry_order | Determines the reference price for SL calculation. |
3.5 Core Settings
3.5.1 Trade Direction
Input | Type | Options | Default | Description |
Trade direction |
| LONG, SHORT, BOTH, NONE | BOTH | Restricts the direction in which the strategy can open trades. |
3.5.2 Entry Condition Type
Input | Type | Options | Default | Description |
Entry condition type |
| Breakout, MACD, Bollinger, Price Change, VWRSI, ASAP | Breakout | Selects the primary indicator that generates the initial entry signal. |
3.6 Entry Condition Indicators
3.6.1 Breakout
Input | Type | Limits | Default | Description |
Timeframe |
| any valid TF | 'D' | Higher timeframe used to calculate daily high/low. |
Logic: Long when close[1] <= dailyLow and close > dailyLow; Short when close[1] >= dailyHigh and close < dailyHigh.
3.6.2 MACD
Input | Type | Limits | Default | Description |
Fast Length |
| min=1 | 3 | Fast EMA period. |
Slow Length |
| min=1 | 21 | Slow EMA period. |
Signal Smoothing |
| min=1, max=50 | 9 | Signal line EMA period. |
Logic: Long on crossover of MACD above signal and signal < 0; Short on crossunder of MACD below signal and signal > 0.
3.6.3 Bollinger Bands
Input | Type | Limits | Default | Description |
BBPeriod |
| min=1 | 210 | Period for SMA basis. |
StdDev |
| min=0.001, max=50 | 2.5 | Number of standard deviations for bands. |
Logic: Long when close[1] < lowerBand and close > lowerBand; Short when close[1] > upperBand and close < upperBand.
3.6.4 VWRSI
Input | Type | Limits | Default | Description |
Length |
| min=1 | 14 | RSI period. |
VWRSI lower limit |
| (no explicit limits) | 20 | Oversold level for long entry. |
VWRSI upper limit |
| (no explicit limits) | 80 | Overbought level for short entry. |
Logic: Long on crossover of VWRSI above lower limit; Short on crossunder below upper limit.
3.6.5 Price Change
Input | Type | Limits | Default | Description |
Price Change Period |
| min=1 | 14 | Number of bars to look back for price change. |
Price Cap, % |
| min=2.0, max=5.0 | 5.0 | Required price change percentage (negative for long, positive for short). |
Logic: Long when price decreased more than Price Cap over Period; Short when price increased more than Price Cap.
3.6.6 ASAP
Input | Type | Limits | Default | Description |
(none) | - | - | - | Immediately enters a trade on the first bar when no position is open, respecting trade direction. |
3.6.7 RSI Filter for Price Change
This filter can be applied to the Price Change condition.
Input | Type | Limits | Default | Description |
Use RSI filter |
| true/false | false | Enable RSI filter for Price Change. |
RSI period |
| (no explicit limits) | 14 | RSI period. |
RSI lower limit |
| (no explicit limits) | 20 | RSI must be below this for long entry. |
RSI upper limit |
| (no explicit limits) | 80 | RSI must be above this for short entry. |
3.7 Trend Filter Settings
The trend filter acts as an additional layer that must be satisfied for entries. It can be disabled (none) or set to one of six indicator types.
Input | Type | Options | Default | Description |
Filter indicator type |
| none, Super Trend, SMA, EMA, TEMA, ATR, STD+Percentile | none | Selects the trend filter. When enabled, its sub‑parameters appear. |
3.7.1 Super Trend Filter
Visible when Filter indicator type = Super Trend.
Input | Type | Options | Default | Description |
Super Trend filter type |
| Trend Direction, Trend Confirmation, Price Distance | Trend Direction | Determines how SuperTrend is used. |
ATR Length (global) |
| min=1 | 10 | ATR period for SuperTrend calculation. |
Factor (global) |
| min=0.01 | 3.0 | Multiplier for SuperTrend. |
SuperTrend confirmation bars (only for Trend Confirmation) |
| min=1 | 10 | Number of consecutive bars the trend must hold to confirm. |
SuperTrend Price-ATR Threshold (only for Price Distance) |
| min=0.001 | 0.5 | Minimum ratio of price‑to‑SuperTrend distance divided by ATR. |
SuperTrend Price-ATR ATRperiod (only for Price Distance) |
| min=1 | 14 | ATR period used in the distance calculation. |
Logic:
Trend Direction: Long when SuperTrend direction < 0 (uptrend), Short when > 0 (downtrend).
Trend Confirmation: Count consecutive bars with same direction; condition true when count ≥ threshold.
Price Distance: Requires price sufficiently far from SuperTrend (adjusted by ATR) in the trend direction.
3.7.2 SMA Filter
Visible when Filter indicator type = SMA. Requires Fast and Slow SMA settings (see below under Trend filter indicator parameters). The filter type can be:
Input | Type | Options | Default | Description |
SMA filter type |
| Price‑SMA position, Price‑SMA with slope, SMA Comparison | Price‑SMA position |
|
Logic (using Fast SMA out_fast and Slow SMA out_slow):
Price‑SMA position: Long when
close > out_fast, Short whenclose < out_fast.Price‑SMA with slope: Long when
close > out_fastandout_fast > out_fast[1], Short whenclose < out_fastandout_fast < out_fast[1].SMA Comparison: Long when
out_fast > out_slow, Short whenout_fast < out_slow.
3.7.3 EMA Filter
Similar to SMA but using EMA. Visible when Filter indicator type = EMA.
Input | Type | Options | Default | Description |
EMA filter type |
| Price‑EMA position, Price‑EMA with slope, EMA Comparison | Price‑EMA position |
|
Logic analogous to SMA, using Fast EMA out_fast_ema and Slow EMA out_slow_ema.
3.7.4 TEMA Filter
Visible when Filter indicator type = TEMA. Uses Triple EMA.
Input | Type | Options | Default | Description |
TEMA filter type |
| Price‑TEMA position, Price‑TEMA with slope, TEMA Comparison | Price‑TEMA position |
|
Logic analogous to SMA, using Fast TEMA out_f_tema and Slow TEMA out_s_tema.
3.7.5 ATR Filter
Visible when Filter indicator type = ATR.
Input | Type | Options | Default | Description |
ATR filter type |
| Volatility Level, Historical Comparison, Adaptive Threshold | Volatility Level |
|
Volatility threshold (for Volatility Level) |
| min=0.000001 | 0.05 | ATR must exceed this value. |
Market condition (for Historical Comparison) |
| Active market, Calm market | Active market | Compares current ATR with its historical average (SMA of last 100 bars). Active: current > average; Calm: current < average. |
Adaptive Threshold Range (%) (for Adaptive Threshold) |
| min=5.0, max=80.0 | 15.00 | Defines a band around the historical average: |
Note: The same condition applies to both long and short.
3.7.6 STD+Percentile Filter
This filter uses the rolling standard deviation of log returns and its percentile (default 75th) to gauge volatility. It has multiple sophisticated methods. Visible when Filter indicator type = STD+Percentile.
Input | Type | Limits / Options | Default | Description |
STD+Percentile filter type |
| Low Volatility, High Volatility, Historical Comparison, Adaptive Threshold, Smart Adaptive Threshold | Low Volatility |
|
Show Indicator "STD+Percentile" |
| true/false | false | Plots the indicator in a separate pane. |
Market condition (for Historical Comparison, Adaptive Threshold, SAT) |
| Active market, Calm market | Active market | Defines regime. |
Standard Deviation Window |
| (no explicit limits) | 280 | Lookback for stdev calculation. |
Percentile Window |
| (no explicit limits) | 280 | Lookback for percentile calculation. |
Percentile |
| (no explicit limits) | 75 | Percentile level (e.g., 75th). |
Low / High Volatility
Low Volatility: Requires
std_dev < percentile_75andstd_dev < std_dev[1](decreasing).High Volatility: Requires
std_dev > percentile_75andstd_dev > std_dev[1](increasing).
Historical Comparison (STD)
Active market:
std_dev > percentile_75Calm market:
std_dev < percentile_75
Adaptive Threshold (AT)
Normalizes volatility relative to the percentile anchor: q = std_dev / percentile_75.
Band parameters (active and calm bands) are specified as fractions of the anchor.
AT: Active band min (rA_min) –
float, min=0.05, step=0.01, default 0.90. Lower bound for active mode in q‑space.AT: Active band max (rA_max) –
float, min=0.05, step=0.01, default 1.20. Upper bound for active mode.AT: Calm band min (rC_min) –
float, min=0.05, step=0.01, default 0.60.AT: Calm band max (rC_max) –
float, min=0.05, step=0.01, default 0.90.
Condition: In active mode, q ∈ [rA_min, rA_max]; in calm mode, q ∈ [rC_min, rC_max]. Same for long/short.
Smart Adaptive Threshold (SAT)
SAT builds a dynamic corridor around a rolling mean of std_dev, using a robust width estimator.
Input | Type | Limits | Default | Description |
SAT: Baseline SMA length (Lμ) |
| min=2 | 50 | Period for SMA of std_dev (the baseline μ). |
SAT: Width SMA length (Lw) |
| min=2 | 50 | Period for SMA of absolute deviation from baseline (width w). |
SAT: Corridor width multiplier (k) |
| min=0.1, step=0.1 | 1.5 | Multiplier to set corridor width: |
SAT: Active zone floor (u_min, 0..1) |
| min=0.0, max=1.0, step=0.01 | 0.65 | Normalized position inside corridor for active mode (lower bound). |
SAT: Active zone ceiling (u_max, 0..1) |
| min=0.0, max=1.0, step=0.01 | 0.95 | Normalized position upper bound for active mode. |
SAT: Calm zone floor (u_min, 0..1) |
| min=0.0, max=1.0, step=0.01 | 0.10 | Normalized position lower bound for calm mode. |
SAT: Calm zone ceiling (u_max, 0..1) |
| min=0.0, max=1.0, step=0.01 | 0.40 | Normalized position upper bound for calm mode. |
SAT: Enable hysteresis |
| true/false | false | If enabled, uses separate enter/exit zones to reduce flickering. |
SAT: Hysteresis margin (h, 0..1) |
| min=0.0, max=0.50, step=0.01 | 0.03 | Margin to expand zone for hold/exit. |
SAT: Show hysteresis bands |
| true/false | false | Plots the expanded hold/exit zones. |
SAT logic:
Compute
μ = SMA(std_dev, Lμ),w = SMA(|std_dev - μ|, Lw).Corridor:
low = max(0, μ - k·w),high = μ + k·w.Normalized position:
u = (std_dev - low) / (high - low), clamped to [0,1].In active mode, SAT passes if
std_devinside corridor anduin[active_floor, active_ceiling]. In calm mode, uses calm bounds.If hysteresis enabled, the enter check uses the original bounds, while hold uses expanded bounds
[u_min - h, u_max + h](clamped) with state memory.
3.8 Exit Settings
3.8.1 Exit Method
Input | Type | Options | Default | Description |
Exit method |
| indicator only, TP only, indicator or TP (First) | indicator or TP (First) | Determines how positions are closed. |
indicator only: Exit only when the exit indicator triggers.
TP only: Exit only when take‑profit level is hit.
indicator or TP (First): Exit on whichever occurs first.
3.8.2 Exit Indicator Type
Visible when Exit method ≠ TP only.
Input | Type | Options | Default | Description |
Exit indicator type |
| RSI, SMA, CRSI, MACD, Super Trend | RSI | Selects the indicator for exit signals. |
3.8.3 Exit Parameters
Each indicator has its own parameters and sub‑methods.
RSI Exit
Input | Type | Options / Limits | Default | Description |
RSI exit type |
| Overbought/Oversold, Level Reversal, Signal Line Cross | Overbought/Oversold |
|
RSI period |
| min=1 | 14 | RSI period. |
RSI lower limit |
| (no explicit) | 20 | Oversold level (for short exit in some modes). |
RSI upper limit |
| (no explicit) | 80 | Overbought level (for long exit). |
Signal MA Length (for Signal Line Cross) |
| min=1 | 14 | MA length for the signal line. |
Signal MA Type (for Signal Line Cross) |
| RMA, SMA, EMA, WMA | RMA | Type of MA. |
Logic:
Overbought/Oversold: Long exit when RSI crosses above overbought; short exit when RSI crosses below oversold.
Level Reversal: Long exit when RSI crosses below overbought; short exit when RSI crosses above oversold.
Signal Line Cross: Exit when RSI crosses its signal MA (long exit on cross below, short on cross above).
SMA Exit
Uses Fast and Slow SMA (similar to SMA trend filter but with its own length inputs).
Input | Type | Options | Default | Description |
SMA exit type |
| Price‑SMA position, Price‑SMA with slope, SMA Comparison | Price‑SMA position |
|
Fast SMA Length |
| min=1 | 9 |
|
Fast SMA Source |
| - | close |
|
Fast SMA Offset |
| -500 to 500 | 0 |
|
Fast SMA Smoothing Type |
| None, SMA, EMA, RMA, WMA, VWMA | None | Additional smoothing on the SMA. |
Fast SMA Smoothing Length |
| min=1 (if smoothing not None) | 14 |
|
Slow SMA Length |
| min=1 | 24 |
|
Slow SMA Source |
| - | close |
|
Slow SMA Offset |
| -500 to 500 | 0 |
|
Slow SMA Smoothing Type |
| None, SMA, EMA, RMA, WMA, VWMA | None |
|
Slow SMA Smoothing Length |
| min=1 (if smoothing not None) | 14 |
|
Logic (using Fast SMA out_fast_e and Slow SMA out_slow_e):
Price‑SMA position: Exit long when price crosses below Fast SMA; exit short when price crosses above Fast SMA.
Price‑SMA with slope: Same as position but requires SMA slope direction.
SMA Comparison: Exit long when Fast SMA crosses below Slow SMA; exit short when Fast SMA crosses above Slow SMA.
CRSI Exit
Connors RSI (a composite of RSI, up/down streak RSI, and percent rank).
Input | Type | Limits / Options | Default | Description |
CRSI exit type |
| Overbought/Oversold, Level Reversal, Signal Line Cross | Overbought/Oversold |
|
RSI Length |
| min=1 | 3 | RSI component period. |
UpDown Length |
| min=1 | 2 | Period for RSI of up/down streak. |
ROC Length |
| min=1 | 100 | Period for percent rank of ROC. |
CRSI lower limit |
| (no explicit) | 10 | Oversold level (for short exit). |
CRSI upper limit |
| (no explicit) | 90 | Overbought level (for long exit). |
Signal MA Length (for Signal Line Cross) |
| min=1 | 14 |
|
Signal MA Type (for Signal Line Cross) |
| RMA, SMA, EMA, WMA | RMA |
|
Logic analogous to RSI, but with different default levels (10/90).
MACD Exit
Input | Type | Options | Default | Description |
MACD exit type |
| Line Cross, Zero Cross, Histogram, Decay, Slope, Divergence, MACD+SMA, Neutral | Line Cross |
|
Fast Length |
| min=1 | 3 |
|
Slow Length |
| min=1 | 21 |
|
Signal Smoothing |
| min=1, max=50 | 9 |
|
MACD combo SMA Period (for MACD+SMA) |
| min=1 | 50 | SMA period for combined condition. |
Logic:
Line Cross: Exit when MACD line crosses signal line (long on cross under, short on cross over).
Zero Cross: Exit when MACD line crosses zero.
Histogram: Exit when histogram changes sign.
Decay: Exit when MACD has been declining for 3 bars (simple).
Slope: Exit when MACD slope reverses (long on negative slope, short on positive slope).
Divergence: Simplified divergence detection.
MACD+SMA: Exit when line cross occurs and price is on the opposite side of a long‑term SMA.
Neutral: Exit when MACD is near zero (absolute value less than 0.1×stdev over 50 bars).
Super Trend Exit
Input | Type | Limits | Default | Description |
ATR Length |
| min=1 | 10 | ATR period. |
Factor |
| min=0.01 | 3.0 | Multiplier. |
Logic: Exit long when SuperTrend direction changes from down to up (i.e., direction increases); exit short when direction changes from up to down.
3.9 Miscellaneous
Input | Type | Limits | Default | Description |
Show Extra Order Line |
| true/false | false | If enabled, plots the DCA order levels on the chart. |
4. Best Practices
4.1 Capital & Risk Management
The strategy uses a simple position sizing:
capital / entry_price. AdjustCapital $to reflect your actual trading size.Stop‑loss percentage should be chosen carefully – the script includes a safety check that prevents SL from being placed inside the DCA grid. The minimum allowable SL is calculated based on the grid structure and displayed if violated.
4.2 DCA Parameter Tuning
Max DCA orders: More orders allow deeper averaging but increase exposure. Start with a moderate number (3‑5) and increase only if the market often retraces after entry.
Price deviation: The initial deviation determines how far the first DCA order is placed. A smaller value places orders closer, increasing frequency; a larger value creates wider spacing.
Order size multiplier: A multiplier >1 increases position size with each DCA order, accelerating risk. Values between 1 and 1.5 are common.
Price dev. multiplier: If >1, each subsequent order is placed further away (e.g., geometric progression). If =1, deviations are equally spaced.
4.3 Trend Filter Selection
The trend filter adds a directional bias. Choose one that aligns with your trading style. For trending markets, SuperTrend or SMA Comparison may work well. For mean‑reversion, volatility‑based filters (ATR, STD) can help avoid strong trends.
The STD+Percentile filter is the most sophisticated; start with simpler modes (Low/High Volatility) and gradually explore Adaptive Threshold and SAT.
4.4 Exit Management
Exit method: Using “indicator or TP” gives you both profit‑taking and indicator‑based exits, which can improve performance in varying conditions.
RSI/CRSI levels: Overbought/oversold levels should be tuned per asset. CRSI uses more extreme levels (10/90) because it’s a composite indicator.
MACD exit types: Experiment with different exit signals to see which captures reversals best for your timeframe.
4.5 Backtesting
Use a realistic date range covering different market phases.
Optimise cautiously: The large number of parameters makes overfitting easy. Test on out‑of‑sample data and across multiple symbols.
Commission: The default is 0.05% – adjust to match your broker.
Slippage is not modelled; consider this when evaluating results.
4.6 Stop‑Loss Minimum Distance
The strategy calculates the minimum SL distance needed to stay outside the DCA grid. If your chosen
Stop Loss (%)is too small, a warning table appears and no trades are taken. Always ensure your SL is sufficiently wide.
5. Important Notes & Limitations
Pyramiding is set to 99, allowing multiple DCA orders. However, the logic ensures only one position is managed at a time (no pyramiding of full positions).
The script uses
calc_on_order_fills = false, so new DCA orders are not added intra‑bar when a limit order fills. This is standard for backtesting but may differ from real‑time behaviour.Entry price for DCA orders is the limit price calculated by the DCA formula. In backtesting, these orders may fill on the next bar if price reaches the limit.
The stop‑loss safety check uses a simplified calculation that may not be perfect; always verify manually if the strategy warns you.
WunderTrading JSON functions are present but not documented here. They can be ignored if you are not using WunderTrading.
Visualisation of the STD+Percentile filter (SAT, AT) can be enabled to better understand the filter’s behaviour.
The Wunder DCA Bot is a highly sophisticated Dollar‑Cost Averaging strategy with extensive entry, filter, and exit options. Its ability to layer orders and adapt to volatility (via STD+Percentile methods) makes it a powerful tool, but it also demands thorough understanding and testing. Backtest results can look impressive but may not replicate in live trading due to slippage, order fills, and changing market dynamics. Therefore, it is crucial to begin with a demo account before deploying real funds. This will let you verify the DCA grid behaviour, stop‑loss placement, and exit logic in a risk‑free environment. Take time to adjust parameters to suit your instrument and timeframe, and always monitor performance. Remember that DCA strategies can increase exposure during adverse moves – ensure your risk tolerance aligns with the settings you choose.












