Table of Contents
- Installation & Setup
- Quick Start Guide
- Parameter Reference
- Operating Modes
- Dashboard Overview
- Advanced Configuration
- Troubleshooting
- Best Practices
- FAQ
Installation & Setup
Step 1: Installation
- Download the PositionNibbler.mq5 file
- Copy to your MetaTrader 5 Experts folder:
- Windows: %APPDATA%\MetaQuotes\Terminal\[Terminal_ID]\MQL5\Experts\
- Mac: ~/Library/Application Support/MetaTrader 5/Profiles/Templates/
- Restart MetaTrader 5 or press F4 to refresh the Navigator
- The EA will appear in the Navigator under “Expert Advisors”
Step 2: Basic Setup
- Open any chart (the EA works across all symbols regardless of chart)
- Drag the Position Nibbler EA onto the chart
- Configure basic parameters in the inputs dialog
- Click “OK” to start the EA
- Ensure “Auto Trading” is enabled (button should be green)
Step 3: Verification
- Check the “Experts” tab for initialization messages
- Verify the dashboard appears on your chart (if enabled)
- Confirm the EA shows “Active” status in the dashboard
Quick Start Guide
For Immediate Use (Recommended Beginner Settings):
Timing Settings: – Use Interval: true – Interval Hours: 24 (daily execution) Position Selection: – Position Selection: 0 (bottom/oldest position) Lot Settings: – Lot Mode: 2 (percentage) – Percentage Lots: 10.0 (close 10% of position) Risk Management: – Max Loss Amount: 100 (adjust to your risk tolerance)
This configuration will close 10% of your oldest position every 24 hours, providing steady profit-taking with minimal risk.
Parameter Reference
Broker Compatibility Group
Auto Retry Orders
- Type: Boolean (true/false)
- Default: true
- Description: Automatically retry failed orders due to network issues, requotes, or temporary broker problems
- Recommendation: Keep enabled for reliable execution
Max Retries
- Type: Integer
- Default: 3
- Range: 1-10
- Description: Maximum number of retry attempts for failed orders
- Note: Higher values may cause delays but improve success rate
Retry Delay Ms
- Type: Integer
- Default: 1000
- Range: 500-5000
- Description: Delay between retry attempts in milliseconds
- Recommendation: 1000ms works well for most brokers
Normalize Symbols
- Type: Boolean
- Default: true
- Description: Removes broker suffixes like .m, .raw, .ecn for symbol matching
- Note: Essential for multi-broker compatibility
Timing Settings Group
Use Interval
- Type: Boolean
- Default: true
- Description: Choose between interval-based (true) or fixed-time (false) execution
- Interval Mode: Executes every X hours from last execution
- Fixed Time Mode: Executes once daily at specified time
Interval Hours
- Type: Integer
- Default: 24
- Range: 1-168 (1 week)
- Description: Hours between executions when using interval mode
- Examples:
- 1 = Every hour
- 4 = Every 4 hours
- 24 = Once daily
- 168 = Once weekly
Fixed Time
- Type: String
- Default: “07:10”
- Format: “HH:MM” (24-hour format)
- Description: Daily execution time when using fixed-time mode
- Examples:
- “07:30” = 7:30 AM
- “15:45” = 3:45 PM
- “23:00” = 11:00 PM
Position Selection Group
Use Direction Filter
- Type: Boolean
- Default: true
- Description: Filter positions by type (Buy/Sell)
- Note: When disabled, processes both Buy and Sell positions
Position Direction
- Type: Enum
- Default: POSITION_TYPE_BUY
- Options:
- POSITION_TYPE_BUY (Buy positions only)
- POSITION_TYPE_SELL (Sell positions only)
Position Selection
- Type: Integer
- Default: 0
- Options:
- 0 = Bottom (oldest position)
- 1 = Top (newest position)
- 2 = Both (oldest and newest)
- Strategy Note: Bottom selection is ideal for FIFO profit-taking
Lot Settings Group
Lot Mode
- Type: Integer
- Default: 1
- Options:
- 0 = Full Close (close entire position)
- 1 = Fixed Lots (close specific lot amount)
- 2 = Percentage (close percentage of position)
- 3 = Profit Based (adjust based on trading performance)
Fixed Lots
- Type: Double
- Default: 0.01
- Range: 0.01 – 100.0
- Description: Specific lot amount to close when using Fixed Lots mode
- Note: Will be capped at total position size
Percentage Lots
- Type: Double
- Default: 10.0
- Range: 1.0 – 100.0
- Description: Percentage of position to close when using Percentage mode
- Examples:
- 10.0 = Close 10% of position
- 25.0 = Close 25% of position
- 50.0 = Close half the position
Profit Percentage
- Type: Double
- Default: 5.0
- Range: 1.0 – 50.0
- Description: Base percentage for Profit Based mode
- Note: Actual percentage adjusts based on recent trading performance
Symbol Filter Group
Use Symbol Filter
- Type: Boolean
- Default: false
- Description: Enable filtering by specific currency pairs
Symbol List
- Type: String
- Default: “EURUSD,GBPUSD,USDJPY”
- Format: Comma-separated list of symbols
- Examples:
- “EURUSD,GBPUSD” (two pairs)
- “XAUUSD” (single symbol)
- “EURUSD,GBPUSD,USDJPY,USDCHF,USDCAD,AUDUSD,NZDUSD” (major pairs)
Exclude Symbols
- Type: Boolean
- Default: false
- Description:
- false = Include only listed symbols
- true = Exclude listed symbols (process all others)
Magic Number Filter Group
Use Magic Filter
- Type: Boolean
- Default: false
- Description: Filter positions by EA magic numbers
- Use Case: Isolate specific EA trades or manual trades (magic 0)
Magic Numbers
- Type: String
- Default: “123,456,789”
- Format: Comma-separated list of magic numbers
- Examples:
- “0” (manual trades only)
- “12345” (specific EA)
- “0,12345,67890” (manual trades + specific EAs)
Exclude Magic
- Type: Boolean
- Default: false
- Description:
- false = Include only listed magic numbers
- true = Exclude listed magic numbers
Risk Management Group
Max Loss Amount
- Type: Double
- Default: 100.0
- Range: 0 (disabled) – 10000
- Description: Skip positions with losses exceeding this amount
- Currency: Account currency
- Safety Feature: Prevents closing positions during significant drawdown
Dashboard Settings Group
Show Dashboard
- Type: Boolean
- Default: true
- Description: Display visual dashboard on chart
Dashboard X/Y Position
- Type: Integer
- Description: Screen coordinates for dashboard placement
- Note: Adjustable if dashboard overlaps important chart areas
Operating Modes
Mode 0: Full Close
Purpose: Complete position closure Use Cases:
- End-of-day position clearing
- Risk reduction during news events
- Profit-taking on completed strategies
Example: You have a 1.5 lot EURUSD position. The EA closes the entire 1.5 lots.
Mode 1: Fixed Lots
Purpose: Consistent lot-based scaling Use Cases:
- Systematic profit-taking
- Grid trading management
- Fixed-size position reduction
Example: Set to 0.25 lots. A 1.0 lot position becomes 0.75 lots after execution.
Mode 2: Percentage
Purpose: Proportional position scaling Use Cases:
- Consistent percentage-based profit-taking
- Portfolio risk management
- Scalable across different position sizes
Example: 10% setting on a 2.0 lot position closes 0.2 lots, leaving 1.8 lots.
Mode 3: Profit Based
Purpose: Performance-adjusted scaling Use Cases:
- Adaptive profit-taking
- Performance-based risk management
- Dynamic position sizing
How it works:
- Analyzes last 3 days of trading performance
- Calculates profit factor based on recent success
- Adjusts closure percentage accordingly
- Better performance = larger closures
Example: Base 10% setting with good recent performance might close 15% of position.
Dashboard Overview
Status Section
- Status: Shows “Active” when EA is running properly
- Broker: Current broker name
- Mode: Current lot calculation mode
- Direction: Position type filter (Buy/Sell/All)
- Symbols: Symbol filter status
- Max Loss: Loss protection setting
- Active Positions: Count of positions matching your filters
Execution Overview
- Last Execution: Timestamp of last position processing
- Next Execution: Scheduled time for next execution
- Next Action: Preview of upcoming action including position details and expected P/L
Recent Activity
- Transaction History: Last 3 position closures
- P/L Information: Profit/loss for each closure
- Color Coding: Green for profits, red for losses
Advanced Configuration
Multi-EA Environments
When running multiple EAs:
- Use Magic Number filtering to isolate specific EA trades
- Set different execution times to avoid conflicts
- Monitor total account exposure across all EAs
Grid Trading Integration
For grid-based strategies:
- Set Mode 1 (Fixed Lots) to close specific grid levels
- Use position selection “Bottom” to close oldest grid levels first
- Set appropriate interval to match grid scaling strategy
News Trading Setup
For news-based profit-taking:
- Use Fixed Time mode set to major news times
- Configure higher percentage closure (25-50%)
- Enable maximum loss protection
- Monitor dashboard for market status
Multi-Symbol Portfolios
For diverse portfolios:
- Use Symbol Filter to group related pairs
- Run multiple EA instances with different symbol groups
- Coordinate execution times to manage overall exposure
Troubleshooting
Common Issues and Solutions
EA Not Processing Positions
Symptoms: Dashboard shows positions but no execution occurs Causes & Solutions:
- Market Closed: Wait for market hours or check symbol trading sessions
- No Matching Positions: Review position direction and symbol filters
- Insufficient Position Size: Check minimum lot requirements
- Loss Limit Exceeded: Position loss exceeds MaxLossAmount setting
Failed Order Execution
Symptoms: Error messages in Experts tab Solutions:
- Ensure AutoRetryOrders is enabled
- Check broker connection and account status
- Verify sufficient margin for closing trades
- Increase RetryDelayMs for slower brokers
Dashboard Not Visible
Solutions:
- Check ShowDashboard setting is true
- Adjust DashboardX/Y positions
- Refresh chart (F5)
- Re-attach EA to chart
Incorrect Symbol Processing
Solutions:
- Enable NormalizeSymbols for multi-broker compatibility
- Verify symbol names in SymbolList exactly match broker symbols
- Check Include/Exclude symbol filter settings
Error Codes and Meanings
- Trade Retcode 10009: Requote – EA will automatically retry
- Trade Retcode 10006: Request rejected – Check account permissions
- Trade Retcode 10013: Invalid request – Position may not exist
- Trade Retcode 10018: Market closed – EA will wait for market open
Best Practices
Starting Out
- Test on Demo: Always test configuration on demo account first
- Start Conservative: Begin with 5-10% position closure
- Monitor Closely: Watch first few executions to ensure proper operation
- Single Symbol: Start with one symbol before expanding to multiple
Risk Management
- Set Appropriate Loss Limits: Use MaxLossAmount to prevent closure during drawdown
- Gradual Scaling: Start with small percentages and increase as comfortable
- Market Hours: Ensure execution times align with active trading sessions
- Position Sizing: Consider total portfolio impact of systematic closures
Optimization Tips
- Performance Analysis: Monitor Recent Activity section for effectiveness
- Timing Adjustment: Align execution times with your trading strategy
- Mode Selection: Choose lot mode that matches your trading style
- Filter Refinement: Use symbol and magic filters to target specific trades
Portfolio Integration
- Diversification: Don’t rely solely on automated position management
- Manual Override: Maintain ability to manually close positions when needed
- Strategy Alignment: Ensure EA settings complement your overall trading strategy
- Regular Review: Periodically assess EA performance and adjust settings
Frequently Asked Questions
Q: Does the EA work with all brokers?
A: Yes, the EA includes advanced broker compatibility features including automatic retry logic, symbol normalization, and execution mode detection. It works with both hedging and netting accounts.
Q: Can I run multiple instances of the EA?
A: Yes, you can run multiple instances with different configurations. Use Magic Number filters to prevent conflicts between instances.
Q: What happens if my internet connection drops?
A: The EA will resume normal operation when connection is restored. Missed execution times will be rescheduled for the next interval.
Q: Does the EA close profitable positions only?
A: No, the EA processes positions regardless of profit/loss status. Use the MaxLossAmount parameter to skip positions with significant losses.
Q: Can I use this with scalping strategies?
A: Yes, set short intervals (1-4 hours) and use percentage mode for quick profit-taking. Ensure your broker allows frequent automated trading.
Q: How do I backup my EA settings?
A: Save your chart template after configuring the EA. You can also note down parameter values in a separate document.
Q: What’s the difference between Bottom and Top position selection?
A: Bottom selects the oldest open position (FIFO), while Top selects the newest position (LIFO). Bottom is typically preferred for systematic profit-taking.
Q: Can the EA handle micro lots?
A: Yes, the EA works with all lot sizes including micro lots (0.01). Minimum closure is always 0.01 lots.
Q: Does the EA work on weekends?
A: The EA continues running but will not execute trades when markets are closed. It automatically resumes when markets reopen.
Q: How do I know if the EA is working correctly?
A: Monitor the dashboard for “Active” status, check execution times, and verify Recent Activity shows your expected closures. The Experts tab also logs all EA actions.
Support: For additional assistance, please contact support with your broker name, account type, and specific configuration details.
Updates: Check regularly for EA updates that may include new features and broker compatibility improvements.
—————
⚠️ DISCLAIMER
🚨 TRADING RISK WARNING
Trading foreign exchange, cryptocurrencies, and other financial instruments involves substantial risk and may not be suitable for all investors. You should carefully consider your financial situation and consult with financial advisors before using this software.
KEY RISKS:
- Past performance does not guarantee future results – You may lose some or all of your invested capital – AI predictions are not guaranteed to be accurate – Market conditions can change rapidly and unpredictably – Automated trading systems can malfunction or produce unexpected results
💰 FINANCIAL DISCLAIMER
NO GUARANTEE OF PROFITS:
- This software does not guarantee profits or prevent losses – Results may vary significantly between users – Market conditions affect all trading strategies – Only trade with money you can afford to lose
🔧 TECHNICAL DISCLAIMER
NO WARRANTY:
- Software provided “as is” without warranty – Author not responsible for technical failures – User responsible for proper configuration and usage
🌍 REGULATORY DISCLAIMER
LEGAL COMPLIANCE:
- User responsible for compliance with local regulations – Some jurisdictions restrict or prohibit automated trading – Verify legal status in your country before use – Author not responsible for regulatory violations
📞 SUPPORT DISCLAIMER
SUPPORT LIMITATIONS:
- No guarantee of 24/7 support availability – Support does not include financial advice – Author not responsible for user trading decisions – Documentation and setup guides provided “as is”
🛡️ LIABILITY LIMITATION
The author, developer, and distributor of this software:
- Disclaim all warranties, express or implied – Are not liable for any direct, indirect, or consequential damages – Are not responsible for trading losses or missed opportunities – Provide software for educational and analytical purposes
✅ USER ACKNOWLEDGMENT
By purchasing and using this software, you acknowledge that:
- You have read and understood all risks – You will not hold the author liable for trading results – You understand this is not financial advice – You will trade responsibly and within your means – You accept full responsibility for your trading decisions
📅 EFFECTIVE DATE: This disclaimer is effective as of the date of purchase and use of the software.
🔄 UPDATES: This disclaimer may be updated without notice. Users are responsible for reviewing current terms.
💡 RECOMMENDATION: Start with demo trading