Basic Strategy – Adjustment3 – Calendar

The following EA has been adjusted to incorporate the forex factory calendar.   It has the following key properties:

  • When importing the calendar, it is possible to offset the time by a certain number of hours to ensure that the Forex Factory calendar matches the time of the Broker Server.
  • It is possible to specify a number of minutes before and after a high risk calendar event where trading will not be allowed.
  • It is possible for the EA to ignore all day events.   I do not currently believe that ‘Add Day’ events are added to the forex factory xml file, however it is possible to add these into a historic xml file.
  • When modelling ‘All Day’ events, it is possible to expand the day by a number of hours to cover differences in timezone.

In addition to this an additional script has been provided that imports the calendar events and displays them on a chart.

MQL Code:  BasicStrategy_Adjust3_Calendar
Class: C_Chart_Drawing
Class: C_TradeManagement
Class: C_OPTIMIZATION_LOG
Script: HighlightMissingDays
Script: MakeTradesMoreVisible
Script: ImportCalendarDataAndDisplayOnChart
XML: ffcal_week_history
XML: ffcal_week_history_inc_allday

Add a Comment