ChallengeBot
- Uzman Danışmanlar
- Maksim Kononenko
- Sürüm: 1.0
Tested on pair EURUSD
Prop Firm Challenge Features
This is the core highlight of this Expert Advisor. It ensures strict adherence to proprietary trading firm rules:
- Daily Loss Limit: The bot monitors all closed trades for the current day and compares the real-time Equity with the starting daily balance. If the drawdown exceeds the DAILY_LOSS_LIMIT , the bot immediately closes all positions, deletes pending orders, and halts trading to protect the account.
- Pass Criteria (Profit Target): Once the account Equity reaches the predefined target ( PASS_CRITERIA ), the bot secures the profit by closing all active trades and stops execution, signaling that the challenge goal has been achieved.
Risk Management
- Dynamic Lot Sizing: The CalculateLotSize function automatically determines the trade volume based on the percentage of equity at risk per trade ( RISK_PER_TRADE ).
- Adaptive Position Sizing: If the distance to the Stop Loss is large, the lot size decreases. If the distance is small, the lot size increases. This ensures you never lose more than the specified X% of your deposit on any single trade.
- Margin Check: Before sending an order, the bot verifies if there is sufficient free margin to open the position, preventing execution errors.
Position Management and Exit
- Stop Loss (SL): For Buy orders, the SL is placed at the local Lowest Low . For Sell orders, it is placed at the local Highest High . This follows a classic "channel breakout" exit logic.
- Trailing Stop: The EA constantly trails the SL level following the price movement based on recent price extremes. If the price reverses and breaks these levels, the position is closed to lock in profit.
- ATR Filter: The strategy utilizes the Average True Range (ATR) indicator to modify the Stop Loss only when the price has moved significantly, reducing unnecessary server requests and "noise" modifications.
Core Trading Logic
The strategy is built on identifying price extremes over a specific period ( ENTRY_PERIOD ).
- Long Entry (Buy): The bot places a Buy Stop pending order at the Highest High of the recent N periods. It anticipates trend continuation once the resistance level is broken.
- Short Entry (Sell): The bot places a Sell Stop pending order at the Lowest Low of the recent N periods, expecting further decline upon breaking the support level.
- Order Refresh: On every new bar ( BarOpen() ), old pending orders are deleted and replaced with new ones based on the most up-to-date price extremes.
Disclaimer
Risk Warning: Trading foreign exchange and commodities on margin carries a high level of risk and may not be suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in foreign exchange, you should carefully consider your investment objectives, level of experience, and risk appetite.
Backtesting & Results: Past performance is not indicative of future results. While this EA includes "Prop Firm Challenge" protection features, it does not guarantee a pass. The Daily Loss Limit feature is subject to market liquidity and potential slippage during high volatility or news events. Always test on a demo account first to understand the breakout logic and risk settings.
