- These are objects.
static CSymbolInfo c_Symbol; static CArrayLong i_TakeProfit; //fixed take profit static CArrayDouble d_TakeProfit; //percent to close at take profit
- You are creating handles to objects.
CSymbolInfo CLimitTakeProfit::c_Symbol = new CSymbolInfo(); CArrayLong CLimitTakeProfit::i_TakeProfit = new CArrayLong(); CArrayDouble CLimitTakeProfit::d_TakeProfit = new CArrayDouble();
- Just create the objects with whatever parameters are required.
CSymbolInfo CLimitTakeProfit::c_Symbol(…); CArrayLong CLimitTakeProfit::i_TakeProfit(…); CArrayDouble CLimitTakeProfit::d_TakeProfit(…);
William Roeder:
- These are objects.
- You are creating handles to objects.
- Just create the objects with whatever parameters are required.
William Roeder:
Mr William Thanks a lot Man!
- These are objects.
- You are creating handles to objects.
- Just create the objects with whatever parameters are required.
ferox875:
Mr William Thanks a lot Man!
Mr William Thanks a lot Man!
Wacking my brain. But been out of coding for years. What exactly did you do ? Could you please let us know. Thanks in advance.
ferox875:
Mr William Thanks a lot Man!
Mr William Thanks a lot Man!

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
Hello, sorry my noob question but is the following:
in my LimitTakeProfit.mqh file, when I compile receive the following errors
'CSymbolInfo' - parameter passed as reference, variable expected LimitTakeProfit.mqh 55 56
'CArrayDouble' - parameter passed as reference, variable expected LimitTakeProfit.mqh 57 56
here is the variable declaration:
private:
static CSymbolInfo c_Symbol;
static CArrayLong i_TakeProfit; //fixed take profit
static CArrayDouble d_TakeProfit; //percent to close at take profit
here are the lines that create compilation error:
CSymbolInfo CLimitTakeProfit::c_Symbol = new CSymbolInfo();
CArrayLong CLimitTakeProfit::i_TakeProfit = new CArrayLong();
CArrayDouble CLimitTakeProfit::d_TakeProfit = new CArrayDouble();
I understand that should be a very simple solution, but searching didn't found anything specific
Thanks in advance, best regards
Ferox875