maxxmax:
'Close' - constant variable cannot be passed as reference HurstExponent.mq4 228 50
'Open' - constant variable cannot be passed as reference HurstExponent.mq4 229 50
'High' - constant variable cannot be passed as reference HurstExponent.mq4 230 50
'Low' - constant variable cannot be passed as reference HurstExponent.mq4 231 50
'Close' - constant variable cannot be passed as reference HurstExponent.mq4 228 50
'Open' - constant variable cannot be passed as reference HurstExponent.mq4 229 50
'High' - constant variable cannot be passed as reference HurstExponent.mq4 230 50
'Low' - constant variable cannot be passed as reference HurstExponent.mq4 231 50
case PRICE_CLOSE : _computeFdi( lastBars, Close ); break;
Play videoPlease edit your post.
For large amounts of code, attach it.- Don't pass them by reference. They are constant
void _computeFdi( int lastBars, const double& Price[]){ ...
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
I have an old indicator source code, but when I try to recompile with build +600 I obtain the following errors:
'Close' - constant variable cannot be passed as reference HurstExponent.mq4 228 50'Open' - constant variable cannot be passed as reference HurstExponent.mq4 229 50
'High' - constant variable cannot be passed as reference HurstExponent.mq4 230 50
'Low' - constant variable cannot be passed as reference HurstExponent.mq4 231 50
How can I fix the code to pass the new compiler?
The "block" of involved code is the following:
void _computeLastNbBars( int lastBars )
{
int pos;
switch( e_type_data )
{
case PRICE_CLOSE : _computeFdi( lastBars, Close ); break;
case PRICE_OPEN : _computeFdi( lastBars, Open ); break;
case PRICE_HIGH : _computeFdi( lastBars, High ); break;
case PRICE_LOW : _computeFdi( lastBars, Low ); break;
case PRICE_MEDIAN :
for( pos = lastBars; pos >= 0; pos-- ) ExtInputBuffer[pos] = (High[pos]+Low[pos])/2.0; _computeFdi( lastBars, ExtInputBuffer );
break;
case PRICE_TYPICAL :
for( pos = lastBars; pos >= 0; pos-- ) ExtInputBuffer[pos] = (High[pos]+Low[pos]+Close[pos])/3.0; _computeFdi( lastBars, ExtInputBuffer );
break;
case PRICE_WEIGHTED :
for( pos = lastBars; pos >= 0; pos-- ) ExtInputBuffer[pos] = (High[pos]+Low[pos]+Close[pos]+Close[pos])/4.0; _computeFdi( lastBars, ExtInputBuffer );
break;
default :
Alert( "[ 20-ERROR " + FILENAME + " ] the imput parameter e_type_data <" + e_type_data + "> is unknown" );
}
}