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

 

'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);     

     }



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

https://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.

Документация по MQL5: Стандартная библиотека / Классы для работы с индикаторами / Осцилляторы / CiStochastic / Create
  • www.mql5.com
Стандартная библиотека / Классы для работы с индикаторами / Осцилляторы / CiStochastic / Create - Документация по MQL5
Files:
 

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