Features of the mql4 language, subtleties and techniques - page 21 1...141516171819202122232425262728...36 New comment Artyom Trishkin 2019.10.04 14:47 #201 fxsaber: Profitability calculation. Applying Result ZZZ I do not know how to get rid of the quacky characters (copied from MT4 Experts tab). Switch the terminal to Russian. fxsaber 2019.10.04 20:01 #202 Artyom Trishkin: Switch the terminal to Russian. The terminal and everything in it is in Russian. There are crocodiles when copying. Artyom Trishkin 2019.10.04 20:09 #203 fxsaber: The terminal and everything in it is in Russian. There are crocodiles when copying. The keyboard layout when copying should be in Russian. fxsaber 2019.10.04 20:22 #204 Artyom Trishkin: The keyboard layout when copying should be in Russian. Thank you, it worked. Maxim Kuznetsov 2019.10.04 22:20 #205 Artyom Trishkin: The keyboard layout when copying should be in Russian. Artem, and in what way it can influence at all ? it is BAG Artyom Trishkin 2019.10.04 23:33 #206 Maxim Kuznetsov: Artyom, how can this have any effect at all? This is a BAG It's been like this for as long as I can remember here and at mql4.com. Maxim Kuznetsov 2019.10.04 23:47 #207 Artyom Trishkin: This has been happening as long as I can remember here and at mql4.com. i.e. it became a FICTION :-) How the hell can the state of input language switch affect the result of Copy-Paste? Artyom Trishkin 2019.10.05 15:07 #208 Yurij Kozhevnikov: That should go in 'Features'. I wouldn't have minded learning about it a few years earlier. It's already here - in the special features. Yurij Kozhevnikov 2019.10.06 21:42 #209 Artyom Trishkin: It's already there - in features. Then I noticed :D That's why I deleted it. fxsaber 2019.10.07 01:37 #210 Risk calculation. // Вычисляет риск для заданной максимальной просадки. double GetRisk( const double NewMaxDD, const double Alpha, const string Symb, const int Magic = -1 ) { double RiskLeft = 0; double RiskRight = 10; double Risk, SumGain, MaxDD, RF; do { Risk = (RiskLeft + RiskRight) / 2; if (!GetSumGain(Risk, SumGain, MaxDD, RF, Symb, Magic)) // https://www.mql5.com/ru/forum/170953/page20#comment_13432058 { MaxDD = DBL_MAX; RiskRight = Risk; } else if (MaxDD > NewMaxDD) RiskRight = Risk; else RiskLeft = Risk; } while (!IsStopped() && (MathAbs(MaxDD - NewMaxDD) > Alpha)); return(Risk); } Application. #property strict #property show_inputs input double inMaxDD = 0.3; // Для какой максимальной просадки вычислить риск? input int MagicNumber = 1; #define D(A) DoubleToString(A, 2) void OnStart() { double SumGain, MaxDD, RF; const double Risk = GetRisk(inMaxDD, 0.01, _Symbol, MagicNumber); if (GetSumGain(Risk, SumGain, MaxDD, RF, _Symbol, MagicNumber)) Print((string)MagicNumber + ": при риске " + D(Risk) + " увеличение было бы в " + D(SumGain) + " раза" + " с максимальной относительной просадкой по балансу " + D(MaxDD) + ", фактор восстановления = " + D(RF)); } Result 1: при риске 0.51 увеличение было бы в 3.82 раза с максимальной относительной просадкой по балансу 0.30, фактор восстановления = 3.20 1...141516171819202122232425262728...36 New comment
Profitability calculation.
Applying
Result
ZZZ I do not know how to get rid of the quacky characters (copied from MT4 Experts tab).
Switch the terminal to Russian.
The terminal and everything in it is in Russian. There are crocodiles when copying.
The terminal and everything in it is in Russian. There are crocodiles when copying.
The keyboard layout when copying should be in Russian.
The keyboard layout when copying should be in Russian.
Thank you, it worked.
The keyboard layout when copying should be in Russian.
Artyom, how can this have any effect at all? This is a BAG
It's been like this for as long as I can remember here and at mql4.com.
This has been happening as long as I can remember here and at mql4.com.
i.e. it became a FICTION :-)
How the hell can the state of input language switch affect the result of Copy-Paste?
That should go in 'Features'. I wouldn't have minded learning about it a few years earlier.
It's already there - in features.
Then I noticed :D
That's why I deleted it.
Application.
Result