返回
外汇EA
动态计算下单手数
回复:0 浏览:
729
楼主
admin
圈主
2019-05-05 10:53
按比例计算出可用资金
进而根据账户的杠杆比例进和最小手数,算出本次下单要用的实际手数。
double CaculateLotsLimit()
{
double Ma
XM
argin=已用保证金可用保证金比例*(AccountMargin()+AccountFreeMargin());
double MaxLots=NormalizeDouble(MaxMargin/(MarketInfo(Symbol(),MODE_LOTSIZE)/AccountLeverage()),2);
return(MaxLots);
}
打赏