The first possibility that comes to my mind is to create a timeseries that stores the wdate() value.

declare the series
vars bla = series(floor(wdate()));

if(bla[1] != bla[0]) maxPL = 0;

Check wdate() and floor() in the manual!