Money Management Formula
-
Re: Help with money management formula
Hi @fxDreema
I am very interested on the formula you gave in the link above.
Please, could you be so kind helping me to get the values for each variable in the formula?
value -> Risk In Percent (as a constant/variable)
AccountBalance -> Account Balance

sl -> StopLoss in PIPS (as a constant/variable)
TickValue -> Market Properties -> Money per Tick

Ticksize -> Market Properties -> Tick Size

Point -> Market Properties -> Point Size

PipValue, from where I can get this value?
Thanks a lot for your help.
-
The row of code that I posted in the other topic is part of one function that i wrote, in which those calculations take place. I posted this to show the person how the calculation is done.
PipValue() is also a custom function that I wrote. But its contents is kinda crazy and I don't recommend to use it anywhere. There is a reason for it to exist, but it's not to be used from the people.
TickValue equals to this - MarketInfo(symbol,MODE_TICKVALUE), which is also that "Money per tick" option.
Tick size is this code: SymbolInfoDouble(SYMBOL,SYMBOL_TRADE_TICK_SIZE)
But I think that the function PipValue() is nothing like these. I'm very bad with numbers, believe me, and I need to spend hours learning about these pips and values and ticks in order to explain them to you. Somehow I made them to work, but these values are one of these things that I immediately forget after use

-
In the Current version of MQL5, there is a function called OrderCalcProfit() that does this job of calculating potential profits or losses for hypothetical scenarios.
Here is the link, in case someone else is interested https://www.mql5.com/en/docs/trading/ordercalcprofit