Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 320
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
Good evening.
Built an indicator - volatility summary table for selected instruments. The data should be calculated equally, regardless of the chart on which the indicator was installed. However, it calculates it differently. Depending on whether the chart has JPY in the denominator.
If there is, the table looks like this:
if not, it looks like this:
Here is the code:
Good evening.
Built an indicator - volatility summary table for selected instruments. The data should be calculated equally, regardless of the chart on which the indicator was installed. However, it calculates it differently. Depending on whether the chart has JPY in the denominator.
Already encountered this - JPY has less fractional digits. Therefore the Point will be different. Or something else?
By the way, it is recommended to use Point() or _PointI've already encountered this - JPY has less fractional digits. Therefore Point will be different
tried adding a condition
and here divided by Z^
but in the end, on the pair without the yen, everything is clear:
but with yen it's a mess:
tried adding a condition
and here divided by Z^
but in the end, on the pair without the yen, everything is clear:
But with yen it's a mess:
ReplacePoint with "SymbolInfoDouble(syb[k],SYMBOL_POINT)"
ReplacePoint with "SymbolInfoDouble(syb[k],SYMBOL_POINT)"
Thank you, now it's clear everywhere, and no screw ups
Thank you, now it's clear everywhere, and no screw-ups.
Optimise the code a bit, call the calculation just once on one character:
Optimise the code a bit, call the calculation just once on one character:
And in that spirit, reduce all code to a concise array operation. Any repetitions of the same logic should be designed as loops.
Good day!
How to solve this problem? I wrote an EA where a pending order with increased lot (e.g. by 2 times) is placed on an unsuccessful trade,
But when the pending order is executed (rarely, in 1 out of 10 cases), the lot is not multiplied by the coefficient, even though it was initially placed according to the algorithm.
Here is an example:
a deal was closed with 0.4 lots and an pending order with 0.8 lot is placed; when it is executed, the volume turns out to be 0.4 lot.
What may it be?
Thank you.
Good day!
How to solve this problem? I wrote an EA where a pending order with increased lot (e.g. by 2 times) is placed on an unsuccessful trade,
But when the pending order is executed (rarely, in 1 out of 10 cases), the lot is not multiplied by the coefficient, even though it was initially placed according to the algorithm.
Here is an example:
a deal was closed with 0.4 lots, immediately a pending order is placed with 0.8 lot and when it is executed, the volume turns out to be 0.4 lot.
What may it be?
Thank you.
Could it be a partial occurence? What is in the logs?