If you're diving into the world of trading, you're probably on the lookout for effective systems to enhance your strategies. One such system is the Ang_Zad_C trend-following indicator, which allows you to set specific trading intervals and adjust the volume of your trades based on your previous performance.
So, how does it work? The system triggers trade decisions when the indicator cloud changes color, offering a clear signal for action.
Setting Your Trading Time
You can easily customize your trading hours using the input parameters. Here’s how:
input bool TimeTrade=true; //Permission to trade by time interval input HOURS StartH=ENUM_HOUR_0; //Trading start (hours) input MINUTS StartM=ENUM_MINUT_0; //Trading start (minutes) input HOURS EndH=ENUM_HOUR_23; //Trading end (hours) input MINUTS EndM=ENUM_MINUT_59; //Trading end (minutes)
With two variables for start and end times, you have complete control over your trading schedule. By default, this Expert Advisor (EA) is set to trade from midnight until 23:59. If your start time exceeds your end time, the EA will close any open positions the following day at the specified time.
Managing Trade Volumes
The EA also allows you to manage the volume of your trades based on recent performance. Here are the key input parameters:
input uint BuyLossMMTriger=2; //Number of loss-making Buy trades to decrease MM input uint SellLossMMTriger=2; //Number of loss-making Sell trades to decrease MM input double Small_MM=0.01; //Financial resources used in trades after losses input double MM=0.1; //Financial resources for normal trades input MarginMode MMMode=LOT;//Lot size calculation method
With these settings, if the last two trades in a direction are losses, the EA will open the next trade in that direction with a volume of 0.01 lots. If at least one of the last two trades is profitable, the volume increases to 0.1 lots.
To use this Expert Advisor, you'll need the compiled indicator file Ang_Zad.ex5. Make sure to place it in your <terminal_data_folder>\MQL5\Indicators.
During testing, the default input parameters were utilized, with no Stop Loss or Take Profit settings applied. Check out the results:

Fig. 1. Examples of deals on the chart. Trading only in the time intervals set in the inputs is disabled
Here are the testing results for 2017 on the EURUSD H12:

Fig. 2. Test results chart

Fig. 3. Examples of deals on the chart. Trading only in the time intervals set in the inputs is enabled
Related Posts
- Harnessing MQL5 Wizard for Trading Signals: 3 Black Crows & 3 White Soldiers with MFI
- Mastering the Moving Average EA for MetaTrader 5: A Trader's Guide
- Mastering Trading Signals with MQL5 Wizard: Bullish and Bearish Engulfing Strategies
- Creating an Expert Advisor for Dark Cloud Cover and Piercing Line Patterns with CCI Confirmation
- Creating a Stochastic-Based EA for Hammer and Hanging Man Patterns in MetaTrader 5