• Overview
  • Reviews
  • Comments (7)
  • What's new

Trading Day of Week

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. The stop loss level is fixed, the take profit level is absent.

More details about the trading strategy can be found in the book by Larry Williams: "Long-term secrets of short-term trading".


Input Parameters

  • Magic - the order ID
  • Slippage - maximum slippage value 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
  • StopLoss - Stop Loss level of orders in points
  • VolatilityFactor - coefficient for calculating volatility
  • 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


Money Management

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.


Optimization

Tick modeling mode during testing and optimization - all ticks, period - Daily. It is recommended to perform optimization over a period no less than 1 year.

Optimized parameters: StopLoss, VolatilityFactor, Monday, Tuesday, Wednesday, Thursday, Friday.

The VolatilityFactor parameters takes values from 0.4...2.5.

The parameters Monday...Friday take values: -1, 0, 1, 2:

  • "-1" - only selling is allowed on this day of the week;
  • "0" - trading is not allowed on this day of the week;
  • "1" - only buying is allowed on this day of the week;
  • "2" - both buying and selling are allowed on this day of the week.

The optimization should be started by defining the parameters Monday...Friday. For this, set the parameters VolatilityFactor=1.5 and StopLoss=1000, parameters Monday...Friday=0. The optimization starts consequently from Monday (start -1, step 1, stop 2). The best result is stored in Monday. Similarly, the optimization is performed for Tuesday, and so on up to Friday. Once the Monday...Friday parameters are defined, the VolatilityFactor and StopLoss parameters should be optimized (see. the table).

Table "Optimization parameters"

Parameter Start Step Stop
VolatilityFactor 0.4 0.1 2.5
StopLoss * 100 100 2000
Monday...Friday -1 1 2

*- the value of StopLoss is specified for 5-digit symbols, for 4-digit symbols the StopLoss should be divided by 10.

The values of the input parameters for some symbols are given in the screenshots.


EA Requirements

The EA operation requires at least 6 daily bars.

When trading on different symbols set different values for the Magic parameter.

No reviews
Version 1.4 - 2016.07.13
Added entry time
Version 1.3 - 2016.04.08
More convenient selection of variable values: Monday, Tuesday, Wednesday, Thursday, Friday. Now the values of thees variables can be selected from a drop-down list: Trade disabled, Sell, Buy, Sell and Buy.
When optimizing: start- Trade disabled, stop- Sell and Buy.