Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 874

 
rapid_minus:
I compiled (or rather clicked on the "Compile" button) both it and all the include files. But how to know if they compiled - the question.
Well, the compiler displays the errors at the bottom of the window (Toolbox, if you do not have it, Ctrl+T). You can also look in the navigator if there is no advisor, which should be alerting.
 
evillive:
The compiler shows the errors at the bottom of the window (the Tools toolbar, if it is not there, Ctrl+T). You may also look it up in the navigator, if the EA is missing, which should be alerting.

looked it up - horrified! Most of the errors are undeclared ID. How's that? I've declared them all...

I've got them all in a global variable file. I can't repeat them...

 
rapid_minus:

looked it up - horrified! Most of the errors are undeclared ID. How's that? I've declared them all...

I've got them all in a global variable file. I can't repeat them...

Variables from inludes do not need to be re-declared in the EA.
 
evillive:
Variables from inludes need not be re-declared in the EA.

I've tweaked it a bit, but it's not clear what's wrong here:

MB_2=iBands(NULL,0,10,0,2.000,PRICE_CLOSE,2);
Delta_0=iBands(ExtUpperBuffer[0]-ExtLowerBuffer[0]);

It says 'iBands' - wrong parameters count

 

One more thing: in the code, the brackets are displayed in pairs, but the compiler writes '}' - not all control paths return a value

I don't understand.

Thank you.

 
rapid_minus:

I've tweaked it a bit, but it's not clear what's wrong here:

MB_2=iBands(NULL,0,10,0,2.000,PRICE_CLOSE,2);
Delta_0=iBands(ExtUpperBuffer[0]-ExtLowerBuffer[0]);

Says 'iBands' - wrong parameters count

Well, it writes correctly, what is this stuff in red? Yes, and the line just above is written incorrectly.


And about "'}' - not all control paths return a value" - some function doesn't return a value for all cases, without code you can't guess.

 
evillive:

Well it writes correctly, what's all this stuff in red?


And about "'}' - not all control paths return a value" - some function doesn't return a value for all cases, without code you can't guess.

The bullshit in red is me trying to get the values of the upper and lower Bollinger lines and calculate the delta, and the line above is

is the value of Bollinger's mean on the minus second bar, and it seems to be written correctly.

For example, Yellow_0=iStochastic(NULL,0,30,10,8,MODE_SMA,0,MODE_MAIN,0) is not considered an error by the compiler

 
evillive:
To have a buffer for this value and read it from the Expert Advisor, that's the easiest way.
Do you mean to insert the indicator code in the EA or through iCustom? or else, I did not understand this point
 
rapid_minus:

Gentlemen, will the Expert Advisor described above work, or is there something else that must be included, and I have missed it?

Or, for example, I have doubts about correctness of initialization of included files - is init() function described correctly?

Thanks.

Why did you put in init() call of opening and closing functions? Show all these functions.
 
artmedia70:
Why did you put in init() call of opening and closing functions? Show all these functions.

Artem, do you need it?

Wow - the server is now in Belarus.

Reason: