that looks overly complicated, heres what i use
double lots = NormalizeDouble(AccountFreeMargin()/(500/0.1),1);
this uses 0.1 lot for every 500 in your account, adjust them as you see fit. hope this helps.
trevman:
that looks overly complicated, heres what i use
that looks overly complicated, heres what i use
double lots = NormalizeDouble(AccountFreeMargin()/(500/0.1),1);
this uses 0.1 lot for every 500 in your account, adjust them as you see fit. hope this helps.hi trevman...
Thanks for your help but dont result..
Do you've other way? Anyone?
I think your problem is here:
if (vLots<1) vLots=1;
zuhainis:
I think your problem is here: if (vLots<1) vLots=1;
I think your problem is here: if (vLots<1) vLots=1;
hi zuhainis...
Thanks for your reply
I already changed
if (vLots<1) vLots=1;[/PHP]
to
[PHP]if (vLots<0.1) vLots=0.1;but dont trade
error message: EURUSD,H1: invalid lots number for OrderSend function
What i've to do now?
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
Hi all...
What I've to do to change lots?
{
int vLots=0;
if (UsePct >0 && Risk>0) vLots=MathFloor(AccountBalance()*(UsePct/100)/((Risk/MarketInfo (Symbol(), MODE_POINT))*10));
if (UsePct >0 && Risk==0) vLots = MathFloor(AccountBalance()*(UsePct/100)/1000);
if (vLots>MaxLots) vLots=MaxLots;
if (vLots<1) vLots=1;
return(vLots);
}I already changed for 0.1 but the EA dont trade..
But if I change for 2 lots it trade normally..
Any help I appreciate..
Tks