以可承受损失资产百分比计算仓位大小:
extern double EquityPercent = 2extern double StopLoss = 50#计算风险资金额double RiskAmount = AccountEquity()*(EquityPercent/100)#计算指定货币的每点价值double TickValue = MarketInfo(Symbol(),MODE_TICKVALUE);if(Point == 0.001//Point == 0.00001) TickValue *= 10;#计算仓位大小double myLots = (RiskAmount/StopLoss)/TickValue