Questions on MQL5 Wizard and standard library of trading classes - page 7

 

Yep, so the newly created advisers by the master don't work at all!?

2011.08.08 19:08:30 Core 1 connection closed
2011.08.08 19:08:30 Core 1 log file "D:\Program\MetaTrader 5\Tester\Agent-127.0.0.1-3000\logs\20110808.log" written
2011.08.08 19:08:30 Core 1 tester stopped because OnInit critical error
2011.08.08 19:08:30 Core 1 2011.0101 00:00:00 OnInit: error initializing indicators
2011.08.08 19:08:30 Core 1 2011.01 00:00:00 CExpert::InitIndicators: error initializing indicators of money object
2011.08.08 08 19:08:30 Core 1 2011.01.01 00:00:00 CExpertBase::InitIndicators: parameters of setting are not checked
20112011.08.08 19:08:30 Core 1 2011.01.01 00:00:00 CExpertBase::SetOtherSeries: changing of timeseries is forbidden
2011.08.08 19:08:30 Core 1 2011.01.01 00:00:00 CExpertBase::SetPriceSeries: changing of timeseries is forbidden
2011.08.08 19:08:302011.08.08 19:08:30 Core 1 EURUSD,H4: history begins from 2010.01.04 00:00
2011.08.08 19:08:30 Core 1 EURUSD,H4: history cache reserved for estimated 2472 bars
2011.08.08 19:08:30 Core 1 EURUSD: contains 367194 M1 records of beginning data from 2010.01.04 00:00 to 2010.12.31 22:59
2011.08.08 19:08:30 Core 1 EURUSD: contains 367194 M1 records of beginning data from 2010.01.04 00:00:00.19:08:30 Core 1 EURUSD,Daily: history begins from 2010.01.04 00:00
2011.08.08 19:08:30 Core 1 EURUSD,Daily: history cache reserved for estimated 412 bars
2011.08.08 19:08:30 Core 1 EURUSD: contains 367194 M1 records of beginning data from 2010.01.04 00:00 to 2010.12.31 22:59
2011.08.08 19:08:30 Core 1 Trailing_FixedPips_ProfitLevel=400
2011.08.08 19:08:30 Core 1 Trailing_FixedPips_StopLevel=200
2011.2011.08.08 19:08:30 Core 1 Signal_2_AC_Weight=0.30
2011.08.08 19:08:30 Core 1 Signal_1_AC_Weight=0.30
2011.08.082011.08.08 19:08:30 Core 1 Signal_0_AC_Weight=0.30
2011.08.08 19:08:30 Core 1 Signal_TakeLevel=400
2011.08.08 19:08:30 Core 1 Signal_StopLevel=200
2011.2011.08.08 19:08:30 Core 1 Signal_ThresholdClose=80
2011.08.08 19:08:29 Core 1 Signal_ThresholdOpen=20
2011.2011.08.08 19:08:29 Core 1 Expert_Title=Master03
2011.08.08 19:08:29 Core 1 EURUSD,H1: testing of Experts\Master03.ex5 from 2011.01.01.01 00:00 to 2011.08.01 00:00 with inputs:
2011.08.08 19:08:29 Core 1 EURUSD,H1 (MetaQuotes-Demo): 1 min OHLC ticks generating. OnTick executed on the bar begin only
2011.08.08 19:08:29 Core 1 EURUSD,H1: history begins from 2010.01.04 00:00
2011.08.08 19:08:29 Core 1 EURUSD,H1: history cache reserved for estimated 9891 bars
2011.08.19:08:29 19:08:29 Core 1 EURUSD: contains 367194 M1 records of beginning data from 2010.01.04 00:00 to 2010.12.31 22:59
2011.08.08 19:08:29 Core 1 EURUSD: history synchronized from 1993.05.13 to 2011.08.05
2011.08.08 19:08:29 Core 1 EURUSD: load 27 bytes of history data to synchronize
2011.2011.08.08 19:08:29 Core 1 EURUSD: symbol synchronized, 3304 bytes of symbol info received
2011.08.08 19:08:29 Core 1 Intel Core i5 M 430 @ 2.27GHz, 2996 MB
2011.08.08 19:08:29 Core 1 158 Kb of total initialization data received
2011.2011.08.08 19:08:29 Core 1 successfully initialized
2011.08.08 19:08:29 Core 1 initial deposit 10000.00 USD, leverage 1:500
2011.08.08 19:08:29 Core 1 expert file added: Experts\Master03.ex5. 156794 bytes loaded
2011.08.08 19:08:29 Core 1 5304 bytes of input parameters loaded
2011.08.08 19:08:29 Tester quality of analyzed history is 100%
2011.08.08 19:08:28 Core 1 common synchronization completed
2011.08.08.19:08:28 19:08:28 Tester EURUSD,H1 (MetaQuotes-Demo): testing of experts\Master03.ex5 from 2011.01.01 00:00 to 2011.08.01 00:00 to be started
2011.08.2011.08.08 19:08:28 Core 1 authorized (agent build 485)
2011.08.08 19:08:28 Core 1 connected
2011.08.08 19:08:28 Core 1 connecting to 127.0.0.1:3000

