XP Beat the Market MT4
- Experts
- Mostafa Mahmoud
- Version: 3.11
- Updated: 15 February 2025
- Activations: 5
Simply this great AI EA made to make the trading much easier & more automated to beat the market - real signal with proven success you can see it on mql5 or subscribe to it.
IMPORTANT: enable this setting when run in test mode - EnableTestingMode
The strategy is very simple & has a lot of success in all trading history. For example, Gold is for buy, so just buy the dip, it's very simple right?! But the problem that if you bought it and did not taken any more actions you will not benefit from price movements. The EA will buy every dip for you then will sell them at the top to gain profit from this movements.
All you need is to know what instrument you buy like Gold, Silver, BTC, trusted stocks & equities. And then backtest it to choose the right targets in percentage to keep your targets dynamically. The EA can take buy or sell position, but my advice is to go with the main trend as big timeframe & fundamentals. So please don't go against trend like selling Gold, I want you make money not to loss.
The recorded video is important to see the backtest and see my instructions for more understanding the concept.
IMPORTANT: try avoid symbols with swap fees
Swap fee accounts/brokers symbols is highly recommended. If you want to buy shares then open shares account with swap free. If you want to trade Gold or Silver or Bitcoin or Ethereum, then chose the broker that offer this instruments with ZERO swap fees.
Settings description
EA_Enabled
Whether the EA can open/close traded or not.
UseMagicNUmber
Whether you are want the EA to open positions with this magic number and handling positions with this magic number only or no. If set to FALSE , will open positions with magic number 0 , like manual positions.
MagicNUmber
The magic number that you want EA to use.
StepTicks
The number of step ticks to use as gain or loss to do the needed action.
UsePercentageTicks
if set to TRUE will ignore the previous setting StepTicks and will calculate it based on the following percentage setting TicksPercentage .
MaxLayers
Maximum numbers of layers positions allowed to be opened.
PositionsTypesToHandle
Select the type of orders you want EA to handle , you may apply the EA on two charts for same symbol to handle buys & sells with different settings.
MaxSpreadTicks
The maximum spread allowed (in ticks) to open or close position to avoid high spreads like during news or low liquidity market.
OrUsePercentageSpreadFromPrice
If set to TRUE will use the following setting SpreadPercentage as percentage from symbol price as a MaxSpreadTicks value.
SlippageTicks
The maximum slippage ticks you agree when open or close positions.
SendPushNotification
Send Push messages to MetaTrader with transactions done by EA.
AutoTrade
Whether EA will auto open positions when there is no positions.
- DontAutoTrade = don't auto open positions , only handle current positions.
- OpenBUY = auto open Buy position if there is no Buy position.
- OpenSEL = auto open Sell position if there is no Sell position.
- OpenBoth = auto open Buy position if there is no Buy position & auto open Sell position if there is no Sell position.
StartLotSizeForAutoTrade
The lot size to be auto opened when there is no positions.
Layering_Lot_Size
Lot size mode for layering:
- Fixed_As_Start = the lot size you set in previous setting.
- As_Last_Postition = the same size as per last layer size.
- Use_Multiplier = use the multiplier value as set in LotMultiplier.
- Auto_Allocate_As_Per_Price = increase or decrease lot to match the money value increase or decrease lot to match the money value in last layer.
LotMultiplier
This to increase or decrease lot size for every layer. Will be opened by multiply the latest order lot size!!!
If set to 1.0 the new layer will be opened in the same size. If set higher than 1.0 = increase, lower than 1.0 = decrease.
But if the decreasing lower than broker minimum lot size, the new layer will be opened with broker minimum lot allowed.
CloseLosingPositions
Whether to close position when loss StepTicks hit.
CloseProfitPositionsWhenHitTarget
Whether to close position when gain StepTicks hit.
CountLayersRegardlessMagicNumber
If TRUE will count layers for current symbol regardless the magic number
RetraceLosingPositions
Open new layer when loss StepTicks hit.
CloseLosingPositionsMultipliedMaxLayers
Close position when loss reach StepTicks multiplied by MaxLayers , of course the oldest layer will be targeted. For example if we target 5% StepTicks with MaxLayers=5 then the oldest position will be closed when reach 25% of loss.
RetraceProfitPositions
Open new layer when gain StepTicks , this is like inverse layering that we used in our XP Layering & Set BE app.
CalculateProfitPercentageOnLowestPrice
For example we are buy bitcoin at 60000 with 5% StepTicks. But price goes against us with 5% the EA open new layer at 57000. Now what is the TP target? if 5% from current level will=59850.
If set to FALSE TP will be 60000 as highest position price
CalculateLossPercentageOnLowestPrice
For example we are buy bitcoin @ 60000 with 5% StepTicks. But price goes against us with 5% the EA open new layer at 57000. But the 3rd layer will be opened at 54000 as 5% on highest price
If set to TRUE 3rd layer will opened at 54150 as lowest position price.
EnableTestingMode
Must enabled when backtesting.
ValidateTrendWithMovingAverage
Introducing the newer version with smart validation for the current trend to open or retrace more layers only when we still in the same trend direction to avoid increase positions when trend reversal occurs, you control this feature by enabling or disabling this one.
2025-02-13: Three big updates!
1. Beat he the market with another revolutionary feature MARKET CRASH PROTECTION, to automatically close your position if the trend reversed against your trading position. Latest backtests made from 2020-01-01 before market crash during coronavirus pandemic and passthrough the crash when FED raised interest rates till Feb-2025. Test made for huge number of instruments like Gold, Silver, US / EU indices, US Stocks, Crypto BTC ETH.
To protect the profit and capital from worst times and got a huge ROI with minimal drawdown.
2. Changed the whole settings module and added pre-programmed profiles for back tested instruments to make the EA easier.
3. Crush the market added another revolutionary feature (split_positions). Sometimes the price make pullback before hitting target , now we will hunt the market with fractals of out target to make sure not missing any market move!
MT5 Version