LT Alligator EA
Complete walkthrough of all inputs for the LT Alligator EA: 12 Alligator crossover strategies, full indicator configuration, trade execution, account protection, and all available filters.

These inputs configure the Bill Williams Alligator indicator and select which of the 12 crossover strategies the EA uses. The Alligator consists of three smoothed moving averages: the Jaw (blue, slowest), Teeth (red, medium), and Lips (green, fastest).
EA Trading Strategy
enumAlligator_MainSelects the Alligator crossover strategy. Each strategy watches for a specific crossover between the three Alligator lines or between price and a line.
| Strategy | Signal logic |
|---|---|
| Alligator_Main | Composite signal using all three lines and their relative order |
| Jaws_Cross_Teeth | Buy when Jaw crosses above Teeth; Sell when Jaw crosses below Teeth |
| Teeth_Cross_Lips | Buy when Teeth cross above Lips; Sell when Teeth cross below Lips |
| Lips_Cross_Jaws | Buy when Lips cross above Jaw; Sell when Lips cross below Jaw |
| Price_Cross_Lips | Buy when price crosses above Lips; Sell when price crosses below Lips |
| Price_Cross_Teeth | Buy when price crosses above Teeth; Sell when price crosses below Teeth |
| Price_Cross_Jaws | Buy when price crosses above Jaw; Sell when price crosses below Jaw |
| Price_Cross_Lips_Filter_Teeth | Price/Lips cross filtered by price being above/below Teeth |
| Price_Cross_Lips_Filter_Jaws | Price/Lips cross filtered by price being above/below Jaw |
| Price_Cross_Teeth_Filter_Jaws | Price/Teeth cross filtered by price being above/below Jaw |
| Price_Cross_Lips_Filter_Both | Price/Lips cross filtered by both Teeth and Jaw alignment |
| All_Lines_Cross | Signal when all three lines cross in the same direction simultaneously |
Number of bars to look for signal
int6How many recent bars the EA searches backward to find a valid crossover. Must be 3 or greater. A higher value allows the EA to catch crossovers that happened a few bars ago, useful on volatile instruments.
Close Trades on Opposite Direction Signal
boolfalseWhen true, a crossover in the opposite direction closes the existing position before opening the new one.
Reverse Trade Signal
boolfalseInverts all Alligator strategy signals.
Alligator Time Frame
enumPERIOD_CURRENTThe timeframe used to calculate the Alligator indicator.
Jaws Period
int13Smoothing period for the Jaw line (slowest, default 13 bars). The Jaw represents long-term trend direction.
Jaws Shift
int8Bar shift for the Jaw line into the future. The classic Bill Williams setting is 8.
Teeth Period
int8Smoothing period for the Teeth line (medium speed, default 8 bars).
Teeth Shift
int5Bar shift for the Teeth line. Classic setting is 5.
Lips Period
int5Smoothing period for the Lips line (fastest, default 5 bars). The Lips reacts first to new price moves.
Lips Shift
int3Bar shift for the Lips line. Classic setting is 3.
Alligator MA Method
enumMODE_SMMASmoothing method applied to all three Alligator lines. MODE_SMMA (Wilder Smoothing) is the classic Bill Williams setting. Changing this alters the indicator behaviour significantly.
Alligator Applied Price
enumPRICE_MEDIANThe price type used for all three Alligator calculations. PRICE_MEDIAN (High+Low)/2 is the classic Bill Williams setting.
These inputs define which instrument the EA trades and whether it uses a real or virtual account balance for lot-size calculations.
EA Name
stringLT EAThe internal name displayed on the chart and in log messages. Changing this lets you run two instances of the same EA on the same chart with different settings without naming conflicts.
Type of Symbol
enumNChartSelects whether the EA trades the chart symbol (NChart) or a custom symbol entered in the Trading Symbol field (CChart). Use CChart to trade a different instrument from the one the EA is attached to.
| Option | Behaviour |
|---|---|
| NChart | Trades the chart symbol automatically |
| CChart | Trades the symbol entered in Trading Symbol |
Trading Symbol
stringEURUSDThe symbol the EA will trade when Type of Symbol is set to CChart. Enter the exact symbol name as it appears in your broker's Market Watch (e.g EURUSD, XAUUSD, US30).
Use a Virtual Balance
boolfalseWhen enabled the EA uses the value in EA Virtual Balance for lot-size risk calculations instead of the real account equity. Useful for testing fixed-lot scenarios on a live account without changing real risk.
EA Virtual Balance
int1000The virtual account balance (in account currency) used when Use a Virtual Balance is enabled. Has no effect when Use a Virtual Balance is false.
Core execution parameters: which timeframe the EA reads signals on, trade direction, lot sizing, stop loss and take profit modes, and position management options.
Working timeframe
enumPERIOD_CURRENTThe timeframe the EA uses to read indicator values and generate signals. PERIOD_CURRENT means the EA reads the chart timeframe. Changing this lets you run a higher-timeframe strategy on a lower-timeframe chart.
Trade direction
enumbuy_sellRestricts which side the EA can open. Set to buy to only go long, sell to only go short, or buy_sell to trade both directions.
| Option | Behaviour |
|---|---|
| buy | Opens Buy positions only |
| sell | Opens Sell positions only |
| buy_sell | Opens both Buy and Sell positions |
Search signals on ...
enumbar_1Determines which bar the EA reads for entry signals. bar_1 uses the last fully closed bar (no repainting). bar_0 reads the live forming bar for faster signals at the cost of potential repainting.
bar_1 is the safer default for live trading. bar_0 is useful for scalping strategies where speed matters more than repainting protection.
Money management
enumriskSelects how the EA calculates the lot size for each trade.
| Option | Lot calculation |
|---|---|
| lots_min | Always trades the broker minimum lot |
| lot | Uses the fixed lot size set in Lot Size or Risk in Percentage |
| risk | Calculates lot size so the risk equals the percentage set in Lot Size or Risk in Percentage |
Lot Size or Risk in Percentage
double3.0Interpreted based on the Money management setting. When money management is lot, this is the fixed lot size. When it is risk, this is the percentage of account balance to risk per trade (requires a valid Stop Loss to be set).
Stop Loss Mode
enumSL_FIXEDSelects how the stop loss distance is calculated.
| Mode | Calculation |
|---|---|
| SL_FIXED | Uses the fixed number of points set in Fixed Stop Loss (points) |
| SL_RISK | Calculates a stop distance based on the Risk-Based Stop Loss (% of balance) |
Fixed Stop Loss (points)
uint0The stop loss distance in points when Stop Loss Mode is SL_FIXED. Set to 0 to disable the stop loss entirely. A point is the smallest price increment (e.g. 1 point on EURUSD = 0.00001).
Trading without a stop loss (value 0) exposes the account to unlimited drawdown if the market moves against the position.
Risk-Based Stop Loss (% of balance)
double1.0Active when Stop Loss Mode is SL_RISK. The EA calculates a stop distance such that losing the trade would cost this percentage of the account balance.
Take Profit Mode
enumTP_FIXEDSelects how the take profit distance is calculated.
| Mode | Calculation |
|---|---|
| TP_FIXED | Uses the fixed number of points set in Fixed Take Profit (points) |
| TP_RR | Sets the take profit as a multiple of the stop loss distance |
Fixed Take Profit (points)
uint0The take profit distance in points when Take Profit Mode is TP_FIXED. Set to 0 to disable the take profit.
Risk-Reward Ratio (TP = SL x RR)
double2.0Active when Take Profit Mode is TP_RR. The take profit is set at Stop Loss distance multiplied by this value. A value of 2.0 means the take profit is twice the stop loss distance.
Virtual Levels (hide SL/TP from broker)
boolfalseWhen enabled the EA manages stop loss and take profit internally without sending them to the broker. The broker sees positions with no SL/TP, which can prevent stop hunting on some brokers.