Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Exp_Ang_Zad_C_Tm_MMRec - MetaTrader 5 Expert - MT4/MT5 Resources

author EAcpu | 2 reads | 0 comments |

Exp_Ang_Zad_C_Tm_MMRec - expert for MetaTrader 5

Exp_Ang_Zad_C_Tm_MMRec - expert for MetaTrader 5

Exp_Ang_Zad_C_Tm_MMRec - expert for MetaTrader 5

The trading system uses the Ang_Zad_C trend following indicator, which allows you to set strict trading intervals and change the volume of upcoming trades based on the results of previous trades.

When the indicator cloud changes color, a trading decision is made.

Trading times can be specified in the input parameters to trade at specified intervals:

 input boolean timetrading= true ; //Allow trading by time interval
Enter hour start H=ENUM_HOUR_0; //Transaction start (hour)
Enter the minute StartM=ENUM_MINUT_0; //Transaction starts (minutes)
Enter the end of hour H=ENUM_HOUR_23; //End of transaction (hour)
Enter minutes EndM=ENUM_MINUT_59; //End of transaction (minutes)

Provide two hour and minute variables for each trade start time and trade end time.

The default settings enable the Expert Advisor to trade for the entire trading session starting from 0:00, while all positions are closed at 23:59.

If the start time in the EA settings is later than the specified trade end time, the EA will close the position at the specified time the next day.

Add input EA variable block for managing the trading volume of the opened position:

 Input unit buying loss MMTriger= 2 ; //Reduce the number of MM's loss buying transactions
Input unit selling loss MMTriger= 2 ; //The number of loss selling transactions is reduced by MM
Enter double small_MM= 0.01 ; // share of financial resources of the margin used in the trade in case of loss
Enter double MM= 0.1 ; //Under normal trading conditions, the share of financial resources used in the transaction is the margin
Enter the margin mode MMMode=LOT; //Lot calculation method

In the case of such inputs, if the last two trades in one direction were losing, the EA will open the next trade in the same direction with a trading volume of 0.01 lots. If at least one of the last two trades was not a loss, the position is 0.1.

This Expert Advisor requires the compiled indicator file Ang_Zad.ex5 in order to run. Place it in <terminal data folder>\MQL5\Indicators.

The input parameters of the default Expert Advisor have been used during testing, as shown below. Stop Loss and Take Profit were not used during testing.

Exp_Ang_Zad_C_Tm_MMRec - expert for MetaTrader 5

Figure 1. Example of trade on chart. Trading only within the time interval set in the input has been disabled

2017 EURUSD H12 test results:

Exp_Ang_Zad_C_Tm_MMRec - expert for MetaTrader 5

Figure 2. Test result graph

Exp_Ang_Zad_C_Tm_MMRec - expert for MetaTrader 5

Figure 3. Example of trade on chart. Enable trading only within the time interval set in the input


Attachment download

📎 tradealgorithms.mqh (229.96 KB)

📎 ang_zad_c.mq5 (18.43 KB)

📎 exp_ang_zad_c_tm_mmrec.mq5 (20.11 KB)

Source: MQL5 #21439

Verification code Refresh