[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 679
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
Dear programmers,
Please answer the following question:
Outputs with 8 decimal places. Why isn't it normalised?
http://savepic.ru/1435355.gif
Dear programmers,
please answer the following question:
Outputs with 8 decimal places. Why is it not normalized?
http://savepic.ru/1435355.gif
If it is written in the help about function NormalizeDouble() that it rounds to a specified precision and returns type double, you have everything right, and if you need a text string with specified precision after a decimal point, then you should use DoubleToStr()
I must have misunderstood the meaning of int startH = Hour(); - it will give the current server time - hour, I would look for zero hours, or any other hour:
Thanks, it works now.
But why it didn't work with the Hour() function, I still don't understand.
It gave us the current hour of northern time. For example, let it be 5.
Therefore, when we call open[i+5], we get the opening price of the candle which opened at the beginning of the day, i.e., at 0:00 AM.
Please explain what exactly I do not understand?
Thank you, it works now.
But why it didn't work with the Hour() function I still don't understand.
It gave us the current hour of northern time. For example, let it be 5.
Therefore, when we call open[i+5], we get the opening price of the candle which opened at the beginning of the day, i.e., at 0:00 AM.
Please explain what exactly I do not understand?
The server time is server time ( TimeCurrent() ), you have it on your PC ( TimeLocal(); ), the function Hour() :
"Returns the current hour (0,1,2,...23) of the last known server time at program start (this value does not change during program execution ).Note: the last known server time is simulated during testing. "
I don't even know what to do with it myself if it doesn't change - maybe it's only needed for the tester.
Can you please tell me what I did wrong?
I need to find the opening price of the first candle on the hour chart, i.e. the one at 0:00 and from this candle to the current one to find the maximum price value.
Why do I always get the high of the first candle of the current day.
This is how I do it:
Colleagues, does anyone know how to make the tester not deduct commission for a trade? Maybe there is a file in MT4, where the amount of commission for a contract for a particular instrument is specified?
Let me explain what I need it for. Apart from currencies, I am also interested in futures of the Uber and the RTS Index. Quick is not suitable for robot development. For example, my brokerage firm has a commission for one contract - CFD on futures on the rts index (as it sounds, but ...:)) - it is a racket ... costs 10 green papers. That's why even a trade with a profit of 250p gives a $1 loss in the tester. It's unbelievable, I have tools and quotes, but it's impossible to test and optimize it.
Help!
Colleagues, does anyone know how to make the tester not deduct commission for a trade? Maybe there is a file in MT4, where the amount of commission for a contract for a particular instrument is specified?
Let me explain what I need it for. Apart from currencies, I am also interested in futures of the Uber and the RTS Index. Quick is not suitable for robot development. For example, my brokerage firm has a commission for one contract - CFD on futures on the rts index (as it sounds, but ...:)) - it is a racket ... costs 10 green papers. That's why even a trade with a profit of 250p gives a $1 loss in the tester. It's unbelievable, I have tools and quotes, but it's impossible to test and optimize it.
Help!
probably this: https://www.mql5.com/ru/forum/119830
Please advise how and what you can do to replace the code to do the same thing but work faster:
It's just a piece of one big function, where there are a lot of such checks and it affects performance a lot. I already asked questions here about code optimization, but I didn't get any answers and I didn't find anything in search... Is it really a secret that nobody knows about it or is willing to share it...? At least a link to an article... to read at your leisure... It's impossible to fully test it anyway...
Please advise how and what you can do to change the code to do the same thing but work faster: ...