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.
- need help with margin call/stopout
- Margin required for opening a position
- AccountStopoutLevel
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.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.
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

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