Hello folks,
I'm experimenting with some kind of code to calculate The Lotsize.
Two questions:
I'm experimenting with some kind of code to calculate The Lotsize.
Inserted Code
extern double Lots = 0.1;
extern double StopLoss = 100;
extern double RiskPerTradePercent = 5;
int start()
{
Lots = (AccountBalance() * RiskPerTradePercent/100) / ((MarketInfo(Symbol(),MODE_TICKVALUE) * StopLoss);
Print("CalculatedLots: ", Lots());
return(0);
}
- I'm stuck right at the beginning with "unbalances left parenthesis"
I don't see why! Could somebody please take a look. - Whenever the LotSize will be calculated, I need to make sure that it will be a number MT understandes.
I mean it must be 1.1, instead of 1.1045. How do I round the numbers?
Thanks.
MikeFT
Attached File(s)