您需要 登录 才可以下载或查看,没有帐号?注册
其实仍是MT4自带的MA系统,我E文差,谁能告诉我这个资金管理的原理和计算方法???
extern double Lots = 0.1;
extern double MaximumRisk = 0.02;
extern double DecreaseFactor = 3;
double LotsOptimized()
{
double lot=Lots;
int orders=HistoryTotal(); // history orders total
int losses=0; // number of losses orders without a break
//---- select lot size
lot=NormalizeDouble(AccountFreeMargin()*MaximumRisk/1000.0,1);
//---- calcuulate number of losses orders without a break
if(DecreaseFactor 0)
{
for(int i=orders-1;i i--)
{
if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==false) { Print( Error in history! break; }
if(OrderSymbol()!=Symbol() || OrderType() OP_SELL) continue;
//----
if(OrderProfit() 0) break;
if(OrderProfit()1) lot=NormalizeDouble(lot-lot*losses/DecreaseFactor,1);
}
//---- return lot size
if(lot
外汇交易有很大的风险性,本站所有资源均来自网络,请选择使用,如若出现亏损,本站不承担任何责任!