Discussion of article "MQL5 Wizard: New Version"

 

New article MQL5 Wizard: New Version is published:

The article contains descriptions of the new features available in the updated MQL5 Wizard. The modified architecture of signals allow creating trading robots based on the combination of various market patterns. The example contained in the article explains the procedure of interactive creation of an Expert Advisor.

Author: MetaQuotes

 

Shouldn't the Symbol for the second Stochastic oscillator on the final screen of Signal properties in step 2 read "EURJPY" and not "current"?!?!

Stochastic Oscillator
  • votes: 8
  • 2010.01.26
  • MetaQuotes Software Corp. | English Russian Chinese Spanish Portuguese
  • www.mql5.com
The Stochastic Oscillator compares where a security’s price closed relative to its price range over a given time period.
 

Hi Victor,

Seems nice, but I guess I found an error in SignalStoch.mqh : 

int CSignalStoch::LongCondition()
  {
   int result=0;
   int idx   =StartIndex();
   //--- check direction of the main line
   if(DiffMain(idx)>0.0)
     {
      //--- the main line is directed upwards, and it confirms the possibility of price growth
      if(IS_PATTERN_USAGE(0))
         result=m_pattern_0;      // "confirming" signal number 0
      //--- if the model 1 is used, look for a reverse of the main line
      if(IS_PATTERN_USAGE(1) && DiffMain(idx+1)<0.0)
         result=m_pattern_1;      // signal number 1
      //--- if the model 2 is used, look for an intersection of the main and signal line
      if(IS_PATTERN_USAGE(2) && DiffMainSignal(idx)>0.0 && DiffMainSignal(idx+1)<0.0)
         result=m_pattern_2;      // signal number 2
      //--- if the models 3 or 4 are used, look for divergences
      if((IS_PATTERN_USAGE(4) || IS_PATTERN_USAGE(5)))  should be  ((IS_PATTERN_USAGE(3) || IS_PATTERN_USAGE(4))) 
        {
         //--- perform the extended analysis of the oscillator state
         ExtStateStoch(idx);
         //--- if the model 3 is used, look for the "divergence" signal
         if(IS_PATTERN_USAGE(3) && CompareMaps(1,1))      // 0000 0001b
            result=m_pattern_3;   // signal number 3
         //--- if the model 4 is used, look for the "double divergence" signal
         if(IS_PATTERN_USAGE(4) && CompareMaps(0x11,2))   // 0001 0001b
            return(m_pattern_4);  // signal number 4
        }
     }
//--- return the result
   return(result);
  }

  1. Can you please explain how CompareMaps is working. I have to admint I do not understand that proc.
  2. I don't understand neither the call to IS_PATTERN_USAGE define in ExpertSignal.mqh

#define IS_PATTERN_USAGE(p)          ((m_patterns_usage&(((int)1)<<p))!=0)

 

 

Regards,

Olivier
 

 

I would like to see some SignalCustom.mqh sample. I'm having problems to understand how I should use it. I'm trying to learn how to add my own indicators in MQL5 Wizard.

 

tsaktuo 

MQL5 Wizard: Creating Expert Advisors without Programming
  • 2011.01.11
  • MetaQuotes Software Corp.
  • www.mql5.com
Do you want to try out a trading strategy while wasting no time for programming? In MQL5 Wizard you can simply select the type of trading signals, add modules of trailing positions and money management - and your work is done! Create your own implementations of modules or order them via the Jobs service - and combine your new modules with existing ones.
 
och:

Hi Victor,

Seems nice, but I guess I found an error in SignalStoch.mqh : 

 
Thank you. Fixed.
 
tsaktuo:

I would like to see some SignalCustom.mqh sample. I'm having problems to understand how I should use it. I'm trying to learn how to add my own indicators in MQL5 Wizard.

 

tsaktuo 

Don't worry. This sample will be published but a bit later. Approximately for a two weeks.
 
uncleVic:
Thank you. Fixed.

uncleVic,

You're welcome, but can you please :

  1. Explain how CompareMaps is working (SignalStoch.mqh). I have to admint I do not understand that proc.
  2. I don't understand neither the call to IS_PATTERN_USAGE define in ExpertSignal.mqh

Regards,

Olivier 

 

 
och:
  1. Explain how CompareMaps is working (SignalStoch.mqh). I have to admint I do not understand that proc.
  2. I don't understand neither the call to IS_PATTERN_USAGE define in ExpertSignal.mqh

1. My English is too bad so that I could explain it. Will be written, in which the details of the algorithms.   (With Google Translator)

2. Macro evaluates to true if the value of a specified bit in a variable m_patterns_usage equals 1, otherwise is false.

                    (With Google Translator)

P.S. If you are content with my Google-English, answer the other questions.


 

The use of SignalCustom / iCustom would be very great, and powering the use of the wizard for the programmers who want

use Wizard for making EAs, which is a good choice instead of writing the code from zero.

 

But as i can see, it's not an easy matter to make a SignalCustom, because are involved many libraries/include and the

structure of the Wizard itself.

I can suppose that the file to modify in order to add an "iCustom" functionality is in ExpertSignals.mqh,

and of course the custom signal mqh itself, but maybe other libraries are involved.

 

Of course, an article with the example of how to integrate our own's custom signal, would be excellently very helping.

 

Thank you for ay further instructions 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Chart Constants / Types of Chart Events
  • www.mql5.com
Standard Constants, Enumerations and Structures / Chart Constants / Types of Chart Events - Documentation on MQL5
 

Missing Trading Modules 

 

On the website one of the signals is called 'Signals based on crossover of main and signal MACD lines'

When i use MQL5 there this option is not available the only option is 'signals of oscillator MACD'

How do i get these modules 

html { height:100%; overflow:auto; _overflow:scroll; } body { padding:0; color:#626363; font-family:Tahoma,Verdana,Arial,Helvetica,sans-serif; font-size:.8em; height:100%; } div { margin:0; padding:0; } form { margin:0; padding:0; } td { font-size:12px; } th { font-size:12px; } p { margin:0; padding:0; margin-bottom:12px; } input { margin:0; } input.button { font-family:Tahoma,Verdana,Arial,Helvetica,sans-serif; font-size:1em; font-weight:normal; padding:2px; } h1 { margin:0; padding:0; font-size:1.6em; font-weight:bold; } h2 { margin:0; padding:0; font-size:1.4em; font-weight:bold; margin-bottom:5px; margin-top:5px; } h3 { margin:0; padding:0; font-size:1.2em; font-weight:bold; margin-top:6px; margin-bottom:6px; } h4 { margin:0; padding:0; } ul { list-style-type:square; } a { color:#42639C; } a:visited { color:#42639C; } a:link { color:#42639C; } img { border-width:0; }

 

Hi,

based on the following quotation:

Combining Signals in the EA

To create our own Expert Advisor, it is necessary first of all to decide on what instrument and in what timeframe we will trade. Second, we should select Signals on the basis of indicators that we will use for trading.


Is it possible to trade on 2 symbols? Based on trading module results, to buy SymbolA and to sell SymbolB simultaneously?

Peter