Grid Gator Oscillator EA
- エキスパート
- バージョン: 3.12
- アクティベーション: 5
A GRID THAT WAKES UP ONLY WHEN THE ALLIGATOR STARTS TO FEED
Grid Gator Oscillator EA waits through the quiet, sideways hours and opens its first level only when Bill Williams' Gator shows the market leaving its sleep. After that, a careful ladder manager takes care of spacing, small net banking and gradual trimming of the oldest exposure.
Free proof, on your own data: load the EA in the MetaTrader 5 Strategy Tester, enable visual mode and press Start. You can watch the Gator histograms, the phase row on the panel, the entry arrows and every closure unfold on your broker's history before spending a cent.
- Entry: both Gator histograms turn green together after a sleeping phase; Alligator lips versus teeth picks the side.
- New panel row "Gator Phase": SLEEPING, AWAKENING, EATING or SATED, plus the upper and lower bar sizes and how long the phase has lasted.
- Management: dual buy/sell ladders, ATR-based distance, multi-order net closures and partial slices of heavy old orders.
- Protection is visible and adjustable: lot cap, level cap, margin and floating-loss blocks, spread filter, scan-only mode.
- Private memory per symbol and magic pair, so several charts can run side by side without touching each other's trades.
START HERE
- Chart: EURUSD H1 or XAUUSD H1 are comfortable places to begin; the EA itself accepts any symbol and timeframe.
- Settings: keep the shipped defaults for a first run. They use a 0.01 starting lot with an additive ladder and a 1.0 lot ceiling per order.
- Deposit: pick a balance that could survive a long one-way trend at your chosen lot. On a cent or small standard account, stay at 0.01.
- First step: switch RunMode to scan only, watch the plans the EA would make for a day, then arm it from the panel.
- Hedge cycle: leave it off until you fully understand the grid on its own.
WHY THE GATOR SUITS A LADDER
A grid suffers most when it begins at a random moment. The Gator Oscillator, built from the three Alligator moving averages, measures how far those lines sit apart. When jaw, teeth and lips tangle together the market is asleep: no direction, mostly noise. When the gaps between them widen on both sides at once, a real move is usually under way. The upper histogram tracks the jaw-to-teeth distance, the lower histogram tracks the teeth-to-lips distance, and each bar is colored green when it grows and red when it shrinks.
This EA treats that picture as a doorway rather than a crystal ball. It looks for the first closed bar where both histograms grow, and it insists that a sleeping bar appeared shortly before it. That combination filters out the middle of an exhausted run and keeps attention on fresh awakenings. The side is taken from the Alligator itself: lips above teeth arms a buying cycle, lips beneath teeth arms a selling cycle. Everything is read from completed candles, so arrows already printed on the chart do not move afterwards.
WHAT VERSION 3.12 BRINGS
The Gator Phase row. One line on the main card names the present phase. SLEEPING means both bars shrink. EATING means both expand. AWAKENING and SATED describe the mixed bars in between, depending on whether the market is coming out of rest or cooling down after a feeding run. Next to the label you read the current upper and lower bar sizes and a count of bars spent in this phase, so you know at a glance why the EA is idle or why it is ready.
Histograms in their own subwindow. When the EA starts on a live chart, it attaches the Gator below the price and removes it again on exit. Small arrows mark the exact candles where a cycle was armed.
Separate memory for every instance. Anchors, counters, retry lists and the hedge fund are kept under a key built from the account, the symbol and both magic numbers. A lock at start-up stops a second chart from claiming a magic number already in use, and every loop over open positions checks symbol and magic before acting.
Realistic margin test. Before a new level is placed, the terminal calculates its true margin and compares it, with a cushion, against the free margin you actually hold. Valid orders on large balances are no longer rejected.
Stop-out awareness. Lot ceiling, level ceiling and the netting margin limit ship with restrained values, so an untouched installation stays inside sensible bounds.
ONE CYCLE, FROM NAP TO HARVEST
1. Waiting. While the Gator sleeps, nothing happens. The phase row reads SLEEPING and the panel gate shows how many bars remain before another signal may be accepted.
2. Awakening. On the first bar where both histograms turn green after rest, the EA checks the Alligator lips against the teeth, applies your buy and sell permissions, honors the delay since the last accepted signal and then arms the first level.
3. Building. As price drifts away from the anchor, new levels join the ladder. The buy and sell sides can operate together, each with its own anchor and counter, or one side alone. Distance can follow ATR within a floor and ceiling, or stay at a fixed number of points.
4. Banking. A scanner tests combinations of the oldest and newest orders on each side and closes a group as soon as its result after swap and commission passes your target. When the oldest order is too large to clear at once, only a portion of it is closed, paid for by gains already floating on newer orders. Over several swings the heaviest positions shrink step by step.
5. Guarding. A reopen guard refuses closures that would instantly reopen the same level, which avoids pointless churn. Every closure is confirmed against the deal history, failed legs are queued for retry, and a plan is dropped if the book changed between scanning and sending.
6. Optional hedge cycle. Off by default. When enabled, a balanced pair is held on a symbol you name and retired in equal slices, financed by a small surcharge on closures the grid makes anyway. It exists to generate volume, not profit; its own effect on equity is the cost of spread, commission and swap.
THE PANEL
The cards keep their familiar theme and corner layout. The main card shows symbol and magic, a status badge, grid mode, lot step, spacing, banked result, the signal gate and the new Gator Phase line. Further cards list each side's closing plan with its own close button and the table of open orders. Buttons toggle armed or scan-only operation, pause, chart marks and slicing. The panel can be dragged and minimized, measures its own text so values never spill off the edge, and is skipped entirely during non-visual optimization for full speed.
EVERY INPUT, BY NAME
Grid - how levels are opened
- TradeMode - run a dual buy and sell ladder or a single direction (dual by default).
- GridSpacePoints - fixed distance between levels in points when ATR spacing is not used.
- GridSpaceMultiplier - widens each further level by this factor; 1.0 keeps steps equal.
- MaxGridLevels - the most levels a single ladder may hold.
- UpDirectionIsBuy - decides whether an upward move belongs to the buying side.
- EAMagicNumber - identifier stamped on grid orders; give each chart its own.
- GridOrderComment - text attached to grid orders for easy recognition.
- OneOrderPerBar - allows no more than one new level per candle.
Lot ladder
- InitialLotSize - volume of the first level.
- LotSizingMode - additive steps or multiplication per level (additive by default).
- LotMultiplier - growth factor used only in multiply mode.
- LotAddStep - volume added per level in additive mode; 0 reuses the starting lot.
- MaxOrderVolume - hard ceiling for any single order.
- UseAutoLot - scales the starting lot with balance.
- AutoLotBaseBalance - balance that corresponds to the starting lot when scaling.
- AutoLotAllowDecrease - lets scaling go below the starting lot after a drop in balance.
ATR spacing
- GridSpacingMode - ATR-driven or fixed spacing.
- ATRTimeframe, ATRPeriod, ATRBarShift - where and how volatility is measured; shift 1 uses the last finished candle.
- ATRSpacingFactor - scales the measured ATR into a level distance.
- ATRMinSpacingPts and ATRMaxSpacingPts - lower and upper limits on that distance.
- ATRFreezeOnStart - locks the distance for the whole cycle at its opening value.
Profit target
- DesiredProfitPerClosure - base money amount each closure aims to bank.
- ProfitMultiplier - final multiplier applied to that amount.
- ProfitTargetMode - flat target or one scaled to the book.
- ProfitVolumePower, ProfitDepthBonus, ProfitMaxMultiple - how the scaled target grows with volume and with depth, and where it stops.
- ProfitMaxReachFraction - keeps any target reachable within part of one grid step.
Fragment scanner and target slicing
- UseMultiLegScan - tests multi-order groups before the simple oldest-plus-newest pair.
- MaxOldestLegs and MaxNewestLegs - how many orders from each end a group may include.
- ScanPriority - which qualifying group wins when several pass.
- NeverBankLessThanPair - a group must also beat the simple pair target.
- RequireCloseVolumeExceedsTarget and MinCloseVolumeRatio - newer volume must outweigh the old order by the chosen ratio.
- EnableTargetSlicing - permits partial closing of the oldest order.
- FragProfitWeightPower, FragMinSlicePercent - how profit is weighted per closing lot and the smallest slice allowed.
- FragAllowMultiCloser - lets several newer orders share the cost of one slice.
- FragPreferFullClosure - picks a complete closure over a slice when both qualify.
Reopen guard and account protection
- ReopenGuard and ReopenGuardCushion - block closures that would reopen a level at once, with the safe distance as a fraction of a step.
- MinMarginLevelPercent - no new levels below this margin level; 0 disables.
- MaxAccountRiskPercent - no new levels beyond this floating loss as a share of balance; 0 disables.
- NetMaxMarginPercent - on netting accounts, caps the merged position's margin relative to equity.
- MaxTotalOrders - absolute limit on grid orders per side.
Execution and verification
- RunMode - armed trading or scan-only observation.
- CloseSequence - order in which legs of a closure are sent.
- MaxSlippagePoints and MaxSpreadPoints - execution tolerance and a spread ceiling for trading.
- MinSecondsBetweenClosures - breathing room between two closures on one side.
- CloseAttemptsPerLeg and VerifyTimeoutSeconds - retries per leg and how long a stuck leg is checked.
- DeferWhenMarketClosed and MarketClosedRetrySeconds - wait politely for the session instead of halting.
- AutoResumeAfterSeconds - clears a halt automatically after this many seconds; 0 waits for the panel.
- AbortIfBookChanged - cancels a plan when positions changed in the meantime.
- UseFullCommission and CommissionPerLot - how commission is counted, with a manual fallback.
- CloseOrderComment - text placed on closing deals.
Hedge cycle
- EnableHedgeCycle - master switch, off by default.
- HedgeSymbols, HedgeSymbolRotation, HedgeMaxSymbolsInTester - which symbols carry the pair, how the next one is chosen, and a tester-only limit.
- HedgeCycleLots and HedgeSliceLots - size of each side and of each retired slice.
- HedgeFragmentBonus and HedgeBonusIsPercent - extra added above slice cost, as a percentage or a fixed amount.
- HedgeMaxSurcharge and HedgeMaxSurchargePercent - caps on how much a closure target may be raised.
- HedgeMagicNumber - separate identifier for hedge legs; it must differ from the grid magic.
- HedgeReopenOnFinish and HedgeStartRequiresTrade - start a new pair after one finishes, and wait for grid activity before the first.
- HedgeIntegritySeconds, HedgeAutoRepair, HedgeNakedAction - how often both legs are checked and what happens if one is left alone.
- HedgeMaxSpreadPoints, HedgeSlippagePoints, HedgeAttemptsPerLeg, HedgeVerifyTimeout - execution limits for hedge orders.
- HedgeCommissionPerLot and HedgeOrderComment - commission fallback and deal comment for the pair.
Weekly cash day
- WeeklyCashDay, CashDayOfWeek, CashCutoffHour - pause new cycles and slices around the day and hour you plan to withdraw.
Panel and chart
- ShowPanel, PanelX, PanelY, PanelFontSize, PanelCorner - visibility, offsets, text size and preferred corner.
- ShowArabic - adds an Arabic line beneath each English label.
- ShowChartMarks - draws levels and closing plans on the price chart.
- MaxTableRows - rows of open orders listed per ladder.
Entry trigger
- EntryTriggerMode - lets the Gator signal arm the first level, or uses another trigger mode.
- SignalBarShift - candle that is read; 1 means the last closed bar.
- SignalBarsDelay - minimum bars between two accepted signals (30 by default).
- SignalValidBars - how many bars a signal remains usable.
- SignalAllowBuy, SignalAllowSell - enable each direction separately.
- SignalReverse - flips the direction of every signal.
Gator Oscillator signal
- InpGatorTF - timeframe the Gator and Alligator are computed on.
- InpGatorJawPeriod, InpGatorJawShift - length and forward shift of the jaw (13 and 8).
- InpGatorTeethPeriod, InpGatorTeethShift - length and shift of the teeth (8 and 5).
- InpGatorLipsPeriod, InpGatorLipsShift - length and shift of the lips (5 and 3).
- InpGatorMethod - averaging method; smoothed by default, as in the classic setup.
- InpGatorPrice - price fed to the averages; median price by default.
- InpGatorSleepLookback - how many earlier bars may contain the sleeping phase that must precede an entry.
- InpShowGatorWindow - shows the histograms in a subwindow on live charts.
- InpShowSignalArrows - prints an arrow on each candle that armed a cycle.
Debug
- DebugMode - writes detailed decisions to the Experts log for troubleshooting.
HOW TO USE IT DAY TO DAY
Attach the EA, allow algorithmic trading and confirm the panel appears. Glance at the Gator Phase row: if it says SLEEPING, the EA is simply waiting for the market to wake. Once a cycle is running, the plan cards tell you which group would close next and what it needs. Use pause before news you prefer to avoid, and use scan-only whenever you want to observe without trading. When running several charts, assign a different pair of magic numbers to each; the start-up lock will remind you if you forget.
HONEST EXPECTATIONS
No indicator knows the future, and no grid is free of risk. A strong trend against an open ladder can produce deep floating losses, and there is no stop loss that dumps the book for you; protection here works by refusing new levels. Results depend on your broker's spread, swap and commission, on the symbol and on the lot you choose. Past behaviour in the tester does not promise anything about live trading. Run the free test with your own settings, start small, and add volume only after you have seen how deep your symbol tends to travel. The EA works on hedging and netting accounts, needs no DLLs and no external files.
If Grid Gator Oscillator EA turns out to be useful in your trading, please leave a review that describes your real experience, good or bad. Honest feedback helps other traders decide and shows me what to improve next.
