Watch out, don't get carried away with martingale. The EAs were bespoke, I just warned them that I would put them out there. I don't like this technology. It's very risky. You may use it when the probability of a good outcome is quite high. The only thing left to do is to create such a mechanism.
Yeah, well... As Zverev used to say, "The star is in shock"... The algorithm does behave strangely, or as it likes to be... That's when you turn on reinvestment.
StrategyTesterReportVininE_Game_1FxProfit-Demo(Build217)
Символ EURUSD(EurovsUSDollar)
Период 5 Минут (M5)2008.06.0122:05 - 2008.06.2721:55(2008.06.01 - 2008.06.29)
Модель Все тики (наиболее точный метод на основе всех наименьших доступных таймфреймов)
Параметры Lots=0.1; MaximumRisk=6; cmd=0; TP=262; SL=18; MagicNumber=0;
Баров в истории 6749 Смоделировано тиков 152889 Качество моделирования 90.00%
Ошибки рассогласования графиков 0
Начальный депозит 1500.00
Чистая прибыль 7908.10 Общая прибыль 11037.80 Общий убыток -3129.70
Прибыльность 3.53 Матожидание выигрыша 790.81
Абсолютная просадка 662.60 Максимальная просадка 4846.40(54.75%) Относительная просадка 54.75% (4846.40)
Всего сделок 10 Короткие позиции (% выигравших)5(20.00%) Длинные позиции (% выигравших)5(40.00%)
Прибыльные сделки (% от всех)3(30.00%) Убыточные сделки (% от всех)7(70.00%)
Самая большая прибыльная сделка 6359.60 убыточная сделка -1280.00
Средняя прибыльная сделка 3679.27 убыточная сделка -447.10
Максимальное количество непрерывных выигрышей (прибыль)2(4678.20) непрерывных проигрышей (убыток)4(-612.60)
Максимальная непрерывная прибыль (число выигрышей)6359.60(1) непрерывный убыток (число проигрышей) -1280.00(1)
Средний непрерывный выигрыш 2 непрерывный проигрыш 2
№ Время Тип Ордер Объём Цена S / LT / P Прибыль Баланс
12008.06.0122:06buy10.901.55551.55351.581522008.06.0203:31s/l10.901.55351.55351.5815 -192.601307.4032008.06.0300:00sell20.801.55391.55591.527942008.06.0308:30s/l20.801.55591.55591.5279 -160.001147.4052008.06.0400:01buy30.701.54391.54191.569962008.06.0408:26s/l30.701.54191.54191.5699 -140.001007.4072008.06.0500:05sell40.601.54251.54451.516582008.06.0501:39s/l40.601.54451.54451.5165 -120.00887.4092008.06.0600:00buy50.501.55841.55641.5844102008.06.0909:39t/p50.501.58441.55641.58441293.002180.40112008.06.1000:00sell61.301.56401.56601.5380122008.06.1214:34t/p61.301.53801.56601.53803385.205565.60132008.06.1300:00buy73.301.54541.54341.5714142008.06.1302:20s/l73.301.54341.54341.5714 -660.004905.60152008.06.1522:10sell82.901.54171.54371.5157162008.06.1610:47s/l82.901.54371.54371.5157 -577.104328.50172008.06.1700:02buy92.601.54701.54501.5730182008.06.2613:44t/p92.601.57301.54501.57306359.6010688.10192008.06.2700:00sell106.401.57511.57711.5491202008.06.2710:39s/l106.401.57711.57711.5491 -1280.009408.10
But if the drawdown is > 50% ... I don't know who would risk investing. Looks like we should have used it as it is. Yet another example of the new being the enemy of the best...
where MaximumRisk - part of capital (calculated as 1/MaximumRisk) that can be used when opening a position.
The necessity to divide and multiply by step is gone, because this function doesn't discard fractional parts, but rounds them off according to mathematics rules. Now the lot is calculated with the margin value, which decreases the risk. The "lot=MathMax(MathMin(lot,maxlot),minlot);" line will try to open a position of the minimum lot size (usually 0.1) anyway, which will increase the risk of the operation. You may want to disable it altogether. Again, it will only appear with insufficient deposition.
Once again I want to thank Viktor for the provided source code...
After banging your head (stubbornly) against the table, the lot size calculation function takes the following form
Where MaximumRisk - part of equity (calculated as 1/MaximumRisk) that can be used to open a position.
There is no need to divide or multiply by step, because this function does not cut off fractional parts, but rounds them off according to mathematical rules.
Remember, not all brokerage companies have a lot increment of 0.1, there are other variants.
I'm feeling a little bit creepy... Seems right, but something's wrong. Then really /MaximumRisk/step,0)*step... I forgot that in some brokerage companies the step may be 0,001. It's nice to have someone to correct...
I don't understand why the opening of the position was put in a separate function. One command can be executed locally... Or it's a scrap of something bigger... ТР and SL are transmitted not in that sequence in which they are in OrderSend... Thank goodness they are received as they are transmitted. Certainly not a big deal, but ....
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
The first one on x is SL and the one on y is TP.
I think the left is the positive zone and the right is a random hit... Well SL on euro quid can't be 190 or more for M5 period...
and accordingly.
Watch out, don't get carried away with martingale. The EAs were bespoke, I just warned them that I would put them out there. I don't like this technology. It's very risky. You may use it when the probability of a good outcome is quite high. The only thing left to do is to create such a mechanism.
But a little testing is possible .... The result, by the way, is close to my algorithm. So I won't tear my hair out... But I want to get acquainted.
And how well it all started...
But if the drawdown is > 50% ... I don't know who would risk investing. Looks like we should have used it as it is. Yet another example of the new being the enemy of the best...
After banging your head (stubbornly) against the table, the lot size calculation function takes the following form
where MaximumRisk - part of capital (calculated as 1/MaximumRisk) that can be used when opening a position.
The necessity to divide and multiply by step is gone, because this function doesn't discard fractional parts, but rounds them off according to mathematics rules. Now the lot is calculated with the margin value, which decreases the risk. The "lot=MathMax(MathMin(lot,maxlot),minlot);" line will try to open a position of the minimum lot size (usually 0.1) anyway, which will increase the risk of the operation. You may want to disable it altogether. Again, it will only appear with insufficient deposition.
Once again I want to thank Viktor for the provided source code...
After banging your head (stubbornly) against the table, the lot size calculation function takes the following form
Where MaximumRisk - part of equity (calculated as 1/MaximumRisk) that can be used to open a position.
There is no need to divide or multiply by step, because this function does not cut off fractional parts, but rounds them off according to mathematical rules.
Remember, not all brokerage companies have a lot increment of 0.1, there are other variants.
Then it must be like this... (not sure about the '0' in the rounding function)
I don't understand why the opening of the position was put in a separate function. One command can be executed locally... Or it's a scrap of something bigger... ТР and SL are transmitted not in that sequence in which they are in OrderSend... Thank goodness they are received as they are transmitted. Certainly not a big deal, but ....