下载MetaTrader 5

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

要添加评论,请登录注册
Jingwu Zhan
14
Jingwu Zhan  

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
管理员
12611
Rashid Umarov  

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  

Dear Rosh,

tks for your kindly help.

good day.

要添加评论,请登录注册