LakshmiFX v1.66 Detailed User Manual

Overview

LakshmiFX v1.66 is an advanced Expert Advisor (EA) for MetaTrader 5 (MT5), developed by Shomon Robie and released as a free tool under the motto “Free Forever – Small Sparks Ignite a Wildfire.” It’s designed for automated trading on forex pairs, indices, and commodities (e.g., XAUUSD). The EA combines multiple technical indicators, grid trading, zone recovery, and robust risk management features, making it versatile for various market conditions and trading styles.

  • Version: 1.66 (Updated February 28, 2025)
  • Developer: Shomon Robie
  • Copyright: © 2024 Shomon Robie
  • Contact: Facebook Page
  • Website: lakshmifx.com
  • Platform: MetaTrader 5 (MT5)

This manual provides an in-depth guide to installing, configuring, and using LakshmiFX, with a focus on its trade strategies and detailed settings.


Key Features

  1. Multiple Entry Signals: Choose from Stochastic RSI, Ichimoku, RSI, or Moving Average (MA) crossover strategies.
  2. Grid Trading: Opens sequential trades with customizable pip steps and lot size progression.
  3. Zone Recovery: Recovers losing positions by opening counter-trades within a defined zone.
  4. Risk Management: Configurable stop-loss (SL), take-profit (TP), trailing stops, and equity protection.
  5. Filters: Trend, oscillator, noise, and volatility filters to refine trade signals.
  6. News Filter: Avoids trading during high-impact news events.
  7. Custom Trading Hours: Restricts trading to specific times or days.
  8. Dashboard: Displays real-time stats (e.g., equity, profit/loss, positions).
  9. Reverse Trading: Inverts signals for contrarian strategies.
  10. Debugging: Detailed logs for troubleshooting and optimization.

Installation

  1. Download:
    • Obtain LakshmiFXv1.66.mq5 from a trusted source (e.g., the developer’s website or GitHub).
  2. Install:
    • Open MT5 → File → Open Data Folder → MQL5 → Experts.
    • Copy LakshmiFXv1.66.mq5 into the Experts folder.
  3. Compile:
    • Open MetaEditor (F4), locate the file in the Navigator, right-click, and select Compile. Ensure no errors are reported.
  4. Attach to Chart:
    • Open a chart (e.g., EURUSD, H1).
    • Drag the EA from the Navigator onto the chart.
    • Configure inputs in the pop-up window and click OK.
  5. Enable Algo Trading:
    • Go to Tools → Options → Expert Advisors → Check “Allow Algo Trading.”

Note: The EA requires hedging capability and works on demo accounts or registered real accounts.


Detailed Input Parameters

Below are the input parameters grouped by category, with detailed explanations and typical use cases.

Trade Settings

  • Magic Number (inpMagicNumber): Unique identifier for trades (default: 1974). Use different numbers for multiple instances.
  • Username (inpUserName) & Email Address (inpEmailAddress): Required for real accounts; verified via lakshmifx.com.
  • Trade Comment (inpTradeComment): Custom comment (default: “StochRSI+1EMA”). Useful for tracking trades.
  • Notify Only (inpNotifyOnly): If true, sends alerts without trading (default: false).
  • Slippage (inpSlippage): Max slippage in points (default: 10). Increase for volatile markets.
  • Max Spread (inpMaxSpread): Max allowable spread in points (default: 10). Adjust based on broker conditions.
  • Display Dashboard (inpDisplayDashboard): Shows real-time stats (default: true).
  • Trade Direction (inpTradingDirection): Options: BOTH_BUY_SELL, BUY_ONLY, SELL_ONLY (default: Both).
  • Only One Type Trade (InpOnlyOneTypeTradeIsAllowed): Prevents simultaneous buy and sell trades (default: true).
  • Trade Entry Criteria (inpTradeEntryCriteria): Defines entry signal:
    • TRADE_OPEN_CRITERA_STOCH_RSI: Stochastic RSI.
    • TRADE_OPEN_CRITERA_ICHIMOKU: Ichimoku Cloud.
    • TRADE_OPEN_CRITERA_RSI: RSI.
    • TRADE_OPEN_CRITERA_LOW_BELOW_3EMA_CLOSE_ABOVE_EMA: 3 EMA crossover.
    • TRADE_OPEN_CRITERA_LOW_BELOW_2EMA_CLOSE_ABOVE_2EMA: 2 EMA crossover.
    • DO_NOT_USE_TRADE_OPEN_SIGNAL_CRITERIA: Candle patterns only.

