Liquidity_Predator/Utilities/M_NewDay.mqh

15 lines
No EOL
366 B
MQL5

bool M_NewDay()
{
stGVL.nNumberOfTrades = 0;
M_LogInfo("Trade count reset");
stGVL.DailyStartingBalance = AccountInfoDouble(ACCOUNT_BALANCE);
int nDays = M_GetLastTradeDayDifference();
if((nDays > nMaxDaysWithoutTrade || nDays == -1) && nMaxDaysWithoutTrade > 0)
{
stGVL.bDemandKeepAccountAliveTrade = true;
}
return true;
}