[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 67

 
lottamer:


goodbye to the while function. We'll never meet again!

First of all, while is not a function.
And, generally speaking, a program is not a program without loops.
Write a fragment that works.
I want to give you back your faith in this operator.
 

A quadratic or linear regression with severity coefficients.

Does this happen and can it be?

 
lottamer: thanks guys for the help, but I still could not figure out what this while. the loop hangs tight, spits on the conditions, "hangs" the computer

Well, the computer hangs the infinite loop, that's true:

while(true) ;

You probably just don't understand how while works - see above, as long as the condition is true the loop is executed, otherwise exit the loop body.

it's quite possible that the loop condition just checks the variable-counter, and the variable itself was forgotten to initialize or change, i.e.:

i =0;               // инициализация - обязательно!!!!
while(i<100){       // проверка условия, если будет здесь while(i>100) - цикл не выполнится ни одного раза!!!
   i++;             // изменение переменной / инкремент 
}
HH: for and while statements exist in all programming languages and work the same everywhere
 

How about weighting factors?

And is "severity" the cost of automatic translation?

 

There is a need to collect Ask, Bid ticks from, say, 10 pairs.

How much faster is the scheme of collecting ticks by a separate EA on each symbol chart, than the scheme of collecting ticks on one chart through Marketinfo(), in one EA?

And another question: Marketinfo() refers to the server or to the terminal (to the last value of a symbol in the "market overview")?

 

"that's the interesting thing about it...." (c) Mueller

my EA drew almost 7 gigs of logs in 10 minutes of time...I used it badly...the parameter doesn't change, and with every tick comes Print (as the forum guys pointed out to me).

But here's the interesting thing. The logs are printed to a text file. So I opened my (first encountered) text file, there are 25 lines of text. Weight of file (on disk) is 4kb. (its size is 1kb)

Now counting.

per 1 second an average of 3 ticks comes. it is 1800 ticks per minute. Let's round it up to 2000. i.e. 20.000 for 10 minutes.

1 tick in the log corresponds to 1 line. And 25 lines equals 4kb. And we have 20,000 lines.

20 thousand divided by 25 = 800 times 4kb should weigh 10 minutes of the log file

get it.... 800*4=3200kb, i.e. 3.2 megabytes!

question: where 7 giga?

 
lottamer, I'll try to be a telepath. I think the answer is while + look for other data files.
 
Heroix:
I'll try to be a telepath. I think the answer is in while.


I'll post the code a bit later...

but in the meantime, the question is: where did the 7 gigs in the text file come from? there are no other files. deleting the text file frees up 7 gigs of space

 
lottamer:


I'll post the code a little later...

but in the meantime, a question: where did the 7 gigs in the text file come from?

x3, I'm not a telepath after all. I have to look around, they're in the file, they can't come out of thin air.
 
lottamer:


but in the meantime, a question: where did the 7 gigs in the text file come from?


Are you sure that on each tick your while loop gives you one line and not a million? That's why it's a loop.