//лот = процент риска от баланса / (размер стоплосса * Размер минимального изменения цены в валюте депозита / Минимальный шаг изменения цены в пунктах)
eLot=AccountInfoDouble(ACCOUNT_BALANCE)*eRisk/100/(MathAbs(ePrice-eStopLoss)*SymbolInfoDouble(eSymbol,SYMBOL_TRADE_TICK_VALUE)/SymbolInfoDouble(eSymbol,SYMBOL_TRADE_TICK_SIZE));
Here price and loss are prices. If your loss is in pips, use point.
Alexey, if I convert stop loss to points, I get nonsense. The thing is that in the script I used a formula found on the Internet. I don't remember where, it was just a long time ago. I made a table in Excel using this formula and used it when necessary. Here is how it looks like:
That's why I turned to the community to clarify how true it is. The formula itself in the Exel table looks like this:
лот = (баланс * риск (в %) * 0,01) / (стоп-лосс (в пунктах) * курс валюты (в моем случае в руб.))
Alexey, sorry, but we did not understand each other. The misunderstanding was more on my part. I thought that you were recommending to apply a point in my function. ))
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.
Look for ...
Thank you. But that's not what I'm looking for at all.
Apparently I again failed to formulate the question correctly :(
I'm interested in how to extract position information from a ReportTester.xlsx or .tst file .
What you suggested is not in the report.
Thank you, Alexey, for the code! Tomorrow I will go into your formula in more detail.
Regards, Vladimir.
Alexey, if I convert stop loss to points, I get nonsense. The thing is that in the script I used a formula found on the Internet. I don't remember where, it was just a long time ago. I made a table in Excel using this formula and used it when necessary. Here is how it looks like:
That's why I turned to the community to clarify how true it is. The formula itself in the Exel table looks like this:
Regards, Vladimir.
Vladimir, everything works
Vladimir, everything works
Alexey, sorry, but we did not understand each other. The misunderstanding was more on my part. I thought that you were recommending to apply a point in my function. ))
Regards, Vladimir.
Vladimir, everything works
Lots of divisions without checking the divider to zero. Explosive.
Many divisions without checking the divider for zero. Explosive.
Thanks, Artyom, for the tip! I will definitely add the check.
Regards, Vladimir.