• Overview
  • Reviews (1)
  • Comments (27)
  • What's new

Night Lottery EA MT4

The Night Lottery EA is a fully automated Expert Advisor that trades at night and relies on price reversion. The EA trades using market orders and uses time averaging to improve performance. This EA works best on EURUSD using the M5 timeframe. A VPS is advisable when trading this system. Check the comments for back test results and optimized settings.

Forward testing signals - https://www.mql5.com/en/signals/author/robots4forex

Live signal - https://www.mql5.com/en/signals/470226


  • Fully automated
  • Not sensitive to spread
  • Risk Money Management
  • Always a stop loss in place
  • This system has the option to be NFA/FIFO compliant
  • All you need is a VPS

Input Settings

Order Settings

  • MagicOrderNumber - Unique number for the EA to identify its trades. Any integer.
  • Lots - Number of fixed lots per trade if money management is off. Values from 0.01 to 50.0.
  • Slippage - Slippage in pips. Values from 1 to 10.
  • MoneyManagement - If turned on trade lot sizes are calculated on account risk, true/false.
  • MoneyManagementRisk - Risk per trade if money management is on. Values from 0.01 to 0.1.
  • AllowNewTrades - Turn this of to disable new trades, true/false.
  • AccountProfitLock - If money management is on the EA will stop trading if the account balance drops to this fraction of the maximum account balance (0.5 = 50% of account balance). Values from 0.0 to 1.0.
  • NFA_FIFOCompliant - Turn this on if you need this to be NFA and FIFO compliant, true/false.

Entry Settings

  • TimeFrame - Timeframe drop-down selection to lock EA to a timeframe so that selection of the chart timeframe doesn't affect the EA. When testing ensure the tester timeframe is set to the same value.
  • MaxSpread - Maximum spread in pips that the EA will trade. Values from 1.0 to 10.0.
  • Reverse - If turned on trades are reversed, true/false.
  • TrendFilter - If turned on trades are filtered by trend direction, true/false.
  • TrendTimeFrame - Timeframe drop-down selection for the trend detection.
  • GMTOffsetHours - Offset in hours for your broker's time zone - Values -12 to 12.
  • StartCandleHour - Start bar hour - Values 0 to 24.
  • EndCandleHour - End bar hour - Values 0 to 24.
  • BreakEvenCandle - If turned on moves the take profit to break even on this candle, true/false.
  • BECandleHour - Break even bar hour - Values 0 to 24.
  • TakeProfit - The take profit (Setting to 0 disables). Values from 0 to 100 depending on the pair being traded.
  • InvisibleTakeProfit - The invisible take profit, this can be used instead of TakeProfit (Setting to 0 disables). Values from 0 to 100 depending on the pair being traded.
  • StopLoss - The fixed stop loss visible to the broker - Values 25 to 200 depending on the pair being traded.
  • RSIPeriod - The RSI period used as entry signal - Values 1 to 40.
  • RSIThreshold - The RSI threshold used as entry signal (Setting to 0 disables) - Values 0 to 40.
  • RSIThresholdBuy - The RSI threshold used as entry buy signal (Setting to 0 disables) - Values 0 to 40.
  • RSIThresholdSell - The RSI threshold used as entry sell signal (Setting to 0 disables) - Values 0 to 40.
  • RMIEntry - If turned on uses RMI as entry signal, true/false.
  • RMIPeriod - The RMI period - Values 1 to 40.
  • RMIMomPeriod - The RMI momentum period - Values 1 to 40.
  • ATRPeriod - The ATR filter period - Values 1 to 100
  • ATRThreshold - The ATR threshold in pips - Values 0 to 10
  • ATRFilterOnAveraging - If enabled applies the ATR filter on averaging trades, true/false.
  • MaxTradeCount - Maximum number of trades open - Values 1 to 10.
  • TradeGroupsPerNight - Maximum number of trade groups per night - Values 1 to 10.
  • TradeDayAfterLoss - If turned on trading will be disabled the day after a loss, true/false.
  • TradeAllOfFirstHour - If turned on ignores MaxTradeCount for the first hour of trading, true/false.
  • CloseAllPositions - If turned on closes all positions if an invisible take profit is hit, true/false.
  • CloseAllPositionsThreshold - The maximum number of negative pips to close positions. Values 0 to 100.
  • CloseOpposingPositionsOnSignal - If turned on closses opposing trades on signal, true/false.

Optimization & Defaults

Default input values are for EURUSD M5. If optimizing, optimization of StartCandleHour, EndCandleHour, TakeProfit, StopLoss, RSIPeriod, MaxTradeCount and TradeGroupsPerNight are needed to find the best results.

Jhs 2018.11.15 11:35 

I have rented for a month, and the first night three winning trades, I hope you continue this well in forward even with the news about Italy and Trump, Mark is very attentive and responds immediately with any questions.I will make a comment when I finish the product rental and if it is positive, buy the expert finally. I hope that Mark will continue to improve the expert advisor. Thanks

14.12.2018. I am very angry because the last day of rental of the EA, 4 BUY (Eur/Usd), when the market is in range or downtrend, in lost leave and the EA has closed them to me automatically to the hour in which it expired, I suppose, the rent. Practically the expert advisor has made the same operations as the cheaper Hamster Scalping and Hamster Lite that is free. Would be better Mark's support to say when to put the expert On or Off based on market volatility or high impact news.

Version 1.12 2018.11.13
Added NoTradingOutOfTimes, ClosePositionsFriday, ClosePositionsFridayLastHour, ClosePositionsFridayMinutes options.
Version 1.11 2018.10.17
Added a check for disabling trading if the connection is lost throughout the end candle hour.
Version 1.10 2018.10.07
Added protection against requotes during news taking it negative more than the slippage setting.
Version 1.9 2018.10.01
Fixed issue with RSI calculation.
Version 1.8 2018.09.13
CloseAllPositionsThreshold is now number of pips rather than number of positions.
Version 1.7 2018.09.05
Improved performance.
Version 1.6 2018.08.31
Allowed for restart of EA when trades are open.
Version 1.5 2018.08.30
Added RMIEntry, RMIPeriod, RMIMomPeriod & CloseOpposingPositionsOnSignal options. Improved position closing for live trading.
Version 1.4 2018.08.29
Allowed for start candle being 1 hour before market open on sunday.
Version 1.3 2018.08.27
Added InvisibleTakeProfit, RSIThresholdBuy, RSIThresholdSell, BreakEvenCandle, BECandleHour, CloseAllPositions, CloseAllPositionsThreshold options.
Version 1.2 2018.08.25
Improved performance and added new options.