Trading Day of Week MT5
The EA implements the idea which supposes that on certain trading days of the week (TDW) the market more often grows and on others - falls. So, it is probably better to buy on certain days, and sell on others. The buy or sell signal is the price "breakout" of the volatility level.
More details about the trading strategy can be found in the book by Larry Williams: "Long-term secrets of short-term trading".
- Monday - "allow" buying/selling on Monday
- Tuesday - "allow" buying/selling on Tuesday
- Wednesday - "allow" buying/selling on Wednesday
- Thursday - "allow" buying/selling on Thursday
- Friday - "allow" buying/selling on Friday
- Hour1 - the initial value of the time interval for entry *
- Hour2 - the final value of the time interval for entry *
- VolatilityFactor - coefficient for calculating volatility
- StopLoss - Stop Loss level of orders in points
- lot - volume (the number of lots for opening)
- MoneyManager - enable/disable money management strategy
- Risk - the maximum loss as a percentage of free margin, that is allowed when closing an unprofitable order
- Slippage - maximum slippage value in points
- Height - the height of the time interval in points, within which the entry is allowed
- Magic - the order ID
- Comment - order comment
*- in case Hour1 is greater than Hour2, Hour2 becomes the initial value of the time interval and Hour1- final.
Table "Optimization parameters"
|Monday...Friday||Trade disabled||Sell and Buy|
*- the values of StopLoss and Height are specified for 5-digit symbols, for 4-digit symbols the StopLoss should be divided by 10.
The default parameters are designed for EURUSD. The file with the parameters for USDJPY is provided in the comments.
When setting the parameter MoneyManager=true, the volume for opening trades is calculated in consideration of the StopLoss and Risk, and the lot parameter is not taken into account. The EA sets the minimum or maximum allowed number of lots if those are exceeded.
Requirements: the EA operation requires at least 6 daily bars.