[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 433

 
Good afternoon, I need to get the percentage of a number. I don't want to use division or multiplication. Is there any other possibility, maybe a function?
 
Fam:


Thank you, because I kept writing this command in the code as a precaution.

Also, can you tell me what are the best methods to look for logical errors? For example, I insert Alert and look at the log, maybe there are more civilized methods? Or what are the more convenient tricks.

Print - for rare situations, mainly to view the result of the operation (sending an order, closing, etc.)

Comment - on constant egetic calculations (stop loss value, indicator, etc.)

no other options.

 
bercut0077:
Good afternoon, I need to get a percentage of a number. I don't want to use simple division. Is there any other possibility, maybe a function?

there is, multiplication.
 
Afternoon, how do I change the quote download server in mt4 ?
 
sergeev:
Print - on rare situations, mostly to view the result of an operation (sending an order, closing, etc.)

Comment - on the constant ejetsic calculations (stop loss, indicator value, etc.)



I compared all variants, it turns out that if I write Alert as I did, there are a lot of gaps in the log, why?

Comment does not show up in the log.

Print works 100%, there are no skips. Thank you.

I can't understand their fundamental difference when testing, apart from the ones I've noticed. How are they different in testing?

PS No, it seems the log is not always correct, in any case a lot of gaps in time and displays one or the other without changing the code. Is this normal? Maybe I should not rely on it at all, then errors are even harder to find :(

 
Can you please tell me how to make the Expert Advisor to trade with 5 decimal places. I programmed it to 4 decimal places and it worked, now the broker has changed it to 5 decimal places. I multiplied Stop Loss and Take Profit by 10 and it worked, but I don't think it's right. Where and what command to insert in the code?
Files:
stvbands.mq4  10 kb
 
nuan:
Afternoon, how do I change the quote download server in mt4 ?


In menu: File->Login...

 
tiptur13:
Please tell me how to make my Expert Advisor trade with 5 decimal places. I programmed it to 4 decimal places and it worked well. now my broker has changed it to 5 decimal places. I multiplied Stop Loss and Take Profit by 10 and it worked, but I don't think it's right. Where and what command to insert in the code?


Only multiply the tokens.

In OrderSend() increase the slippage.

 
peshihod:


Only multiply the tokens.

Increase slippage in OrderSend().

Thank you. I messed up with stop loss, it kept giving out 11 pips, but it's getting better.
 
Good afternoon, could you tell me how to add an arrow (code 241) to a line of text and make it look appropriate on the screen? For example -- > trend = StringConcatenate("Direction of trend: ", ? ? ? ?); Maybe there is another way?