Forum

Get the Day Profit for MT5

I'm trying to get the Day profit for the current symbol and magic number using this code but getting a "HistoryDealGetInteger" no one of the overloads can be applied to the function call error. What does that mean? How do I fix it? Thanks double DayProfit() { double dayprof = 0.0 ; datetime end

How do you code this function for mt5

Hi, I’m trying to convert this function from mt4 to mt5 but I'm not sure how as I'm not familiar with mql5 code yet. Any help would be appreciated. double GetFunction() { int j,k; double sumw = (Period1+ 1 ); double sum = sumw* Close[ 1 ]; for (j= 1 , k=Period1; j<Period1; j++,k--) {