MaxLot
Created at 03 Feb 2015, 12:58
MaxLot
03 Feb 2015, 12:58
Hi
Could anyone write (or convert from MQL) MaxLot indicator?
MQL indicator
void start()
{
double minlot = MarketInfo(Symbol(),MODE_MINLOT);
double maxlot = MarketInfo(Symbol(),MODE_MAXLOT);
double Accounfreemargin = AccountFreeMargin();
double MarginRequired = MarketInfo(Symbol(),MODE_MARGINREQUIRED);
double count = 1/minlot;
double ML = Accounfreemargin/MarginRequired;
if(ML>maxlot) ML=maxlot;
double MaxLot = MathFloor(ML/minlot)*minlot;
}
Spotware
10 Feb 2015, 10:21
Dear Trader,
For converting the above code you need to use the Account object and the Symbol object.
Hope this helps. If it doesn't help, please contact one of our Partners or post a job in Development Jobs section.
@Spotware