Gator Oscillator
The Gator Oscillator measures how far apart the Alligator's three lines are, drawn as two histograms mirrored about zero. It adds no new information to the Alligator — it restates the same three averages as distances, so that convergence and divergence become something you can read at a glance instead of eyeballing three curves.
- Periods
- 13 / 8 / 5
- Shifts
- 8 / 5 / 3
- Histograms
- 2 (upper +, lower −)
توضيحي — بيانات اصطناعية، ليست تسعيرة مباشرة.
What the Gator Oscillator tells you
The Alligator is three smoothed averages of median price, each pushed forward by a few bars. Reading it means judging by eye whether the three curves are converging or spreading. The Gator does that judging arithmetically: the upper histogram is the gap between the slowest two lines and the lower histogram is the gap between the fastest two, drawn downwards so the pair reads like a mouth. When both halves are growing the lines are spreading — Bill Williams' 'the Alligator is eating'. When both are shrinking they are converging and the market is going nowhere. There is no new input here: every value comes from the same three averages the Alligator already draws.
- Both halves growing: the lines are spreading — a trend is under way
- Both halves shrinking: the lines are converging — stand aside
- One growing, one shrinking: the phase is changing, and which one is growing says which end
- 1 Take the Alligator's Jaw (13), Teeth (8) and Lips (5), each shifted forward
- 2 Upper = |Jaw − Teeth|
- 3 Lower = −|Teeth − Lips|, drawn downwards
عرض الصيغة وتفاصيل الحساب
The Gator Oscillator is the Alligator, re-expressed as two distances:
upper = |Jaw − Teeth|lower = −|Teeth − Lips|
Jaw, Teeth and Lips are smoothed moving averages of median price over 13, 8 and 5 bars, each pushed forward by 8, 5 and 3. Nothing else enters the calculation. The Gator is therefore not a second indicator that happens to agree with the Alligator — it is the Alligator, with the eyeballing done arithmetically.
In MQL5 the call is iGator(symbol, period, jaw_period, jaw_shift, teeth_period, teeth_shift, lips_period, lips_shift, ma_method, applied_price) — ten arguments, more than any other indicator the Builder exposes. Six of them become EA inputs; the MA method and the applied price are written into the generated code as literals, so they are chosen when you generate rather than adjusted afterwards.
Two facts about the output matter more than the formula.
There are four buffers, not two. The reference states the layout without ambiguity: 0 - UPPER_HISTOGRAM, 1 - color buffer of the upper histogram, 2 - LOWER_HISTOGRAM, 3 - color buffer of the lower histogram. The lower histogram is at index 2. Reading it at index 1 returns a colour index — a small integer — and nothing will complain; the rule will simply compare a colour number against a price difference forever. The Builder’s node maps its Line property to 0 and 2 for exactly this reason, and its codegen carries a comment saying so.
The lower half is negative. MetaTrader’s help is explicit that the lower histogram carries a minus sign “as the histogram chart is drawn top-down”. So the two halves grow in opposite numerical directions. “Both histograms are growing” — the whole point of the indicator — is upper > upper[1] and lower < lower[1]. Write both with > and you have asked for a mouth that is opening at the top and closing at the bottom, which is a real state and not the one you meant.
The colours MT5 paints encode exactly that growth, and unlike the Awesome and Accelerator oscillators the colours here are genuinely published buffers rather than draw-time decoration. The Builder still cannot reach them — the node selects Upper or Lower and nothing else — so the template reconstructs the rule from values. That reconstruction is exact, but it needs two reads per histogram, which is why a rule this simple ends up as four indicator nodes.
الإشارات
الإشارات المتميزة والقابلة للاختبار التي يوفرها Gator — والنظام الملائم لكل منها.
Both Halves Shrinking
جاهز في المنشئOne Side Turning
جاهز في المنشئSustained Growth Without Price
منطق متقدمتنفيذ MT5
ما يحسبه ويرسمه ميتاتريدر 5 فعليًا — وهو المرجع الذي كُتبت وفقه كل قاعدة في هذه الصفحة.
المخازن
| الفهرس | المخزن | طريقة الرسم في MT5 | ما يحتويه |
|---|---|---|---|
| 0 | UPPER_HISTOGRAM | Histogram | The absolute difference between the Jaw and the Teeth. Always positive, drawn above zero. |
| 1 | COLOR_INDEX | Colour index | Which colour the upper histogram's bar takes — green when the bar is larger than the one before it, red when smaller. The MQL5 reference names this buffer explicitly. The Builder's node cannot select it; its Line property offers Upper and Lower only. |
| 2 | LOWER_HISTOGRAM | Histogram | The absolute difference between the Teeth and the Lips, with a minus sign, so it is drawn top-down below zero. Reading this buffer at index 1 instead of index 2 returns the upper histogram's colour index as if it were a price — the Builder's codegen carries a comment about exactly this. |
| 3 | COLOR_INDEX | Colour index | The lower histogram's colour buffer. Also unreachable from the node. |
ملاحظات المنصة
يعمل بشكل أفضل / استخدم بحذر
لا يوجد مؤشر ذو ميزة شاملة. إليك أين يساعد Gator — وأين يضلل.
يعمل بشكل أفضل
- Confirming that a breakout has the three averages spreading behind it
- Filtering out the converged stretches where a trend rule will be whipsawed
- Higher timeframes, where the SMMA lag is a feature rather than a delay
- Alongside the Alligator itself, which supplies the direction the Gator omits
استخدم بحذر
- As a direction source — both halves grow the same way in an up move and a down move
- Any fixed threshold on the height; it carries the instrument's price units
- Reading the lower half with the same comparison as the upper — it is negative, so growth is downwards
- Assuming it adds information to the Alligator; it is the same three averages restated
بناء استراتيجية Gator
اربط الإشارة بقواعد الدخول والخروج، ثم صدّر EA MT5 قابلاً للترجمة — بدون كود.
- Gator Upper at the current bar and the previous one
- Gator Lower at the same two bars
- Upper higher than before AND Lower lower than before → the mouth is opening
- Alligator Lips against Jaw supplies the direction
- Opening AND Lips above Jaw → Open Buy · SL 50 / TP 150; the mirrored pair → Open Sell
دمج Gator مع مؤشرات أخرى
نادراً ما يقف مؤشر واحد وحده. هذه التوليفات تغطي النقاط العمياء لـ Gator.
Gator + Alligator
- Both Gator halves growing
- Lips above Jaw
- Buy
Gator + Awesome Oscillator
- Both Gator halves growing
- AO above zero
- Buy
No single-flow template pairs them. Start from Gator Mouth Opening and swap the Lips-versus-Jaw pair for an AO node with a Compare against a Constant of 0.
افتح المنشئ →Gator + ADX
- Both Gator halves growing
- ADX above 25
- Buy
No single-flow template combines them. Start from Gator Mouth Opening and add an ADX node with a Compare at 25 into the existing AND tree — the same filter the Parabolic SAR template uses.
افتح المنشئ →المعاملات
قيم أولية للتحقق على زوجك الخاص وإطارك الزمني — ليست إعدادات مضمونة.
| المعامل | الافتراضي | نطاق الاختبار المقترح | ما يفعله |
|---|---|---|---|
| Jaw period / shift | 13 / 8 | 1–999 / 0–100 | The slowest of the three averages and how far forward it is pushed. It sets the top of the upper histogram: a longer Jaw sits further from the Teeth, so the upper half is taller and slower to change. |
| Teeth period / shift | 8 / 5 | 1–999 / 0–100 | The middle average, and the only one that appears in both histograms — the upper measures it against the Jaw, the lower against the Lips. Changing it moves both halves at once, which is why the two are not independent readings. |
| Lips period / shift | 5 / 3 | 1–999 / 0–100 | The fastest average. It only affects the lower histogram, which is therefore the half that reacts first — the lower half usually starts growing before the upper one does. |
| MA method | SMMA | SMA, EMA, SMMA, LWMA | How the three averages are smoothed. It is a real argument to iGator and the node exposes it, but the Builder writes the chosen value into the generated code as a literal rather than as an EA input — so it is fixed when you generate, not adjustable in MT5 afterwards. Bill Williams specified smoothed averages and that is the default. |
| Applied price | Median | Close, Open, High, Low, Median, Typical, Weighted | Which price the averages are taken of. Also a real argument, also written as a literal. Median price — (high + low) / 2 — is Bill Williams' choice and the node's default. |
| Line | Upper | Upper or Lower | Which histogram the node reads. This selects the buffer index, and it is the setting to be careful with: Upper is buffer 0 and Lower is buffer 2, because buffers 1 and 3 hold colour indices. |
الإعدادات المسبقة الأولية
أمثلة السوق
أين يعمل Gator، وأين يفشل، وكيف يغير الفلتر النتيجة.
The mouth opening into a trend
After a converged stretch both histograms start growing on the same bar and the Lips are above the Jaw. The entry fires and the fixed target is reached while the halves are still expanding.
One bar of growth inside a range
A single wider bar nudges both gaps up for one bar in an otherwise converged market. Both conditions are technically met and the averages re-converge two bars later.
Half open, half closed
The fast gap widens while the slow one is still shrinking — the usual look of a phase change that has not finished. The template's AND declines it, which is the difference between the mouth opening and the Lips simply running ahead.
المؤشرات ذات الصلة
FAQ
- What is the difference between the Gator and the Alligator?
- None, in terms of information. The Gator's upper histogram is the distance between the Alligator's Jaw and Teeth, and its lower histogram is the distance between the Teeth and Lips with a minus sign. Both are computed from the same three smoothed averages of median price. What changes is what is easy to see: three curves on a price chart make convergence a judgement call, while two histograms make it a number that either grew or did not. Use the Gator when you want that judgement mechanised — but do not treat the two agreeing as independent confirmation.
- Why is the lower histogram negative?
- Because MT5 draws it top-down so that the pair looks like a mouth. MetaTrader's own help puts it directly: the lower histogram is the absolute difference between the red and green lines, 'but with the minus sign, as the histogram chart is drawn top-down'. The practical consequence is that the two halves widen in opposite numerical directions — the upper value goes up and the lower value goes down — so a rule that tests both with the same comparison operator is wrong for one of them.
- Can an EA read the bar colours?
- The colours exist as buffers — the MQL5 reference names buffer 1 as the upper histogram's colour index and buffer 3 as the lower one's. The Builder's node cannot select them: its Line property offers Upper and Lower, which are buffers 0 and 2. So a generated EA has to rebuild the colour, which is straightforward because the rule behind it is just 'is this bar bigger than the last one'. The template does that with two nodes per histogram.
- What settings should I use?
- 13 / 8 / 5 with shifts of 8 / 5 / 3, smoothed averages and median price — Bill Williams' own numbers and MT5's defaults. Note that only the six period and shift values become EA inputs; the MA method and the applied price are baked into the generated code, so if you want something other than SMMA and median you must set it on the node before generating.
- Can I build a Gator EA without coding?
- Yes. The Gator Mouth Opening template reads the upper histogram at the current bar and the previous one, does the same for the lower histogram, and requires the upper to have risen and the lower to have fallen — both halves growing. Direction comes from an Alligator node pair comparing Lips against Jaw. All six periods and shifts are EA inputs, along with the stop distances.
- How should I validate settings before going live?
- Backtest on quality tick data, then run on a demo account before risking money. Two things deserve particular attention here. First, the six periods appear four times over in the generated inputs — change one copy and the comparison silently compares two different indicators, so check that a parameter sweep moves them together or not at all. Second, requiring both halves to grow is a narrow filter, so read the trade count before the profit.
مقالات ذات صلة
Glossary