Discussion of article "MQL5 Wizard techniques you should know (Part 01): Regression Analysis"

 

New article MQL5 Wizard techniques you should know (Part 01): Regression Analysis has been published:

Todays trader is a philomath who is almost always (either consciously or not...) looking up new ideas, trying them out, choosing to modify them or discard them; an exploratory process that should cost a fair amount of diligence. This clearly places a premium on the trader's time and the need to avoid mistakes. These series of articles will proposition that the MQL5 wizard should be a mainstay for traders. Why? Because not only does the trader save time by assembling his new ideas with the MQL5 wizard, and greatly reduce mistakes from duplicate coding; he is ultimately set-up to channel his energy on the few critical areas of his trading philosophy.

Results from our optimisation are presented below. First is the report and equity curve of the best results from trading only with market orders.



Author: Stephen Njuki

 


Hi Stephen, 

Very good article. I made some tests and it returned good results. Looks like we have an encouraging trade system.

I would like to know how can I use input with non-fixed timeframes for optimization.

I've tried to change these lines, but OnInit "returned non-zero code 1" with no error message.

//--- inputs for expert
input string Expert_Title                     ="Regr2"; // Document name
ulong        Expert_MagicNumber               =26034;   //
bool         Expert_EveryTick                 =false;   //
input ENUM_TIMEFRAMES   timeframe             =PERIOD_M5;      //TimeFrame
//--- inputs for main signal
.
.
.
.
int OnInit()
  {
//--- Initializing expert
   if(!ExtExpert.Init(Symbol(),timeframe,Expert_EveryTick,Expert_MagicNumber))
     {
      //--- failed
      printf(__FUNCTION__+": error initializing expert");
      ExtExpert.Deinit();
      return(INIT_FAILED);
     }
//--- Creating signal
.
.
.
.




Can you help me?

 
Guilherme Mendonca #:


Hi Stephen, 

Very good article. I made some tests and it returned good results. Looks like we have an encouraging trade system.

I would like to know how can I use input with non-fixed timeframes for optimization.

I've tried to change these lines, but OnInit "returned non-zero code 1" with no error message.




Can you help me?

Hi, have you received help from Stephen? 
 
Guilherme Mendonca #:


Hi Stephen, 

Very good article. I made some tests and it returned good results. Looks like we have an encouraging trade system.

I would like to know how can I use input with non-fixed timeframes for optimization.

I've tried to change these lines, but OnInit "returned non-zero code 1" with no error message.




Can you help me?

Hello,

Just seeing this. Sorry. This can be a bit tricky because wizard assembled Expert Advisors tend to use and stick to the timeframe of the chart they are attached to. And this is referenced in quite a few different places, not just in the OnInit() function that it seems you're trying to modify. So if your input time frame does not match up with the time frame used and expected in other places (to be the chart time frame), then this is bound to generate errors.

Big picture though, there is a case for reading data and price buffers in more than one time frame so I think in the near future I will look to do an article on how this could be achieved. Thx for your feedback.