[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 582

 
lottamer:


:))) oops, can I also clarify the following point in "pananamic"?

what is the difference between start and void functions ?

You've taken a swing at something that no one has yet achieved: "RAPPING THE FINGER WITH THEHUGE HEAD TO WHICH IT'S STARTED"!!!! :)))

the first is a function and the second is the type of value it returns.

P.S. Be patient and read it.

 
Thank you!!!!
 
lottamer:


:))) oops, can I have the following point clarified in "pananamic" too?

what is the difference between start and void functions ?

I don't even have the words, because I just use both.

Start is executed on every tick, while void is a function that does not output the result of the calculation.

 
lottamer:


:))) oops, can I have the following point made in "pananese" as well?

What is the difference between start and void functions ?

void is not a function, it is the type of value returned by the function. In this case, the function doesn't return anything. Without it you can't start any function, except init() deinit(). It is started automatically with every tick(for Expert Advisors and indicators) or at program start (for all programs), and what you put there will work. In general, you need to read a tutorial.
 
TarasBY:

You've taken a swing at something no one else has yet achieved: "RAPPING THE FINGER TO THE HUGE HEAD TO WHICH IT'S HELPING"!!! :)))


the first is a function and the second is the type of value it returns.


the fog hasn't cleared....

what is Void ? why is it even needed ?

even start is also unclear : why ? the code is already executed from the beginning.... or not ?

everything i've read is fuzzy...for me

 

The code is executed from the beginning. This is correct. But the signal to execute it is when a new tick comes into the terminal. At the weekend, when there are no quotes, nothing happens.

Let's say that's the way to talk. Take it and put some command into init. It is executed only once, irrespective of the ticks.

Write in there.

 OrderSend (Symbol( ), OP_BUY, lot ,Ask, 5, 00,   0, NULL, 450, 0, CLR_NONE);
 OrderSend (Symbol( ), OP_SELL,  lot ,NormalizeDouble(Bid, Digits), 5, 0, 0, NULL, 450, 0, CLR_NONE); 

Throw it on the chart and tell me what you got.


Now write the same thing in the start function, and throw it on the chart again. Write what happens now.

 
lottamer:


the fog hasn't cleared....

What is Void? What is it for anyway?

even start is also unclear: why ? the code is already executed from the beginning.... or not ?

everything i've read is foggy...for me


Then read Andersen's fairy tales.
 
rigonich:
void is not a function, it's a type of value returned by the function. In this case, the function returns nothing. It is started automatically with every tick (for experts and indicators) or at program start (for all programs) and what you put there will work. In general, you need to read a tutorial.


I see...(but not about void - I'm probably still a long way off).

But the problem is that the textbook is written by the same people who wrote the language itself. They are too clever :))) they are so clever that they cannot come down to our level even if they want to. that's why it's very hard to read what's written... a lot of things need "translation" and everything needs EXAMPLE, and there are none.

go look for "MQL for Dumbasses" editions on the net ... :)))

thanks for the help...

 
lottamer:


looked at

ModifyOrder() function. https://forum.mql4.com/ru/38949#434195

There are 3 parameters that need to be entered. Two I guessed, the third one I didn't.

what is UseSound on the next line?

----------------------------------------------------

if (UseSound) PlaySound("alert.wav"); break;


To enable or not to enable "music".
 
rigonich:

Then read Andersen's fairy tales.
FULLY agree! You CANNOT learn EVERYTHING!!! Improve the skill (knowledge) you are best at! No offence!
Reason: