I'm looking for something like this too.
This is what I use (account normal, leverage = 100, lots precision = 0.1):
double GetLots()
{
double Lots, PipValue;
if(UseMM)
{
PipValue = MarketInfo(Symbol(),MODE_TICKVALUE);
Lots = AccountEquity() * Risk / (StopLoss * PipValue * 100);
Lots = MathMin(Lots, 100);
return(NormalizeDouble(Lots,1));
}
else return(1.0);
}Thank you! I never knew what "TICKVALUE" meant.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register