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

 

how do you shorten the writing of a formula if one equation is repeated several times?

 
Elektronik:

how do you shorten the writing of a formula if one equation is repeated several times?


Use the function
 
Vinin:

Use a function


I understand that, but which one?

 
Elektronik:


I understand that, but which one?


Which one? The one in which your equation is calculated. To do this, you have to write this function
 
Vinin:

Which one. The one in which your equation is calculated. To do this, you need to write this function.


maybe i'm not explaining it right. here's an example

there is an expression

AccountFreeMargin()/Ask*0.002

and it constantly repeats. can we replace it with for example

test= AccountFreeMargin()/Ask*0.002

and then use test in other places

 
Elektronik:


maybe i'm not explaining it correctly. here's an example

there is an expression

AccountFreeMargin()/Ask*0.002

and it constantly repeats. can we replace it with for example

test= AccountFreeMargin()/Ask*0.002

and then use test elsewhere

you can't, ---> you have to.
 
pako:
You can't, ---> you have to.

I'm trying it and it's not working.
 
Elektronik:

I'm trying this and it's not working.
https://book.mql4.com/ru/basics/index
 
Please advise solution;
I need the script to automatically set the minimum server stop loss for the current financial instrument when opening an order. What should be written here? OrderSend(Symbol(),OP_BUY,0.01,Ask,10,?,0);
 

Can you tell me how to eliminate the holes in the history? tried uploading via F2, didn't help, still lots of holes for 3 days.