DailyTrader (DT) is a trading robot designed to trade on the breakout of important resistance/support levels.
It typically executes one or two trades per day.
The present version, with default settings, is most efficient on GBPUSD, USDJPY and EURUSD pairs, provided that the spread is not larger than 2 pips.
Please, do backtest with your broker's quotes on "Every Tick" mode (possibly with real ticks, 99% quality), before using the robot on a real account.
- It only uses pending orders.
- Strict stop-loss always used.
- Automatic Trailing-Stop trend management strategy.
- Solid risk/money management.
- Timeframe is irrelevant, though it must be shorter than D1.
- No grids, no arbitrage.
- Martingale can be optionally enabled.
- No technical indicators are employed.
- Few parameters. Easy to configure and optimize.
- Low spread ECN brokers (less than 2 pips)
- Maximum_Spread: if the spread gets higher than this limit (in pips) then the trading is suspended. The EA will wait for ten minutes before checking again the spread level to re-activate trading.
- TrailingStop_Mode: In FIXED_TRAILING_STOP mode (default) the following two parameters are read from the pips-expressed version, while in the ATR_TRAILING_STOP mode they are read from the ATR-expressed version (so the behavior is more dynamic).
- TrailingStop_Distance: the initial distance of the stop-loss (in pips or as ATR-factor).
- TrailingStop_Min_Profit: the minimum profit (in pips or as ATR-factor) at which the stop-loss starts to move.
Recall that on 5-digits brokers 1 pip = 10 point, while on 4-digits brokers 1 pip = 1 point
- Trade_on_Monday: enable/disable trading activity on Monday
- Trading_Time_Slots: the EA is allowed to trade only between each (comma-separated) pair of times given in the form hh:mm,hh:mm,...
- Risk_Management_Enabled: if true then the lots are automatically determined so to fit the required single trade risk.
- Fixed_Lot: fixed order lot when risk management is disabled ( Risk_Management_Enabled = false).
The next 3 parameters are ignored if Risk_Management_Enabled = false.
- Single_Trade_Risk_Percentage: the maximum admitted loss in a single trade (as a percentage of the equity). If the minimum amount of a lot permitted by the broker is too high to satisfy this constraint then trading is suspended (no new order is placed).
- Martingale_Factor: (1=no martingale) factor multiplying the Single_Trade_Risk_Percentage at each trade as long as a drawdown is occurring.
- Martingale_MAX_RISK: The maximum value the single trade risk can achieve when the martingale is active.
- Min_Free_Margin_For_Trading: the minimum amount of free margin (as a percentage of the equity) to allow DT to trade. When the free margin drops below this value, trading is suspended.
- Max_Free_Margin_Per_Trade: the maximum percentage of the free margin that DT can allocate to place an order. This poses a limit to the maximum lot amount.
- Minimum_Equity_For_Trading: trading is suspended when the equity drops below this value.
These parameters are effective in the Strategy Tester only:
- Strategy_Tester_Working_Mode: allows user to choose between the "Every Tick" and the (much faster) "Open Prices Only" Strategy Tester mode.
- Commission_Per_Lot: broker commission (if any) for one lot order. This allows DT to be optimized taking commissions into account, by selecting "Optimized parameter: Custom" in the "Testing" tab of the "Expert Properties" window.
- Magic_Number: number identifying orders.
- Order_Comment: Optional comment added to each order.
Warning: as soon as a drawdown occurs, the risk on the single trade is multiplied by the Martingale_Factor. At each subsequent trade the risk is multiplied again and again (but it never gets higher than Martingale_MAX_RISK). Only when the drawdown is fully recovered the risk gets back to its normal value.
Leave the default Martingale_Factor=1 to disable martingale.
Note that the drawdown is determined by considering only the orders placed with the given magic number and Forex pair. It is not the account overall drawdown.
- Trading on Monday can now be excluded/included.
- the occurrence of a "no enough money" condition due to a margin call is now checked and prevented by the EA.
- Minor bugs fixed.
- The "high spread" state minimum duration is reduced to 5 min.
- Computation of the resistance level improved by taking spread into account.
- When automatic risk management is disabled (Risk_Management_Enabled = false), the actual single trade risk is now correctly displayed as it follows from the FixedLot value set by the user.
- Small bug fixed in profit factor and drawdown calculation.
- Added TrailingStop_Distance (ATR) and TrailingStop_Min_Profit (ATR) parameters. They are the ATR factors that determine dynamically the initial distance and the minimum profit, respectively, at which the StopLoss starts to move.
- MaxSpread parameter introduced. As a further security check, as soon as the spread goes above this limit (given in pips) the pending orders are deleted and no new order is placed for the next 10 minutes.
- Now pending orders are always deleted when the EA goes into the "Trading is OFF" state. They are deleted also when the EA is unloaded from the chart, when their risk is above the desired limit, or if the settings are changed.
- Trading_Time_Slots string parameter added. Trading time can now be expressed as a series of comma-separated "time slots". For example, if the trader wants to allow trading from 7:30 a.m. to 11 a.m. and then from 6 p.m. to 9:30 p.m., then she/he could set Trading_Time_Slots = "07:30,11:00,18:00,21:30".
- Trade_From_Hour and Trade_To_Hour parameters removed.
- Small bugs fixed in orders management.
Testing on M1 timeframe bars is recommended for best accuracy.
- Levels calculation slightly improved.
- The availability of history bars is now checked.
- On chart text visibility improved.
- Minor internal improvements done.