Errors, bugs, questions - page 2729
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
This is not a feature of mql5, it's just some attempts to teach order.
order accustoming is when the compiler gives a warning (or error). converting integers to fractions returns 0 - this is nonsense, not order. 90% of old codes will break that way.
and notice, the working variant was still with int! i.e. the issue is not about type conversion at the substitution step, but at the calculation step
ADDED: switched to MQ-demo, updated the working terminal. It doesn't have this problem.
ordering is when the compiler gives a warning (or error). converting integers to fractions returns 0 - this is nonsense, not order. this is how 90% of old codes break.
and notice, the working variant was still with int! i.e. the issue is not about type conversion at the substitution step, but at the calculation step
ADDED: switched to MQ-demo, updated the working terminal. It doesn't have this problem.
Is the lack of highlighting of possible options in this case not suspicious?
Is the lack of highlighting of possible options in this case not suspicious?
:)
:)
Yes... Strange, for a while back variables of inappropriate type weren't highlighted. Maybe they fixed it on purpose or will pay attention to this dialog and fix it again. Anyway, if the function requires variable type double, double should be used.
Yes... Strange, for a while back variables of an inappropriate type weren't highlighted. Maybe they fixed it on purpose or will pay attention to this dialog and fix it again. Anyway, if the function requires the variable's type double, double should be used.
Alexei, I notice you like links to documentation, I have one for you :)
https://www.mql5.com/ru/docs/basis/types/casting
int to double is a valid implicit conversion without data loss. legitimate.
question about the operation of the strategy tester.
I am running the test. The Expert Advisor opens a position with SL and TP. Then it rolls and the position is closed without being reopened.
What is it? A bug? I have not used the tester for some time and it did not have such problems. Below is the log from the tester. We see that the position has been opened and closed after rollover and then it is kind of written that it has been opened via BUY. I pasted in the tester the command
PositionSelect(_Symbol) to check if there are open positions after the rollover, the result is always the same - no open positions.
2020.04.28 18:14:14.609 2014.01.09 05:00:00 instant buy 1.00 AUDUSD at 0.88800 sl: 0.88450 tp: 0.89200 (0.88750 / 0.88800 / 0.88750)
2020.04.28 18:14:14.609 2014.01.09 05:00:00 deal #8 buy 1.00 AUDUSD at 0.88800 done (based on order #8)
2020.04.28 18:14:14.610 2014.01.09 05:00:00 deal done [#8 buy 1.00 AUDUSD at 0.88800
2020.04.28 18:14:14.610 2014.01.09 05:00:00 order performed buy 1.00 at 0.88800 [#8 buy 1.00 AUDUSD at 0.88800
2020.04.28 18:14:24.169 2014.01.09 23:59:59 deal #9 sell 1.00 AUDUSD at 0.88980 done (based on order #9)
2020.04.28 18:14:24.169 2014.01.09 23:59:59 rollover deal done [#9 sell 1.00 AUDUSD at 0.88980
2020.04.28 18:14:24.170 2014.01.09 23:59:59 deal #10 buy 0.00 AUDUSD at 0.8899950 done (based on order #10)
2020.04.28 18:14:24.170 2014.01.09 23:59:59 rollover deal done [#10 buy 0.00 AUDUSD at 0.8899950]
Alexei, I notice you like links to documentation, I have one for you :)
https://www.mql5.com/ru/docs/basis/types/casting
int to double is a valid implicit conversion without data loss. legitimate.
I link to the documentation so that I don't have to rewrite the documentation in the post and so that people get used to reading the documentation. Imagine there have been people here on the forum who didn't know that documentation existed at all. As for me personally, I've seen such a picture in the documentation, but didn't try to understand it thoroughly. The habit of using variables of the type the function requires is enough for me. As a last resort, I will force conversion to the right type.