Lot Size Calculation from Risk Percentage - page 2

 
Roberto Jacobs:

based on the code of Alain:

@Thanks for the code dear :)
 
Shahzaib Idrees:
@Thanks for the code dear :)
You're welcome mate..
 
Vasyl Nosal:
https://www.mql5.com/ru/code/viewcode/14296/79100/lot_risk_sl__2.mq4

Forum on trading, automated trading systems and testing trading strategies

Libraries: Lot-SL propotion

Alain Verleyen, 2016.03.10 19:16

I don't know what this code is calculating but that's not the correct lot size. You should test your code before publishing it.


 
Alain Verleyen:

If you do not know, than it is your problem. Maybe you need to learn more.

 

Balance 1000 euro AUDCAD

 risk=10%

 SL=504 points 

 

resoult of function is 0.280375...

 

 
Shahzaib Idrees:
Thanks @Siti...Really helpful for me :)
you are welcome..

i had a little update about decimal digits , you can download AutoMM V1.mq4


automm

 
Roberto Jacobs:
He did not ask about the lot size calculations, he asked about the percentage of risk based on stop loss
Yes, therefore I give the link...
 
Siti Latifah:
you are welcome..

i had a little update about decimal digits , you can download AutoMM V1.mq4



thanks....working for me on the EURUSD perfects :)
 
Vasyl Nosal:

If you do not know, than it is your problem. Maybe you need to learn more.

 

Balance 1000 euro AUDCAD

 risk=10%

 SL=504 points 

 

resoult of function is 0.280375...

 

You are incredibly arrogant. You don't know anything and you are giving lesson to other people.

I strongly suggest you to change your attitude, your code is bugged, believe me or not.

 
Alain Verleyen:

You are incredibly arrogant. You don't know anything and you are giving lesson to other people.

I strongly suggest you to change your attitude, your code is bugged, believe me or not.

You start mock from us.
 
Vasyl Nosal:
You start mock from us.

Just funny situation where 2 persons publishing similar code are bugged. Sorry if I offended you.

Reason: