下载MetaTrader 5

Dear Rosh, Please help me to made the code to limit the sumber of traders for everday. Tks.

要添加评论,请登录注册
直接在MetaTrader出售产品。数百万交易者正在等候!
Jingwu Zhan
14
Jingwu Zhan 2008.09.09 07:42 

Dear Rosh,

If the sumber of my EA's traders for everday over 3 times, it would get more loss.

Pls help me the code to limit the sumber of traders for everday. tks a lots.

Rashid Umarov
管理员
11826
Rashid Umarov 2008.09.09 10:00  

Sample

start()
{
static int todayTrades = 0;
static int currentDay = 0;
 
if (currentDay != Day())
  {
  currentDay = Day();
  todayTrades = 0;
  }
if (todayTrades < 3)
  {
  if (conditionToOpenPosiztion)
    {
    int ticket = OrderSend(...);
    if (ticket > 0) todayTrades ++;
    }
  }
}
Jingwu Zhan
14
Jingwu Zhan 2008.09.09 11:16  

Dear Rosh,

tks for your kindly help.

good day.

要添加评论,请登录注册