Rejoignez notre page de fans
- Vues:
- 614
- Note:
- Publié:
- 2025.05.02 05:51
- Mise à jour:
- 2025.05.02 13:45
-
Besoin d'un robot ou d'un indicateur basé sur ce code ? Commandez-le sur Freelance Aller sur Freelance
Key Features:
- Stochastic Crossover Strategy: Enters a Buy position when the Stochastic %K line crosses above the %D line, and enters a Sell position when the %K line crosses below the %D line.
- Adjustable Stochastic Periods: Users can customize the %K period ( StochKPeriod ), %D period ( StochDPeriod ), and slowing period ( Slowing ) according to their preferences.
- Entry Cooldown: The CooldownMinutes feature prevents the EA from executing new trades within a specified time period after a previous trade, helping to avoid whipsaws and impulsive entries.
- Fixed Stop Loss and Take Profit: Each trade is equipped with adjustable Stop Loss and Take Profit in points ( StopLossPoints and TakeProfitPoints ). In the current configuration, both are set at 300 points.
- Simple Risk Management: The lot size for each trade is currently set at a fixed value of 0.1 for easy risk management.
- Automatic Position Closure: The EA automatically closes all open positions before opening a new position based on an opposing Stochastic crossover signal.
- Prevention of Duplicate Positions: The EA checks for the existence of open positions before making a new entry in the same direction.
- Trade.mqh Library Implementation: Utilizes the Trade.mqh library for efficient trade execution.
Adjustable Input Parameters:
- RiskPercent : Percentage of risk per trade (currently not used in lot calculation, lot is fixed).
- StochKPeriod : Period for the Stochastic %K line.
- StochDPeriod : Period for the Stochastic %D line.
- Slowing : Slowing period for the Stochastic.
- CooldownMinutes : Time interval (in minutes) after a trade before a new entry is allowed.
- StopLossPoints : Stop Loss value in points.
- TakeProfitPoints : Take Profit value in points.
How to Use:
- Place this EA file in the MQL5\Experts folder of your MetaTrader 5 platform.
- Drag and drop the EA onto your desired currency pair chart.
- Adjust the input parameters according to your preferences and trading strategy.
- Ensure that the Auto Trading feature is enabled on your MetaTrader 5 platform.
Important Notes:
- This script is provided "as is" without any guarantee of performance.
- Thorough backtesting and testing on a demo account are recommended before using it on a live account.
- Proper risk management is crucial in trading. While this EA has simple risk management features, you may need to further customize it according to your risk tolerance and account size.
- Past performance is not indicative of future results.

This indicator calls 3 other subwindow indicators. All files go in your Indicators folder.

The EA opens positions randomly (50/50 chance for Buy or Sell) when no position is open.

This Expert Advisor (EA) helps traders manage risk by automatically adjusting position sizes and stop-loss levels based on market volatility, using the Average True Range (ATR) indicator. The EA calculates the optimal position size for each trade according to a user-defined risk percentage and the current ATR value, ensuring consistent risk exposure across all market conditions. It also offers an ATR-based stop-loss option to adapt to volatility, while employing a simple moving average crossover strategy to open buy trades. Ideal for traders seeking to automate risk management without complex trading logic, this EA prioritizes account protection and simplifies the trading process.

Indicator edition for new platform.