Files:
Master03.mq5  8 kb
71pon5.PNG  22 kb
 
Erm955:

That's the thing, I recompiled it!

My fault.
Files:
MoneyNone.mqh  4 kb
 
uncleVic:
My bad.

Good!

 

To uncleVic.

I would like to revisit the possibility of enabling automatic multicurrency generation in the Wizard. The main reason for not doing it was the complication of Wizard's menu. But the complication comes to adding only one menu - the list of currency pairs for concurrent operation, if we agree, of course, that all input data for these pairs will be common. This is quite acceptable according to my experience with multicurrency tools. The implementation mechanism won't be difficult for you either. In essence it comes down to mechanical multiplication of a stretch of code with small inclusions for each symbol.

That is, the wizard menu and implementation are not much more complicated, but we get a more versatile wizard that allows you to implement multiple strategies almost immediately and in multicurrency mode.

I am attaching my variant of the solution. It may be useful.

Files:
 
Erm955:

To uncleVic.

I would like to revisit the possibility of enabling automatic multicurrency generation in the Wizard. The main reason for not doing it was the complication of Wizard's menu. But the complication comes to adding only one menu - the list of currency pairs for concurrent operation, if we agree, of course, that all input data for these pairs will be common. This is quite acceptable according to my experience with multicurrency tools. The implementation mechanism won't be difficult for you either. In essence it comes down to mechanical multiplication of a stretch of code with small inclusions for each symbol.

That is, the wizard menu and implementation are not much more complicated, but we get a more versatile wizard that allows you to implement multiple strategies almost immediately and in multicurrency mode.

I am attaching my variant of the solution. It may be useful.

The management said no.
 
uncleVic:
Check out the English forum here.

Hello moderator!

Thanks for the tip. Trying to figure it out. There's a question here about the program code:

As I understand it, the settings (i.e. input parameters) of the custom SAR indicator are described here. The first three (from 0 to 2) are clear. Where does the fourth (applied price) come from? It is not present in the custom SAR indicator itself. Please explain this block in details! Perhaps this is the most difficult part of this whole redesign (customization) of the custom indicator. Thank you in advance!

//--- prepare indicator parameters
   MqlParam CustomSAR_prop[];
   ArrayResize(CustomSAR_prop,4);
//--- indicator file
   CustomSAR_prop[0].type=TYPE_STRING;
   CustomSAR_prop[0].string_value="Examples\\ParabolicSAR";
//--- SAR step
   CustomSAR_prop[1].type=TYPE_DOUBLE;
   CustomSAR_prop[1].double_value=m_step;
//--- SAR maximum
   CustomSAR_prop[2].type=TYPE_DOUBLE;
   CustomSAR_prop[2].double_value=m_maximum;
//--- applied price
   CustomSAR_prop[3].type=TYPE_INT;
   CustomSAR_prop[3].integer_value=PRICE_CLOSE;
//--- initialize object
   if(!m_sar.Create(m_symbol.Name(),m_period,IND_CUSTOM,4,CustomSAR_prop))
     {
      printf(__FUNCTION__+": error initializing object");
      return(false);
     }
   m_sar.NumBuffers(1);
//--- ok
   return(true);
  }
 
ForexMoneyMaker:

Hello moderator!

Thanks for the tip. Trying to figure it out. There is a question here on the program code:

As I understand it, the settings (i.e. input parameters) of the custom SAR indicator are described here. The first three (from 0 to 2) are clear. Where does the fourth (applied price) come from? It is not present in the custom SAR indicator itself. Please explain this block in details! Perhaps this is the most difficult part of all this custom indicator redesign (tuning). Thank you in advance!

Yes, you probably don't need it. I didn't write it.
 

Then, if I may ask one more question about this code fragment:

m_sar.NumBuffers(1); - what is this operator for (where does it go) and why is there a 1 in brackets?

 
ForexMoneyMaker:

Then, if I may ask one more question about this code fragment:

m_sar.NumBuffers(1); - what is this operator for (where does it go) and why is there a 1 in brackets?

It sets the number of buffers of the user indicator (because their number is not known beforehand).
Переход на новые рельсы: пользовательские индикаторы в MQL5
Переход на новые рельсы: пользовательские индикаторы в MQL5
  • 2009.11.23
  • Андрей
  • www.mql5.com
Я не буду перечислять все новые возможности и особенности нового терминала и языка. Их действительно много, и некоторые новинки вполне достойны освещения в отдельной статье. Вы не увидите здесь кода, написанного по принципам объектно-ориентированного программирования — это слишком серьезная тема для того, чтобы просто быть упомянутой в контексте как дополнительная вкусность для кодописателей. В этой статье остановимся подробней на индикаторах, их строении, отображении, видах, а также особенностях их написания по сравнению с MQL4.
 
uncleVic:
Sets the number of buffers of the custom indicator (because the number of buffers is not known beforehand).

Thank you!

I managed to implement this idea completely! And based on a custom indicator of sufficient complexity. I will think that maybe I should try to write a corresponding article on this subject. There is nothing really complicated about it. :)

Reason: