Hello,
I created an EA using an automated program but it doesn't have a feature I want regarding the lot size. My EA calculates a variable SL on each trade (based on indicators). I would like to have a variable lot size, one that is based on the SL and which calculates a percentage risk of the account.
For example, if my account has $10,000 and my SL is 100 pips on a particular trade and my risk is set at 1%, then the EA would calculate a lot size of 0.1 lots, so that if it hits the SL, my account loss would be $100 or 1%.
I would please ask: is there someone who can provide me with the few lines of code to insert for such a money management feature?
Thanks for your help.
I created an EA using an automated program but it doesn't have a feature I want regarding the lot size. My EA calculates a variable SL on each trade (based on indicators). I would like to have a variable lot size, one that is based on the SL and which calculates a percentage risk of the account.
For example, if my account has $10,000 and my SL is 100 pips on a particular trade and my risk is set at 1%, then the EA would calculate a lot size of 0.1 lots, so that if it hits the SL, my account loss would be $100 or 1%.
I would please ask: is there someone who can provide me with the few lines of code to insert for such a money management feature?
Thanks for your help.