surubabs:
You have to give different names to your properties. What's the problem ?
hi all,
I am just step in to class, i am trying to make a class with BAnds,MA,MACD,
The problem i face with the code, m_ma_Applied, bcoz, it comes with all this three indicators, and all this indicators have a MA,
i have the same problem with m_ma_period,
Please tell me how do we code if i want to create a class with multiple indicators,which has a commen parameater like moving average,
my coding got stoped with this confussion,please help me out,
angevoyageur:
You have to give different names to your properties. What's the problem ?
You have to give different names to your properties. What's the problem ?
ok,If i did so does it call the indicator correctly ? for example in // wizard description start i givena diffrent name to Bands
// wizard description start //+---------------------------------------------------------------------------------+ //| Description of the class | //| Title=Signals at the intersection of Bands | //| Type=SignalAdvanced | //| Name=My_Band_Cross | //| ShortName=BandCross | //| Class=Band_Cross | //| Page=Not needed | //| Parameter=BANDPeriod,int,20,Periof of Bollinger Bands | //| Parameter=BANDDeviation,double,2.000,Deviation of Bollinger Bands | //| Parameter=BANDshift,int,0,Time shift | //| Parameter=BandApplied,ENUM_APPLIED_PRICE,PRICE_CLOSE | //| Parameter=MACDPeriodFast,int,12,Period of fast EMA | //| Parameter=MACDPeriodSlow,int,24,Period of slow EMA | //| Parameter=MACDPeriodSignal,int,9,Period of averaging of difference | //| Parameter=MACDApplied,ENUM_APPLIED_PRICE,PRICE_CLOSE,Prices series | //| Parameter=PeriodMA,int,12,Period of averaging | //| Parameter=Shift,int,0,Time shift | //| Parameter=Method,ENUM_MA_METHOD,MODE_SMA,Method of averaging | //| Parameter=Applied,ENUM_APPLIED_PRICE,PRICE_CLOSE,Prices series | //+---------------------------------------------------------------------------------+
So when i call the indicator what should i use like here
//+------------------------------------------------------------------+ //| Creates the "BANDS" indicator | //+------------------------------------------------------------------+ bool Band_Cross::CreateBands(CIndicators *indicators) { //--- check pointer if(indicators==NULL) return(false); //--- add object to collection if(!indicators.Add(GetPointer(m_Bands))) { printf(__FUNCTION__+": error adding object"); return(false); } //--- initialize object if(!m_Bands.Create(m_symbol.Name(),m_period,m_Bands_period,m_Bands_shift,m_deviation,m_applied)) { printf(__FUNCTION__+": error initializing object"); return(false); } return(true); }
please make it clear to me sir.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hi all,
I am just step in to class, i am trying to make a class with BAnds,MA,MACD,
The problem i face with the code, m_ma_Applied, bcoz, it comes with all this three indicators, and all this indicators have a MA,
i have the same problem with m_ma_period,
Please tell me how do we code if i want to create a class with multiple indicators,which has a commen parameater like moving average,
my coding got stoped with this confussion,please help me out,