Strategy Core
EMA Crossover System:
Fast EMA (default: 20) and Slow EMA (default: 50)
Generates buy signals when Fast EMA crosses above Slow EMA.
Generates sell signals when Fast EMA crosses below Slow EMA.
Fibonacci Filter:
Calculates Fibonacci retrenchment levels (23.6%, 38.2%, 50%, 61.8%, 78.6%) based on recent price swings.
Requires price to be near a Fibonacci level (configurable threshold) to validate trades.
Risk Management
Position Sizing: Dynamically calculates lot size based on account balance and user-defined risk percentage.
Stop Loss & Take Profit: Fixed in pips, adjusted for 5-digit brokers.
Single Position Rule: Avoids multiple entries by allowing only one active trade at a time.
User Configuration
Toggle trading on/off ( Enable Trading ).
Adjust EMA periods, Fibonacci look back, and risk parameters.
Enable/disable Fibonacci filtering ( UseFibFilter ).
| Group | Parameter | Description |
|---|---|---|
| Strategy Settings | EnableTrading | Enable/disable trading |
| MagicNumber | Unique identifier for EA trades | |
| RiskPercentage | Risk per trade (% of account balance) | |
| EMA Settings | FastEMA | Period for faster EMA (e.g., 20) |
| SlowEMA | Period for slower EMA (e.g., 50) | |
| Fibonacci Settings | FibLookback | Bars analyzed for swing high/low (e.g., 100) |
| FibThreshold | Max distance (pips) from Fib level to trade | |
| UseFibFilter | Enable Fibonacci validation | |
| Trade Settings | StopLoss | Stop loss in pips (e.g., 100) |
| TakeProfit | Take profit in pips (e.g., 50) |
Initialization ( OnInit ):
Validates EMA periods (ensures Fast < Slow).
Initializes EMA indicators and calculates PointMultiplier for broker digit adjustment.
Sets magic number for trade identification.
Tick Processing ( OnTick ):
Signal Generation:
Checks EMA crossover conditions using the latest two bars.
Fibonacci Validation:
Identifies recent swing high/low over FibLookback bars.
Computes Fibonacci levels and checks proximity to current price.
Trade Execution:
Calculates stop loss ( sl ), take profit ( tp ), and lot size.
Executes buy/sell orders only if no existing positions.
Risk Management:
CalculateLotSize() : Uses account balance, risk percentage, and stop loss to determine position size.
Converts pips to points for SL/TP using PointMultiplier .
Buy Signal:
Fast EMA (20) crosses above Slow EMA (50).
Current price is within 0.5 pips of the 61.8% Fibonacci level.
Lot size = (1% of $10,000 account) / (100 pips SL * tick value).
Order: Buy 0.15 lots, SL = entry - 100 pips, TP = entry + 50 pips.
Broker Compatibility: Handles 4/5-digit brokers via PointMultiplier .
Limitations:
No trailing stop or recovery mechanism.
Single-position logic may miss opportunities in trending markets.
Optimization: Consider adding trend filters (e.g., RSI) or modifying Fibonacci calculation logic for different market conditions.
This EA provides a systematic approach to trading EMA crossovers with Fibonacci confirmation, emphasizing controlled risk and parameter flexibility. Test thoroughly in a demo environment before live deployment.
How to Install Allagain100 ?
To install and use an Expert Advisor (ALLGAIN100) in MetaTrader 5 (MT5), follow these organized steps:
1. Install the ALLGAIN100
2. Enable Automated Trading
3. Attach the ALLGAIN100 to a Chart
4. Adjust Permissions
5. Test the ALLGAIN100
6. Monitor Live Execution
Troubleshooting Tips
Key Considerations
By following these steps, you can effectively automate your trading strategies in MT5.
------------------------------------- Best Of Profit Booking ------------------------------------
If for any reason you do not like the purchased program, you can request a refund within 30 days from the date of purchase. You can also make an exchange for any other product at an equal cost or by paying the difference.
Simply send a request for refund or exchange with your order number by email: support@fx-market.pro.
Refund requests received more than 30 days after purchase will be rejected.