double T1ThickBuffer[]; // not an indicator plot, just an array, not an index
CalculateAllTimeframes(THandle, T1ThickBuffer, T1ThinBuffer, T1MACDCrossHandle, T1ChartHistStat, TF1);
void CalculateAllTimeframes(int THandle, double TThickBuffer, double TThinBuffer, …
T1ThickBuffer is an array.
You pass it to the function.
The function takes a single double, not an array.
CalculateAllTimeframes(THandle, T1ThickBuffer, T1ThinBuffer, T1MACDCrossHandle, T1ChartHistStat, TF1);
void CalculateAllTimeframes(int THandle, double TThickBuffer, double TThinBuffer, …
T1ThickBuffer is an array.
You pass it to the function.
The function takes a single double, not an array.
William Roeder #:
double T1ThickBuffer[]; // not an indicator plot, just an array, not an index
CalculateAllTimeframes(THandle, T1ThickBuffer, T1ThinBuffer, T1MACDCrossHandle, T1ChartHistStat, TF1);
void CalculateAllTimeframes(int THandle, double TThickBuffer, double TThinBuffer, …
T1ThickBuffer is an array.
You pass it to the function.
The function takes a single double, not an array.
double T1ThickBuffer[]; // not an indicator plot, just an array, not an index
CalculateAllTimeframes(THandle, T1ThickBuffer, T1ThinBuffer, T1MACDCrossHandle, T1ChartHistStat, TF1);
void CalculateAllTimeframes(int THandle, double TThickBuffer, double TThinBuffer, …
T1ThickBuffer is an array.
You pass it to the function.
The function takes a single double, not an array.
OMG William thank you so much. Really appreciate it. Here obviously is what works:
void CalculateAllTimeframes(int THandle, double &TThickBuffer[], double &TThinBuffer[], int TMACDCrossHandle, double &TChartHistStat[], int TF)

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,
I'm stuck on a compiling error. Maybe something stupid but I can't see it or understand it. Help greatly appreciated.
I've tried to only include relevant code to make this as easy as possible.
The problem is calling a function I've created. The code works if I execute it directly in OnCalculate() instead of through a called function. But the OnCalculate() runs the code several times and I'm attempting to refactor the code so I can iterate through multiple calls to the same code using different handles, buffers and timeframes.
The full error I'm getting when constructing it as a function call is:
'T1ThickBuffer' - parameter conversion not allowed
void CalculateAllTimeframes(int,double,double,int,double,int) csb_MACD Status in Timeframes.mq5 1073 6
Here is the relevant code. At the bottom you can see two different constructs of the function, both of which get the same compilation error:
I hope I've not missed anything relevant when snipping out excess code. Again, all my code works great when in OnCalculate(), but I can't seem to encapsulate it in the new CalculateAllTimeframes() function without getting the compiling error.
Thank you so much for your time!!