You have already been given an answer ...
- https://www.mql5.com/en/forum/444637/page4#comment_46045596
- https://www.mql5.com/en/forum/444637/page5#comment_46066710
Hi Fernando,
I think we are talking about 2 different things. I want to know the TakeProfit Price.
The premise is that a just have a formula like ( BUY ) -> TakeProfit = ((Openprice- stoplossprice) *3) + Openprice;
But what I want is to satisfy my curiosity and calc the TakeProfit for XAUUSD taking the 3% ofthe account balance in EUR = 500000 at 1% of risk. in this case 15000 EUR .
This is another way to do things, that is : How many pips do i have to add to my openprice in profit Pair (USD) stating that these number of pips (must be) = 15000 EUR ??
With all due respect Fernando it does not seem what you gave here :
[Volume] = [Money Value] * [Tick Size] / ( [Tick Value] * [Stop Size] ) [Stop Size] = [Money Value] * [Tick Size] / ( [Tick Value] * [Volume] ) [Money Value] = [Volume] * [Stop Size] * [Tick Value] / [Tick Size] [Volume] in lots [Stop Size] in quote price change [Money Value] in account currency
gives what i am asking, unless I can do the math. may be...
I already use the OrderCalcProfit() function that you mentioned and it's usefull to calc the lotsize or volume , but i am trying to do another calc.
If you think I'm wrong could you gently show me what is the math applying to one the formula you mentioned above? with the prices in my post above ?
I thank you very much of what you can do to help me.
I owe you an apology, because i didn't see this snippet of code ( inside/nested in in one the posts you mentioned) , specifically :
double secondMethod(double money, double avgPrice, double volume) { return(avgPrice + money * MarketInfo(_Symbol, MODE_TICKSIZE) / (MarketInfo(_Symbol, MODE_TICKVALUE) * volume)); }
infact if I change the values for my case for XAU :
case 1 : BUY
ticksize = 0.01
tickValue= 0.916481
lotsize = 77.05
OP =2006.535 SL=2005.827
contractsize for XAUUSD = 100
priceInPoints = (500000.00 *0.03) * ( ticksize / ( tickValue * lotsize )); = 2.124
TP = 2006.353 + 2.214 = 2008.659
case 2 : SELL
ticksize = 0.01
tickValue= 0.916481
lotsize = -11.84
OP =2017.088 SL=2021.692
contractsize for XAUUSD = 100
priceInPoints = (500000.00 *0.03) * ( ticksize / ( tickValue * lotsize )); = -13.812
TP = 2017.088 -13.812 = 2003.276
IT'S PERFECT . ones must always have to look into the details..
thanks a lot
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi to all guys ,
I am struggeling my head with a problem that sesms easy but i am not able to get rid of.
the problems is with pair XAUUSD where my broker give me these values :
Ticksize = 0.01 and contract size ( or lot size ) = 10. ( very poor value ) .
the open price used is 2006.535 and the exchange Eur for this price si 1.09212.
the stop loss is 2005.827
the problem is that i want calculate the take profit value referreing to 3% of the balance of 500000.00 EUR ( account currency) = 15000.00.EUR
So I though to calculate the pip value in account currency with the formula
pip value = ( pip / currency exchange * lot size )
pip value = ( 0.01 /1.09212* 10 ) = 0.0915650294
numbers of pips in EUR = 15000.00 / 0.0915650294 =163.81 or 1.63 ?? <--- is that it ??
I tried to calcutate with tradingvView and the result is 2121 pips or 2.121 XAU price.
adding this value ( 2.121 ) to 2006.535 result is 2008.656 that is correct value-
Could some one help me to undestand where i am wrong ?