Stop-Loss & Take-Profit

  • SL Method (inpSlCalcualtionMethod):
    • SL_CALCULATED_WITH_SIGNAL: Based on entry signal (e.g., below lowest low).
    • SL_BASED_ON_ATR: ATR multiplier (default: 1x via inpStopLossATRFactor).
    • SL_FIXED: Fixed pips (default: 10 via inpStopLoss).
    • NO_STOPLOSS: No SL (risky).
  • Min SL (inpStopLoss): Minimum SL in pips (default: 10).
  • Max SL (inpMaxStopLoss): Caps SL distance (default: 50).
  • TP Method (inpTPCalcualtionMethod):
    • TP_CALCULATED_WITH_SIGNAL: Signal-based.
    • TP_BASED_ON_ATR: ATR multiplier (default: 1.5x via inpTakeProfitATRFactor).
    • TP_FIXED: Fixed pips (default: 0 via inpTakeProfit).
    • TP_MULTIPLIER_OF_SL: SL x multiplier (default: 1.5x via inpSlToTpMultiplier).
    • NO_TAKEPROFIT: No TP.
  • ATR Settings (inpAtrTFForSLTP, inpAtrPeriodSLTP): Timeframe and period for ATR (default: Current, 14).
  • Break Even Buffer (inpBeBuffer): Min profit in points to lock (default: 8).
  • Trailing Step Method (inpTrailingStepMethod):
    • TRAILING_CALCULATED_WITH_SIGNAL: Signal-based.
    • TRAILING_BASED_ON_ATR: ATR multiplier (default: 1x via inpTrailingATRFactor).
    • TRAILING_FIXED: Fixed pips (default: 6 via inpTrailingStep).
    • NO_TRAILING: No trailing.
  • Trailing ATR Settings (inpAtrTFForTrailingStep, inpAtrPeriodTrailing): Default: H1, 14.

Lot Size & Grid

  • Lot Size (inpLotSize): Initial trade size (default: 0.01).
  • Lot Exponent (inpLotExponent): Multiplier for subsequent trades (default: 1). E.g., 1.5 increases lots progressively.
  • Max Lot Size (inpMaxLotSizeAllowed): Caps total lot size (default: 3).
  • Use Grid (inpUseGrid): Enables grid trading (default: true).
  • Allow New Sequence (inpAllowNewSequence): Permits new grid sequences (default: true).
  • Delay Trade (inpDelayTrade): Delays trades by X bars (default: 1).
  • Subsequent Trade Settings (inpPlaceSubsequentTrades):
    • FIXED_PIP_DISTANCE: Fixed pip step.
    • WITH_FIXED_PIP_DISTANCE_CANDLE_FORMATION: Fixed pip + candle pattern.
    • ATR_BASED_PIP_DISTANCE: ATR-based pip step (default: 0.35x via inpAtrMultiplierForPipStep).
    • WITH_ATR_BASED_PIP_DISTANCE_CANDLE_FORMATION: ATR + candle pattern.
    • WITH_STOCH_RSI, WITH_RSI, etc.: Oscillator-based triggers.
  • Pip Step (inpPipStep): Grid level distance in pips (default: 24).
  • Pip Step Exponent (inpPipStepExponent): Multiplier for pip progression (default: 1.1).
  • Max Trades (inpMaxTrades): Max trades per direction (default: 20).
  • Close All After Max (inpCloseAllPositionAfterReacingMaxTrades): Closes all if max reached (default: true).

Zone Recovery

  • Use Zone Recovery (inpUseAutoZoneRecovery): Enables recovery mode (default: false).
  • Display Levels Only (inpDisplayZoneRecoveryLevelsOnly): Shows zones without trading (default: false).
  • Magic No (inpZoneRecoveryMagicNo): Unique ID for zone trades (default: 1111).
  • Trigger Trades (inpNoOfOpenTradeToStartZoneRecovery): Trades needed to start (default: 4).
  • Zone Size (inpZoneSize): Recovery zone in pips (default: 5.2).
  • Target (inpTarget): Profit target in pips (default: 10.0).
  • Supplement (inpSupplement): Additional lot size adjustment (default: 0.1).
  • Target Multiplier (inpTargetMultiplier): Multiplies zone target (default: 2).
  • TP Add (InpTakeProfitAdd): Extra TP in pips (default: 0.50).

Equity Protection

  • Max Loss % (inpMaxLoss): Max loss as % of equity (default: 0, disabled).
  • Max Drawdown % (inpMaxDrawdownPercent): Max drawdown limit (default: 10%).
  • Max Daily Loss (inpMaxDailyRunningLoss): Daily loss limit in currency (default: 3000).
  • Daily Profit Target (inpDailyProfitTarget): Profit goal in currency (default: 0).
  • Restart Hour (inpEARestartHour): Hour to resume after limit hit (default: 1).

