Grid Variable Index Dynamic Average EA
- Experts
-
AL MOOSAWI ABDULLAH JAFFER BAQER
To trade successfully we need to go through the proven path that others had gone and reached!
Here are 17 quotes from such successful investors:
1- Limit your size in any position so that fear does not become the prevailing instinct guiding your judgment.
Joe Vidich - 버전: 3.13
- 업데이트됨: 30 10월 2026
- 활성화: 5
AN AVERAGE THAT SPEEDS UP WHEN THE MARKET MEANS IT
Grid Variable Index Dynamic Average EA lets an adaptive trend line decide when a new grid cycle deserves to begin, then passes control to a careful ladder manager that collects modest net profits and pays down its earliest positions in measured portions.
Test drive it in the Strategy Tester before anything else: choose a symbol in MetaTrader 5, enable visual mode and run a period of your broker's history. The VIDYA line is drawn over the candles, a small arrow appears wherever a cycle was armed, and the VIDYA Pulse row on the panel reports value, slope and adaptivity bar after bar. No deposit at stake, only your own data and your own inputs.
- Signal source: the built-in Variable Index Dynamic Average (Tushar Chande's VIDYA), read on closed candles only, with a slope threshold that keeps the EA quiet in sideways markets.
- VIDYA Pulse row: line value, position of price relative to it, slope in points and an adaptivity percentage in one compact line.
- Grid engine: independent buy and sell ladders, volatility-aware spacing, group closures counted after swap and commission, partial reduction of the heaviest order.
- Standard default grid settings: the file ships with the same well-tested grid values used across this family, so you start from familiar ground.
- Per-chart magic isolation: two charts never share state; saved values and order loops are bound to account, symbol and magic numbers.
WHY AN ADAPTIVE AVERAGE SUITS A GRID
A plain moving average reacts at one fixed speed. In a calm range it still wanders and gives false hints; in a strong push it trails far behind. VIDYA solves this by tying its smoothing to the Chande Momentum Oscillator: when momentum is decisive, the line tightens and follows price closely; when momentum fades, it slows down and almost flattens. The result is a line that is patient during noise and responsive during genuine travel.
For a grid that matters a great deal. Starting a ladder in a directionless market tends to pile up levels that drift without reaching any target. By asking the adaptive line to show a meaningful slope before arming, the EA prefers moments when the market has real intent, and simply waits while the line lies flat. You stay in control of how strict that patience is through the slope inputs described below. Because only completed bars are evaluated, arrows never move or vanish afterwards.
THE VIDYA PULSE ROW
This is the improvement over the previous listing: a dedicated readout that turns the indicator into plain words. It shows the current VIDYA value, whether price closed ABOVE or BELOW it (capital letters mean the slope is strong enough to count, lower case means it is not), FLAT when the slope sits under your threshold, the slope in points, and an adaptivity percentage that tells you how efficient recent movement has been. A high adaptivity figure means the line is reacting quickly; a low one means the market is choppy and the line is calm. You can judge the mood of a chart in one second without opening a separate indicator window.
HOW TO GET STARTED
- Pick a chart: EURUSD H1 or XAUUSD H1 are comfortable first choices, though any symbol and timeframe is accepted.
- Leave the defaults alone at first: first lot 0.01, each extra level adds 0.01, and no single order can exceed 1.0 lot.
- Fund sensibly: the balance should be able to carry a prolonged move against an open ladder. Smaller accounts should stay at the minimum lot.
- Watch before trading: the file is delivered in armed mode; switch RunMode to scan only if you want to observe the plans first, then arm from the panel once you trust them.
- One magic pair per chart: give each chart its own grid and hedge magic numbers; the EA refuses to start on a magic another chart is already using.
- Leave the hedge cycle off until the ordinary grid behaviour feels natural to you.
LIFE OF A CYCLE
Waiting. While the line is flat or the spacing between signals has not yet passed, nothing opens. The Pulse row and signal gate show why.
Arming. When the adaptive line confirms a clear direction on a finished bar and your direction permissions agree, the first level is placed and the candle is marked with an arrow.
Building. If price moves away from the anchor, additional levels are added at a distance based on ATR, held between a floor and a ceiling, or at a fixed number of points if you prefer. Both sides can operate together, each with its own count.
Collecting. The closer combines old and recent orders of one side and settles the group as soon as their joint result, net of swap and commission, passes the target. When the oldest order is too large to settle in full, a portion of it is closed using profit that newer orders already hold. Over successive swings the largest exposure becomes smaller.
Guarding. A reopen guard blocks closures that would immediately recreate the same level. Every closure is checked against deal history, failed legs are retried, and a plan is dropped if positions changed between planning and sending.
Optional hedge cycle. Disabled by default. When switched on it holds an equal buy and sell pair on a chosen symbol and retires it in matched slices, financed by a small addition to grid closure targets. Its purpose is trading turnover; normal trading costs still apply.
THE PANEL
Placed on the left side so the price scale stays readable, the panel shows symbol, magic, a status badge, grid mode, lot step, current spacing, realised result, the signal gate and the VIDYA Pulse row. Plan cards describe the next closure of each side with a manual close button, and a table lists open orders. Buttons toggle armed or scan only, pause, chart marks and slicing. You can drag or collapse it, it scales to its content on any display, and it is skipped entirely in non-visual optimisation to keep passes quick.
EVERY INPUT EXPLAINED
Grid levels
- TradeMode - run buy and sell ladders simultaneously (default) or one side only.
- GridSpacePoints - distance between levels in points when fixed spacing is active (25).
- GridSpaceMultiplier - widens every following gap by this factor; 1.0 means uniform gaps.
- MaxGridLevels - ceiling on the number of levels per ladder (1000).
- UpDirectionIsBuy - when true a rising market feeds the buy ladder; false reverses the roles.
- EAMagicNumber - identifier of grid orders, 9753930 by default; choose another for each extra chart.
- GridOrderComment - text stored on every grid order.
- OneOrderPerBar - limits new levels to one per candle.
Lot sizing
- InitialLotSize - volume of the first level (0.01).
- LotSizingMode - additive step per level (default) or multiplicative growth.
- LotMultiplier - growth factor used only in multiplicative mode (1.25).
- LotAddStep - volume added per level in additive mode (0.01); 0 repeats the starting lot.
- MaxOrderVolume - biggest volume any single order may have (1.0).
- UseAutoLot - grows the starting volume in proportion to balance.
- AutoLotBaseBalance - balance that corresponds to the starting lot in auto mode (1000).
- AutoLotAllowDecrease - permits auto sizing below the starting lot after a drawdown.
Volatility spacing
- GridSpacingMode - ATR-driven distance (default) or fixed points.
- ATRTimeframe, ATRPeriod, ATRBarShift - chart period, length (14) and candle used for ATR; a shift of 1 means the last finished bar.
- ATRSpacingFactor - scales ATR into the actual gap (1.0).
- ATRMinSpacingPts, ATRMaxSpacingPts - lower (50) and upper (5000) bounds in points; 0 removes a bound.
- ATRFreezeOnStart - locks the first computed gap for the whole cycle.
Profit goal
- DesiredProfitPerClosure - base money amount every closure aims to keep (2.0).
- ProfitMultiplier - final scaling of that amount, between 1.00 and 2.00.
- ProfitTargetMode - constant goal or one that expands with the size of the book (scaled, default).
- ProfitVolumePower - how strongly volume enlarges a scaled goal (1 = proportional, 0 = ignored).
- ProfitDepthBonus - extra goal added for each additional open level (0.10).
- ProfitMaxMultiple - upper limit of a scaled goal as a multiple of the base (50).
- ProfitMaxReachFraction - safety cap so the goal stays reachable within part of one step (0.50).
Combination scanner
- UseMultiLegScan - evaluates groups of several orders before the simple oldest and newest pair.
- MaxOldestLegs, MaxNewestLegs - how many orders a group may draw from the early end (3) and the recent end (6).
- ScanPriority - which qualifying group wins when more than one is valid.
- NeverBankLessThanPair - a larger group must also beat what the basic pair would deliver.
- RequireCloseVolumeExceedsTarget, MinCloseVolumeRatio - closing orders need at least this volume ratio over the old order (1.5).
Partial closes
- EnableTargetSlicing - closes a portion of the oldest order when the full volume is not yet affordable.
- FragProfitWeightPower - weighting of profit per closing lot (1.5; 1 = proportional).
- FragMinSlicePercent - smallest portion allowed, as percent of the target order (20).
- FragAllowMultiCloser - lets several recent orders combine to pay for one portion.
- FragPreferFullClosure - favours a full closure whenever both options are available.
Reopen protection
- ReopenGuard - blocks closures likely to reopen a level at once.
- ReopenGuardCushion - required distance as a fraction of one step (0.90).
Account safety
- MinMarginLevelPercent - stops new levels below this margin level; 0 disables the check.
- MaxAccountRiskPercent - stops new levels when floating loss exceeds this share of balance; 0 disables it.
- NetMaxMarginPercent - on netting accounts, limits the combined position margin to this percent of equity (5).
- MaxTotalOrders - absolute ceiling of grid orders on each side (1000).
Order handling
- RunMode - armed trading or observation only.
- CloseSequence - which leg of a closure is transmitted first (oldest by default).
- MaxSlippagePoints - tolerated slippage (30).
- MaxSpreadPoints - trading pauses while spread is wider than this (7500).
- MinSecondsBetweenClosures - minimum interval between two closures on the same side (5).
- CloseAttemptsPerLeg, VerifyTimeoutSeconds - sending attempts per leg (3) and how long an unconfirmed leg is monitored (90 seconds).
- DeferWhenMarketClosed, MarketClosedRetrySeconds - outside trading hours the EA waits and retries at this interval (30) rather than halting.
- AutoResumeAfterSeconds - lifts a halt by itself after this delay (300); 0 waits for your click.
- AbortIfBookChanged - cancels a plan if any leg changed between scan and execution.
- UseFullCommission, CommissionPerLot - include round-turn commission, with a manual per-lot figure when history does not provide one.
- CloseOrderComment - text placed on closing deals.
Hedge cycle
- EnableHedgeCycle - activates the hedge engine; disabled as shipped.
- HedgeSymbols - comma-separated list of symbols for the pair (XAGUSD); listing one twice gives it more turns.
- HedgeSymbolRotation - rule for selecting the symbol of the next cycle.
- HedgeMaxSymbolsInTester - in the Strategy Tester only, restricts rotation to this many symbols (2).
- HedgeCycleLots, HedgeSliceLots - volume on each side of the pair and volume retired per slice (0.01 each).
- HedgeFragmentBonus, HedgeBonusIsPercent - margin added above the slice cost, as percent (default) or as fixed money.
- HedgeMaxSurcharge, HedgeMaxSurchargePercent - money and percentage limits on how much a closure target may be raised (50 percent).
- HedgeMagicNumber - identifier for hedge legs, 9753931 by default; it must differ from the grid magic.
- HedgeReopenOnFinish - starts a new pair when the previous one is complete.
- HedgeStartRequiresTrade - holds the first pair until the grid has traded.
- HedgeIntegritySeconds, HedgeAutoRepair, HedgeNakedAction - how often both legs are compared (5 seconds) and what happens when one is missing.
- HedgeMaxSpreadPoints, HedgeSlippagePoints, HedgeAttemptsPerLeg, HedgeVerifyTimeout - spread, slippage, retry and confirmation limits for hedge orders.
- HedgeCommissionPerLot, HedgeOrderComment - fallback commission and text for hedge deals.
Weekly cash day
- WeeklyCashDay - suspends new cycles and slices around your regular withdrawal moment.
- CashDayOfWeek, CashCutoffHour - weekday (0 = Sunday, default 1) and server hour (21) after which no slice is fired.
Panel and drawings
- ShowPanel - displays or hides the panel.
- PanelX, PanelY, PanelCorner - offsets from the chart edge and the preferred corner.
- PanelFontSize - base text size (9).
- ShowArabic - adds an Arabic translation under each English label.
- ShowChartMarks - draws levels and planned closures on the price chart.
- MaxTableRows - number of open orders listed per ladder (13).
Entry trigger
- EntryTriggerMode - what launches the first level; the VIDYA strategy by default.
- SignalBarShift - bar that is evaluated; 1 is the last closed candle, lower values are refused.
- SignalBarsDelay - minimum bars between two accepted signals (30).
- SignalValidBars - how many bars a signal remains usable (3).
- SignalAllowBuy, SignalAllowSell - permit or block each direction.
- SignalReverse - inverts buy and sell.
Variable Index Dynamic Average
- VIDYA_TF - timeframe on which the adaptive line is calculated (current chart by default).
- VIDYA_CMOPeriod - length of the momentum oscillator that controls how fast the line adapts (9).
- VIDYA_EMAPeriod - base smoothing length of the line (12).
- VIDYA_Price - price used for the calculation (close).
- VIDYA_SlopeBars - number of bars over which slope is measured (3, allowed 1 to 50).
- VIDYA_MinSlopePts - slope in points the line must reach before the market counts as directional (5); higher values mean fewer, steadier cycles.
- VIDYA_ShowOnChart - draws the line on live and visual charts.
- InpShowSignalArrows - marks each candle where a cycle was armed.
Diagnostics
- DebugMode - writes detailed reasoning to the Experts journal.
QUESTIONS TRADERS ASK
The EA has been idle for hours. Is that normal? Look at the Pulse row. FLAT means the line has not reached your slope threshold, so the EA is deliberately waiting. Lowering VIDYA_MinSlopePts or SignalBarsDelay produces more cycles; raising them produces fewer.
Which timeframe for VIDYA? The chart period is a sensible default. A higher VIDYA_TF gives a calmer, slower bias while the grid still works on the chart you attached it to.
Can I run several charts? Yes. Thanks to per-chart magic isolation each chart keeps its own memory, retry queue and order list; just assign a separate magic pair to each.
Anything else to install? Nothing. No DLLs and no external indicators are required, and both hedging and netting accounts are supported.
WHO IT SUITS
Traders who like grid recovery but want fewer cycles started in dead, sideways sessions, and who are prepared to size their account for floating drawdown. It is not intended for anyone looking for a fixed stop loss on every trade or for guaranteed monthly returns.
HONEST EXPECTATIONS
An adaptive trend filter helps choose better moments to start, but it cannot remove risk. A persistent move against an open ladder can create a large floating loss, and there is no global stop that closes everything automatically; protection works by refusing additional levels. Spread, swap, commission, instrument choice and lot size all affect results, and historical tests never guarantee future performance. Run your own tests, begin with small volume and increase it only after you understand how far your symbol typically travels.
If Grid Variable Index Dynamic Average EA proves useful to you in testing or on a live account, an honest review describing your genuine experience, good or bad, would be appreciated. It helps other traders decide and shapes future updates.
