I need help understanding how to correctly input the right settings to get the results I want for money management.
I need 0.03 lot size for every $100 of account balance, and the EA opens multiple orders to be closed on a equity profit target, which I want to be $35. This is supposed to be setup where the equity profit target goes up as the lot size goes up, not balance. The lot size automatically increases when the account balance increases, and I wanted the equity profit target to be relative to the lot size...so if trading with 0.04 lots, the target would move up to $46.66~. Great for compounding. I don't need to change the coding, unless it's faulty, but need to understand if my settings will work? For example, since I need 0.03 lot size for every $100 of accnt balance, with a target of $35 per 0.03 lot size, this should translate to: if I had $7500 account balance, then 2.25 lots with $2624.xx equity target. Or if accnt balance was $33.33~, then lot size would be 0.01, with $11.66~ target. here's the code:
extern double LotPercent = 3
extern double EquityGainMultiple = 35
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ blah, blah, blah
int i;
double Step = MarketInfo(Pair,MODE_LOTSTEP);
if(Lots!=0)
LS=Lots;
else
LS = MathCeil((LotPercent/1000)*AccountBalance())*Step;
EquityGain = EquityGainMultiple*100*LS;
double EquityLoss = EquityLossMultiple*100*LS;
thanks
I need 0.03 lot size for every $100 of account balance, and the EA opens multiple orders to be closed on a equity profit target, which I want to be $35. This is supposed to be setup where the equity profit target goes up as the lot size goes up, not balance. The lot size automatically increases when the account balance increases, and I wanted the equity profit target to be relative to the lot size...so if trading with 0.04 lots, the target would move up to $46.66~. Great for compounding. I don't need to change the coding, unless it's faulty, but need to understand if my settings will work? For example, since I need 0.03 lot size for every $100 of accnt balance, with a target of $35 per 0.03 lot size, this should translate to: if I had $7500 account balance, then 2.25 lots with $2624.xx equity target. Or if accnt balance was $33.33~, then lot size would be 0.01, with $11.66~ target. here's the code:
extern double LotPercent = 3
extern double EquityGainMultiple = 35
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ blah, blah, blah
int i;
double Step = MarketInfo(Pair,MODE_LOTSTEP);
if(Lots!=0)
LS=Lots;
else
LS = MathCeil((LotPercent/1000)*AccountBalance())*Step;
EquityGain = EquityGainMultiple*100*LS;
double EquityLoss = EquityLossMultiple*100*LS;
thanks
Too close for pips, switching to points.