[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 207
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
why are there intermediaries? and what is the function of the FUN?
And && are not in the right place...
dear... there's no need to write in such big letters here... you might break your eyes :-)
and this... before you ask questions... have you tried reading the Help in Metaeditor? All of it?...for starters...so you don't ask stupid questions about types and stuff like that....
===
Type of operation for OrderSend() function. Can be any of the following values:
Now to the point: let's say we have 3 orders and all are market orders. Then with 3 iterations we won't hit block 4 in any of them. And after the last iteration we will immediately go to block 5, bypassing block 4. Block 5 contains the Tip variable, which is declared in block 4. But block 4 was not executed. So the Tip variable is not declared. So we use the variable before we declare it?
Why? The compiler allocated memory space for the variable during the first pass... and accessing it won't cause an error...
The following point is not clear: on the first pass (assuming that all 3 orders are market orders), we don't get to block 4, since the condition if(OrderType()<2) is met in block 3. Then the next iterator continue completes the current iteration and skips block 4, which is where the Tip variable is declared. It means that the Tip variable was not declared during the first iteration (i.e. the line declaring Tip variable was not executed)... And so it goes on for all 3 iterations. I.e. after the 3rd iteration we get to block 5, which uses Tip variable, i.e. it wasn't declared earlier (i.e. we have a string with its declaration, but since we've never gotten to block 4, we haven't declared this variable?)
I was referring to the compiler's traversal of the program text - having found a variable definition at any point in a function - the metacompiler declared that variable for use downstream - despite the fact that there was no actual reference to variable initialization... - that's the environment :-)
Even though there was no input in the condition - the compiler allocated a memory location for the variable... although it did not initialize it... in Print it will be = 0
I was referring to the compiler's traversal of the program text - having found a variable definition at any point in a function - the metacompiler declared that variable for use downstream - despite the fact that there was no actual reference to variable initialization... - that's the environment :-)
Even though there was no input in the condition - the compiler allocated a memory location for the variable... although it did not initialize it... in Print it will be = 0
So, if I understand correctly: compiler, unlike terminal (roughly speaking) does not execute loops, but just reads lines in a row and checks for errors... I.e. the main thing for it (which is the criterion of presence/absence of error) is that the line (position), where a variable was used, should come AFTER the line (position), where this variable was declared?
you could say that :-) if you make a declaration below - and access the variable above - the compiler will generate an error...
Got it, thanks a lot... Any tips about GV variables?
what about them? - global at terminal level?
they store some time in a variable file :-) the access date, name and value of type double