Trading Systems: Using MetaTrader 4 for a Time Based Pattern Analysis

 

New article Using MetaTrader 4 for a Time Based Pattern Analysis has been published:

Time based pattern analysis can be used in the currency market to determine a better time to enter a trade or time in which trading should be avoided at all. Here we use MetaTrader 4 to analyze history market data and produce optimization results that can be useful for application in mechanical trading systems.

Reading posts at the Automated Trading Championship forum and interviews leads always to a lot of interesting information buried in a lot of noise.

The arguments provided by William Boatright (Wackena) in his interview, https://championship.mql5.com/2012/en/2007 aroused my attention for the time based approach used to chose one single hour of the day to take one single trade in a daily swing trading technique.

So I started gathering information about the time based entry approach and decided to realize a system that should be able to verify the real effectiveness of this technique.

A code attached to the article is realized without a real exit strategy just to give you an example of what kind of time patterns you could expect using MetaTrader for data mining and statistical investigation over a relatively long data sequence.

Author: Giampiero Raschetti

 

Hi Giampiero,

Can't find the code ?

Great article.

Regards

Erik

 
Erik.VH wrote:

Hi Giampiero,

Can't find the code ?

Great article.

Regards

Erik

 

Just a misunderstanding in publication work flow.
It will be attached as soon as possible.
thanks and best regards
Giampiero
 
giaras:
Just a misunderstanding in publication work flow.
It will be attached as soon as possible.
thanks and best regards
Giampiero

Done.
 
There is no file with EA attached to this article again.
 
The actual Time Based Stop Loss is incorrect and it does not work for more than 23 hours.
This code should correct the problem considering closed trading hours too.
It should be placed in BUY and SELL position.

int k=0;
while(k < TradeHoldingPeriod)
{
  if(iTime(NULL,PERIOD_H1,k) > OrderOpenTime())
    k++;
  else break;
}
if(UseTimeBasedStopLoss && k >= TradeHoldingPeriod && OrderProfit() < 0 )
{
  if(SignalCount > 0)
    OrderClose(OrderTicket(),OrderLots(),Ask,3,Violet);
  return(0);
}
 
Giampiero Raschetti your timezone idea is actually works ! I also in my practice looked such good zones for opening of trade positions ! Please contact me for discussion ... very very -))
Reason: