reasonable lotsize of Accountstopoutlevel of 100

 
anyone can calculate the max reasonable lotsize before you enter a trade if the accountstopoutlevel is 100 which means if the margin level reaches 100%, the account will be stopout.
 
What do you mean by reasonable ? You can size the lots up-to the max the broker will allow.... meaning up-to your 100% limit. Once the order goes 1-point against you, the broker will close your position on a stop-out/margin call. So how much margin (usually in %) do you want left over to absorb your fluctuations?
 
ejoi:
anyone can calculate the max reasonable lotsize before you enter a trade if the accountstopoutlevel is 100 which means if the margin level reaches 100%, the account will be stopout.
As ubzen says, You have to take into account the size of your stops and other open trades.
double  minLot  = MarketInfo(Symbol(), MODE_MINLOT),
        lotStep = MarketInfo(Symbol(), MODE_LOTSTEP),
        perLotPerPoint  = PointValuePerLot(),
        maxLossPerLot   = risk * perLotPerPoint;
size = ...;     // Must still round to lotStep.
while (true){   // Adjust for broker, test for margin
    size        = MathFloor(size/lotStep)*lotStep;
    newBalRisk  = size * maxLossPerLot;
    if (size < minLot){ ...
    double  AFMC    = AccountFreeMarginCheck(Symbol(), op.code, size),
    if (AFMC*0.99 <= newBalRisk){
        size *= 0.95;   // Prevent margin call if new trade goes against us.
        continue;   }
    break;
}
See my code