Forum
jim_sg
4
jim_sg 2010.02.20 15:27

'Create' - no one of the overloads can be applied to the function call  




only can't pass compile at CiStochastic


   if (m_MACD = new CiMACD)
     {
       m_MACD.Create(NULL, 0, 12, 26, 9, PRICE_CLOSE);
       m_MACD.BuffSize(2);
     }
   if (m_MA = new CiMA)
     {
       m_MA.Create(NULL, 0, 20, 0, MODE_SMA, PRICE_CLOSE);
       m_MA.BuffSize(2);
     }    
  
   if (m_KD = new CiStochastic)
     {
      m_KD.Create(NULL, 0, 10, 3, 5, MODE_SMA, PRICE_CLOSE);                             // no one of the overloads can be applied to the function call
      m_KD.BuffSize(2);
     }
 
   if (m_Boll = new CiBands)
     {
      m_Boll.Create(NULL, 0, 20, 0, 2, PRICE_CLOSE);
      m_Boll.BuffSize(2);     

     }



http://www.mql5.com/ru/docs/standardlibrary/technicalindicators/oscillatorindicators/cistochastic/cistochasticcreate

http://www.mql5.com/en/docs/standardlibrary/technicalindicators/oscillatorindicators/cistochastic/cistochasticcreate

When I accessed to information about the use of "CiStochastic.Create", I found a small mistake about "ma_method" param description, "period" should be "method", the same in "MQL Reference"

Parameters

symbol

[in]  Symbol.

period

[in]  Period.

Kperiod

[in]  Averaging period of %K line.

Dperiod

[in]  Averaging period of %D line.

slowing

[in]  Slowing period.

ma_method

[in]  Averaging period.  <<=========== "period" should be "method"

price_field

[in]  Price type (Low/High or Close/Close) to apply.

Returned value

true if successful, false if indicator hasn't been created.

Attached files
cistochastic.jpg (26.12 KB)
Creating Active Control Panels in MQL5 for Trading
The article covers the problem of development of active control panels in MQL5. Interface elements are managed by the event handling mechanism. Besides, the option of a flexible setup of control elements properties is available. The active control panel allows working with positions, as well setting, modifying and deleting market and pending orders.
jim_sg
4
jim_sg 2010.02.20 15:35

I see. bad param. :-(


m_KD.Create(NULL, 0, 10, 3, 5, MODE_SMA, PRICE_CLOSE);  

m_KD.Create(NULL, 0, 10, 3, 5, MODE_SMA, STO_CLOSECLOSE);   


Thanks .



bool CiStochastic::Create(string symbol,ENUM_TIMEFRAMES period,int Kperiod,int Dperiod,int slowing,ENUM_MA_METHOD ma_method,ENUM_STO_PRICE price_field)

ENUM_STO_PRICE


ID

Description

STO_LOWHIGH

Calculation is based on Low/High prices

STO_CLOSECLOSE

Calculation is on prices Close/Close based

/

To add comments, please log in or register