Custom Trading Time

  • Close Friday (CloseFriday): Stops trading on Friday (default: false).
  • Close Friday Hour (CloseFridayHour): Stop time (default: 19).
  • Use Custom Time (inpUseCustomTradingTime): Enables time restriction (default: false).
  • Start Hour (inpStartHour): Trading start (default: 1).
  • Stop Hour (inpStopHour): Trading end (default: 11).
  • Action After Session (inpActionAfterSession): WAIT_FOR_SEQUENCE_TO_CLOSE or CLOSE_ALL (default: Wait).

Entry Signals

Candle Patterns

  • Use Candle Pattern (inpUseCandlePatternForEntry): Enables candle-based entry (default: false).
  • Pattern Type (inpCandlePattern): BULLISH_BEARISH_SHOOTING_STAR, MORNING_EVENING_STAR, ALL_CANDLE_PATTERN, or DO_NOT_USE (default: All).
  • Timeframe (inpCandlePatternTF): Default: Current.
  • Period for Avg (inpPeriodForCalculatingAvg): Lookback for averages (default: 20).

Stochastic RSI

  • Timeframe (inpStochRsiTimeFrame): Default: Current.
  • Period (inpStochRsiPeriod): Default: 14.
  • Down Level (inpStochRsiDownLevel): Oversold threshold (default: 20).
  • Trade Signal (inpStochRsiTradeSignal): CROSS_TOWARDS_MIDDLE, CROSS_OB_OS_LINE, or BELOW_OR_ABOVE_OB_OS_LINE (default: Below/Above).

Ichimoku

  • Timeframe (inpIchimokuTF): Default: Current.
  • TenkanSen/KijunSen/SenkouSpanB (inpTenkanSen, etc.): Default: 9, 26, 52.
  • Price Position (inpIchimokuPricePositionForEntry): PRICE_ABOVE_OR_BELOW_KUMO or PRICE_ABOBE_BELOW_SL (default: Kumo).

Trend Filter

  • Type (inpTrendFilter): TRIPLE_MA, DOUBLE_MA, SINGLE_MA, or DO_NOT_USE (default: Single).
  • MA Periods (inpMainMABars, inpSlowMABars, inpFastMABars): Default: 100, 50, 21.
  • MA Method (inpMAMethod): Default: EMA.

Other Filters

  • Trend Strength (inpTrendStrengthFilter): Aroon, ADX, or both (default: None).
  • Oscillator Filter (inpUseOscilatorFilter): RSI, StochRSI, Stoch, or None (default: None).
  • Noise Filter (inpNoiseFilterType): Kaufman ER, LakshmiFX ER, Price Density, or None (default: None).
  • Volatility Filter (inpVolatilityFilterType): ATR%, Bollinger Bands, or None (default: None).

Trade Strategies

LakshmiFX supports multiple trading strategies by combining entry signals, grid trading, and risk management. Below are detailed strategies with example settings:

1. Stochastic RSI Trend Following

  • Description: Trades based on Stochastic RSI signals, filtered by a trend direction (e.g., MA).
  • Settings:
    • inpTradeEntryCriteria: TRADE_OPEN_CRITERA_STOCH_RSI
    • inpStochRsiTradeSignal: BELOW_OR_ABOVE_OB_OS_LINE
    • inpStochRsiDownLevel: 20 (buy when below, sell when above 80)
    • inpTrendFilter: SINGLE_MA
    • inpMainMABars: 200
    • inpUseGrid: false
    • inpSlCalcualtionMethod: SL_FIXED (10 pips)
    • inpTPCalcualtionMethod: TP_FIXED (20 pips)
  • Logic: Buy when StochRSI < 20 and price > 200 EMA; sell when StochRSI > 80 and price < 200 EMA.
  • Best For: Trending markets (e.g., EURUSD H1).

2. Ichimoku Cloud Breakout

  • Description: Trades price breakouts above/below the Ichimoku Kumo (cloud).
  • Settings:
    • inpTradeEntryCriteria: TRADE_OPEN_CRITERA_ICHIMOKU
    • inpIchimokuPricePositionForEntry: PRICE_ABOVE_OR_BELOW_KUMO
    • inpTenkanSen/KijunSen/SenkouSpanB: 9/26/52
    • inpSlCalcualtionMethod: SL_CALCULATED_WITH_SIGNAL (below Kumo for buys)
    • inpTPCalcualtionMethod: TP_BASED_ON_ATR (1.5x ATR)
    • inpUseGrid: false
  • Logic: Buy when price breaks above Kumo; sell when below. SL below/above Kumo.
  • Best For: Volatile pairs (e.g., GBPJPY H4).

3. Grid Scalping with MA Filter

  • Description: Uses grid trading with a fast MA filter for short-term scalping.
  • Settings:
    • inpTradeEntryCriteria: TRADE_OPEN_CRITERA_LOW_BELOW_2EMA_CLOSE_ABOVE_2EMA
    • inpFastMABars: 10
    • inpUseGrid: true
    • inpPipStep: 10
    • inpLotExponent: 1.2
    • inpMaxTrades: 5
    • inpSlCalcualtionMethod: SL_BASED_ON_ATR (1x ATR)
    • inpTPCalcualtionMethod: TP_MULTIPLIER_OF_SL (2x SL)
  • Logic: Opens buy/sell grids when price crosses 10 EMA, with progressive lot sizes.
  • Best For: Range-bound markets (e.g., AUDUSD M15).

4. Zone Recovery Hedge

  • Description: Uses zone recovery to hedge losing grid trades.
  • Settings:
    • inpTradeEntryCriteria: TRADE_OPEN_CRITERA_RSI
    • inpRsiTradeSignal: CROSS_TOWARDS_MIDDLE
    • inpUseGrid: true
    • inpPipStep: 20
    • inpMaxTrades: 4
    • inpUseAutoZoneRecovery: true
    • inpNoOfOpenTradeToStartZoneRecovery: 4
    • inpZoneSize: 10
    • inpTarget: 15
  • Logic: Opens RSI-based grid trades; if 4 trades are open, starts zone recovery to lock profit.
  • Best For: High-volatility pairs (e.g., XAUUSD H1).

5. Reverse Mean Reversion

  • Description: Trades against the trend when price deviates from a slow MA.
  • Settings:
    • inpTradeEntryCriteria: TRADE_OPEN_CRITERA_STOCH_RSI
    • inpUseMeanReversion: true
    • inpTrendFilter: SINGLE_MA
    • inpMainMABars: 50
    • inpUseReverseTrade: true
    • inpSlCalcualtionMethod: SL_FIXED (15 pips)
    • inpTPCalcualtionMethod: TP_FIXED (30 pips)
  • Logic: Sells when price > 50 EMA and StochRSI overbought; buys when below and oversold.
  • Best For: Sideways markets (e.g., EURCHF H1).

How It Works

  1. Initialization:
    • Validates hedging, account type, and indicator handles (e.g., StochRSI, MA).
    • Sets up dashboard and global variables.
  2. Signal Detection:
    • Scans for entry signals based on inpTradeEntryCriteria.
    • Applies filters (trend, oscillator, noise, volatility).
  3. Trade Execution:
    • Opens trades with SL/TP based on configured methods.
    • If grid is enabled, opens subsequent trades at inpPipStep intervals.
  4. Zone Recovery:
    • Triggers when inpNoOfOpenTradeToStartZoneRecovery is met, hedging losses.
  5. Trade Management:
    • Adjusts SL/TP with trailing stops.
    • Closes trades if equity limits (inpMaxDailyRunningLoss, inpMaxDrawdownPercent) are hit.
  6. News Filter:
    • Pauses trading during news events if enabled.

Practical Usage

  1. Setup:
    • Attach to a chart (e.g., EURUSD H1).
    • Configure inputs based on your strategy (see above).
    • Enable dashboard for monitoring.
  2. Monitoring:
    • View equity, P/L, and positions on the dashboard.
    • Check Experts tab for logs (enable inpIsDebugging for details).
  3. Optimization:
    • Use MT5 Strategy Tester to backtest and optimize settings.
    • Example: Test StochRSI on EURUSD H1 with 2024 data, adjusting inpStochRsiPeriod.
  4. Real Account:
    • Register at lakshmifx.com with inpUserName and inpEmailAddress.

Troubleshooting

  • No Trades:
    • Check Algo Trading is enabled.
    • Verify spread < inpMaxSpread.
    • Ensure time/news filters aren’t blocking.
  • Init Failed:
    • Confirm hedging support.
    • Check indicator handles (e.g., StochRSI).
  • License Error:
    • Register real account credentials online.

Notes

  • Risk: Test on demo first. Adjust lot sizes and equity protection to your risk tolerance.
  • Updates: Check lakshmifx.com for newer versions.
  • Support: Reach out via Facebook.
Share the Post:

Related Posts

Join Our Newsletter

Scroll to Top