Basket_Stats_Time.mq4 MT4 Indicator for Forex Currency Basket Trade Analysis

Basket_Stats_Time.mq4 is a Metatrader 4 indicator designed to help forex traders understand where their profits and losses are coming from. Many times it is useful to know what time of day a particular trading system or strategy is profitable, and when it is not. However, the problem is clouded when a basket of currencies is traded in a single forex account. To offset this problem and put the numbers on the side of the trader, this new Metatrader indicator was created to show profit and loss by currency symbol and by hour. Breaking out profit and loss by currency symbol was done in the original Basket_Stats Metatrader indicator.

However the issue of time brings a whole new dimension of analysis to this indicator. By tracking the profitable periods, it may be possible to enhance performance by only opening or closing trades during those times. Once a track record of results has been built up, performing the hour breakout analysis done by Basket_Stats_Time, one can find some interesting patterns in the data. Here is an example taken from SnowRoller version 1.005.

Basket_Stats_Time.mq4 MT4 indicator for forex currency basket trade analysis

While the overall record is negative 175 (lower right corner in Magenta) it is clear that there are pockets of profitability that may be exploited for overall profit. It appears that the hours from 2-9 AM (for opened trades) holds a great deal of promise. By eliminating the unprofitable hours, the total increases from -175 on the open balance, to +243! Snow Roller MQ4 includes settings to limit the starting and ending trade times. It's clear from just a cursory study of the picture above, that setting Snow Roller's useTime1Trading = true; and setting the Time1Start and Time1Stop variables to 200 and 1000 respectively, that the expert advisor should start performing much better.

The other information that may be gleaned from this report is the symbol profitability at a given time. Removing just one of the poorest performers for the period, GBPJPY from consideration would further improve results when combined with time limitations on trade opening. GBPJPY was responsible for -113 during the best trading hours (2AM-10AM).

While the information provided by this Metatrader indicator may prove valuable when trading a basket of currencies, and even more so when multiple trading systems are used on a single account, it is important to keep in mind sample size. The picture posted above consists of about two weeks of history or nine trading sessions. This means that only nine sessions of each hour is contained in the data. Most statistical studies call for 20 or 30 samples at minimum in order to be statistically valid. Thus tests should be run over a longer period so that the proper analysis can be performed.

A second version of the Metatrader indicator named Basket_Stats_Time_Sub.mq4 has been added that differs from the original in that it can be placed in a subplot. This was suggested by a member of Forex Factory due to the relatively large amount of screen space required for this MT4 indicator. Other than plotting in a subplot, the function of the indicators is exactly the same.

The MT4 MQL4 code is attached below for free download and use. Download free Basket_Stats_Time.mq4 or Basket_Stats_Time_Sub.mq4 MT4 indicator now! You may post this MT4 indicator to other sites, but if you do, you must post a link to this page directly and you may not sell it or the source code. You are otherwise free to copy, use and distribute these MT4 indicators for non-commercial use. Place the Basket_Stats_Time.mq4 or Basket_Stats_Time_Sub.mq4 file in your ..\experts\indicators\ folder. Please see the MQL4 code for additional licensing information.

Follow patrickmwhite on Twitter

For updates